Skip to content

Commit

Permalink
Improve demo with two-way binding example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Glavin001 committed May 26, 2014
1 parent 9797a5a commit b66660a
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 31 deletions.
2 changes: 2 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

<!-- build:css(app) styles/components.css -->
<link rel="stylesheet" href="bower_components/jsoneditor/jsoneditor.css">
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<!-- endbuild -->

<!-- build:css(build) styles/lib.css -->
Expand All @@ -26,6 +27,7 @@
<script src="@@ember"></script>
<script src="@@ember_data"></script>
<script src="bower_components/jsoneditor/jsoneditor.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<!-- endbuild -->

<!-- build:js(build) scripts/lib.js -->
Expand Down
9 changes: 2 additions & 7 deletions app/styles/style.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// SASS!

.well {
background-color: gray;
border-radius: 5px;

li {
padding: 5px;
}
.jsoneditor-component {
height: 300px;
}
47 changes: 36 additions & 11 deletions app/templates/index.hbs
Original file line number Diff line number Diff line change
@@ -1,22 +1,47 @@
<div class="">
<h1 class="">Welcome to Ember-JSONEditor</h1>
<div class="container">

<h2>Editor</h2>
<div class="jumbotron">
<h2>Welcome to Ember-JSONEditor</h2>
<p>Ember component to view, edit and format JSON.</p>
<p><a class="btn btn-primary btn-lg" target="_blank" href="https://github.com/Glavin001/ember-jsoneditor" role="button">Learn more</a></p>
</div>

{{json-editor json=model mode=controller.mode name=controller.name}}
<div class="well">
<h4>Features</h4>
<ul>
<li>Two-Way Bindings</li>
<li>Set <em>name</em> and <em>mode</em> with component</li>
</ul>
<hr/>
<p>Try it out for yourself!</p>
</div>

<hr/>
<div class="row">
<div class="col-sm-6">

<h2>Options</h2>
<h3>Editor 1</h3>

Name: {{input value=controller.name}}
{{json-editor json=model mode=controller.mode name=controller.name}}

<br/>
<h2>Options</h2>

Mode: {{view Ember.Select content=controller.modes value=controller.mode}}
Name: {{input value=controller.name}}

<h2>Raw JSON</h2>
<br/>

<pre>{{pretty-print model undefined 4}}</pre>
Mode: {{view Ember.Select content=controller.modes value=controller.mode}}

</div>
<div class="col-sm-6">

<h3>Editor 2</h3>

{{json-editor json=model mode="code" name="Two-Way Bindings"}}

<h2>Raw JSON</h2>

<pre>{{pretty-print model undefined 4}}</pre>

</div>
</div>
</div>
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"jsoneditor": "~2.3.6"
},
"devDependencies": {
"ember-mocha-adapter": "0.1.2"
"ember-mocha-adapter": "0.1.2",
"bootstrap": "~3.1.1"
},
"main": "build/ember-plugin.js"
}
8 changes: 4 additions & 4 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
<meta charset="utf-8">
<title>Ember-JSONEditor</title>

<link rel="stylesheet" href="styles/2eff5d3b.main.css">
<link rel="stylesheet" href="styles/2097fa0f.main.css">

<link rel="stylesheet" href="styles/f6c048b9.components.css">
<link rel="stylesheet" href="styles/5b494039.components.css">

<link rel="stylesheet" href="styles/9b4e8cd5.lib.css">

</head>
<body>

<script src="scripts/839dfd23.components.js"></script>
<script src="scripts/8578e3f0.components.js"></script>

<script src="scripts/3abcd29b.lib.js"></script>

<script src="scripts/7acabe46.templates.js"></script>
<script src="scripts/eba4f04f.templates.js"></script>

<script src="scripts/aed1d907.main.js"></script>

Expand Down
1 change: 0 additions & 1 deletion dist/scripts/7acabe46.templates.js

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/scripts/eba4f04f.templates.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/styles/2097fa0f.main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/styles/2eff5d3b.main.css

This file was deleted.

5 changes: 5 additions & 0 deletions dist/styles/5b494039.components.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/styles/f6c048b9.components.css

This file was deleted.

0 comments on commit b66660a

Please sign in to comment.