Skip to content

Commit 26db2fc

Browse files
author
Jen Weber
authored
Merge pull request #6 from ember-learn/feature/highlight-format
updating all hbs and js file code examples to get ribbon implementation working
2 parents c1e06d1 + 3eaf375 commit 26db2fc

File tree

1,388 files changed

+8972
-8972
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,388 files changed

+8972
-8972
lines changed

guides/v1.10.0/components/customizing-a-components-element.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To use a tag other than `div`, subclass `Ember.Component` and assign it
1818
a `tagName` property. This property can be any valid HTML5 tag name as a
1919
string.
2020

21-
```js
21+
```javascript
2222
App.NavigationBarComponent = Ember.Component.extend({
2323
tagName: 'nav'
2424
});
@@ -47,7 +47,7 @@ If you want class names to be determined by properties of the component,
4747
you can use class name bindings. If you bind to a Boolean property, the
4848
class name will be added or removed depending on the value:
4949

50-
```js
50+
```javascript
5151
App.TodoItemComponent = Ember.Component.extend({
5252
classNameBindings: ['isUrgent'],
5353
isUrgent: true

guides/v1.10.0/components/handling-user-interaction-with-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ When the title is clicked, the entire post body is shown:
2727
</script>
2828
```
2929

30-
```js
30+
```javascript
3131
App.PostSummaryComponent = Ember.Component.extend({
3232
actions: {
3333
toggleBody: function() {

guides/v1.10.0/components/passing-properties-to-a-component.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ value of the `title` property inside the `<h1>`.
1616

1717
Now imagine we have the following template and route:
1818

19-
```js
19+
```javascript
2020
App.IndexRoute = Ember.Route.extend({
2121
model: function() {
2222
return {

guides/v1.10.0/components/sending-actions-from-components-to-your-application.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ So how do you trigger sending a component's primary action? After
4444
the relevant event occurs, you can call the `sendAction()` method
4545
without arguments:
4646

47-
```js
47+
```javascript
4848
App.MyButtonComponent = Ember.Component.extend({
4949
click: function() {
5050
this.sendAction();
@@ -65,14 +65,14 @@ To send parameters with the primary action, call `sendAction()` with the
6565
string `'action'` as the first argument and any additional parameters
6666
following it:
6767

68-
```js
68+
```javascript
6969
this.sendAction('action', param1, param2);
7070
```
7171

7272
For example, imagine we're building a todo list that allows the user to
7373
delete a todo:
7474

75-
```js
75+
```javascript
7676
App.IndexRoute = Ember.Route.extend({
7777
model: function() {
7878
return {
@@ -109,7 +109,7 @@ action.
109109
In the component, when triggering the primary action, we'll pass an
110110
additional argument that the component user can specify:
111111

112-
```js
112+
```javascript
113113
App.ConfirmButtonComponent = Ember.Component.extend({
114114
actions: {
115115
showConfirmation: function() {
@@ -183,7 +183,7 @@ particular event, calling `sendAction()` has no effect.
183183
For example, if you define a component that triggers the primary action
184184
on click:
185185

186-
```js
186+
```javascript
187187
App.MyButtonComponent = Ember.Component.extend({
188188
click: function() {
189189
this.sendAction();

guides/v1.10.0/configuring-ember/embedding-applications.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ the document's `body` element.
1313
You can tell the application to append the application template to a
1414
different element by specifying its `rootElement` property:
1515

16-
```js
16+
```javascript
1717
App = Ember.Application.create({
1818
rootElement: '#app'
1919
});
@@ -29,7 +29,7 @@ You can prevent Ember from making changes to the URL by [changing the
2929
router's `location`](../../routing/specifying-the-location-api) to
3030
`none`:
3131

32-
```js
32+
```javascript
3333
App.Router = Ember.Router.extend({
3434
location: 'none'
3535
});

guides/v1.10.0/contributing/adding-new-features.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ precisely this format. We are choosing conditionals rather than a block
4141
form because functions change the surrounding scope and may introduce
4242
problems with early return.
4343

44-
```js
44+
```javascript
4545
if (Ember.FEATURES.isEnabled("feature")) {
4646
// implementation
4747
}
@@ -64,7 +64,7 @@ described above.
6464

6565
#### Feature Naming Conventions
6666

67-
```js
67+
```javascript
6868
Ember.FEATURES["<packageName>-<feature>"] // if package specific
6969
Ember.FEATURES["container-factory-injections"]
7070
Ember.FEATURES["htmlbars"]
@@ -77,7 +77,7 @@ guarded by the conditionals in the original source. This means that
7777
users of the canary build can enable whatever features they want by
7878
enabling them before creating their Ember.Application.
7979

80-
```js
80+
```javascript
8181
Ember.FEATURES["htmlbars"] = true;
8282
```
8383

@@ -90,7 +90,7 @@ builds.
9090
This file is populated when branching, and may not gain additional
9191
features after the original branch. It may remove features.
9292

93-
```js
93+
```javascript
9494
{
9595
"htmlbars": true
9696
}

guides/v1.10.0/cookbook/client_server_interaction/serving_compiled_templates_using_nodejs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ for your grunt tasks.
4444
5. Open the Gruntfile and paste in the following code:
4545

4646

47-
```js
47+
```javascript
4848
'use strict'
4949

5050
module.exports = function (grunt) {

guides/v1.10.0/cookbook/ember_data/linking_to_slugs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function on the route.
2222
Identifying records by slugs is a two step problem. Given a Router
2323
mapping that looks like this:
2424

25-
```js
25+
```javascript
2626
App.Router.map(function() {
2727
this.route('post', { path: '/post/:post_slug' });
2828
});
@@ -41,7 +41,7 @@ by a property (other then the id property). Luckily, it is easy to
4141
extend Ember Data's store object to provide this functionality. The
4242
code below adds a `findOne` method to the store.
4343

44-
```js
44+
```javascript
4545
App.ApplicationStore = DS.Store.extend({
4646
findOne: function() {
4747
return this.find.apply(this, arguments).then(function(results) {
@@ -54,7 +54,7 @@ App.ApplicationStore = DS.Store.extend({
5454
Using `findOne` we can easily fetch a record by its `slug` property in
5555
the Route's model hook.
5656

57-
```js
57+
```javascript
5858
App.PostRoute = Ember.Route.extend({
5959
model: function(params) {
6060
return this.store.findOne('post', {slug: params.post_slug});
@@ -82,7 +82,7 @@ Unfortunately it will generate an anchor tag that includes the `Post`'s
8282
You can work around this behavior by defining a custom `serialize`
8383
method on the route.
8484

85-
```js
85+
```javascript
8686
App.PostRoute = Ember.Route.extend({
8787
serialize: function(model) {
8888
return {

guides/v1.10.0/cookbook/event_handling_and_data_binding/binding_properties_of_an_object_to_its_own_properties.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You want to base the value of one property on the value of another property.
44
### Solution
55
Use one of the computed property macros like `Ember.computed.alias` or `Ember.computed.gte`
66

7-
```js
7+
```javascript
88
App.Person = Ember.Object.extend({
99
firstName : null,
1010
lastName : null,

guides/v1.10.0/cookbook/event_handling_and_data_binding/toggling_a_boolean_property.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You want to toggle a boolean property.
44
### Solution
55
Use the `toggleProperty` method of an `Ember.Object`.
66

7-
```js
7+
```javascript
88
obj.toggleProperty('isVisible');
99
```
1010

0 commit comments

Comments
 (0)