Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Ember.js-in-Action-Source

This is the code examples from Ember.js in Action. The code is split up into the following:

- Chapter 1 code is used for both chapter 1 and chapter 2. Live Demo: http://stuff.haagen.name/notes/index.htm
- Chapter 1 code is used for both chapter 1 and chapter 2. Live Demo: http://stuff.haagen.name/notes/index.html
- Chapter 3 code is located in the chapter 3 directory.
- Chapter 4 does not have any associated source code.
- Chapter 5, 7, 8, 9 and 11 uses the Montric application as its source: http://github.com/joachimhs/Montric
- Chapter 6 uses the Ember Fest website as its source: http://github.com/joachimhs/EmberFestWebsite

The code is split up into multiple parts. The complete source code is split up into multiple files and are linked up inside index.html. Where the chapters code is split into multiple major parts, each of these parts are included inside a single file containing the complete JavaScript code. The first part is names "app1.js", the second "app2.js" and so on. These files are linked up via their corresponsing "index1.html", "index2.html" and so on.
The code is split up into multiple parts. The complete source code is split up into multiple files and are linked up inside index.html. Where the chapters code is split into multiple major parts, each of these parts are included inside a single file containing the complete JavaScript code. The first part is named "app1.js", the second "app2.js" and so on. These files are linked up via their corresponding "index1.html", "index2.html" and so on.

The code is structured in such a way that you are able to run the code example by simply opening the index.html file you want to run in your browser.

Expand Down
6 changes: 3 additions & 3 deletions chapter3/blog/posts/2012-05-05-Ember_tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Admittedly there are tons of JavaScript Tree implementations out there, so why b

First off, this is what our final result will look like:

![Ember.js Tree](/images/ember_tree1.png)
![Ember.js Tree](/chapter3/blog/images/ember_tree1.png)

There are a few things that we can note about the features of this tree structure:

Expand Down Expand Up @@ -181,7 +181,7 @@ And the _tree-node-content_ template:

The above template tells us that we will render an empty span if the node has no children nodes. In effect this will indent our nodes without children an equal amount of pixels as our disclosure triangle occupies, in order to align the checkboxes neatly:

![Ember.js Tree](/images/ember_tree2.png)
![Ember.js Tree](/chapter3/blog/images/ember_tree2.png)

Also, the template tells us that we are rendering the checkbox as a standard Ember.Checkbox view, while the disclosure triangle and the text is rendered in separate views:

Expand Down Expand Up @@ -249,4 +249,4 @@ There's no magic to any of these templates, and they should start to look famili
border-top: 6px solid black;
}

Thats all there is to it, and to be honest it took me about two hours to implement the tree in its entirety. Thats two hours including the integration with the rest of the application. I might not have ended up with a versatile solution that can be applied as-is to any application, but I did end up with a rather simple implementation that is customized to my application needs, and which can be easily changed as the requirements to my application grows. Thats a rather big bonus in my book!
Thats all there is to it, and to be honest it took me about two hours to implement the tree in its entirety. Thats two hours including the integration with the rest of the application. I might not have ended up with a versatile solution that can be applied as-is to any application, but I did end up with a rather simple implementation that is customized to my application needs, and which can be easily changed as the requirements to my application grows. Thats a rather big bonus in my book!