Skip to content

Commit

Permalink
Add options for hiding array controls (add row, delete row, move up/d…
Browse files Browse the repository at this point in the history
…own). Fixes #139

Fix bug with table editor and minItems.
  • Loading branch information
jdorn committed Jun 17, 2014
1 parent 726eccc commit fbfec25
Show file tree
Hide file tree
Showing 9 changed files with 541 additions and 332 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ Here are all the available options:
<td>If <code>true</code>, JSON Editor will load external URLs in <code>$ref</code> via ajax.</td>
<td><code>false</code></td>
</tr>
<tr>
<td>disable_array_add</td>
<td>If <code>true</code>, remove all "add row" buttons from arrays.</td>
<td><code>false</code></td>
</tr>
<tr>
<td>disable_array_delete</td>
<td>If <code>true</code>, remove all "delete row" buttons from arrays.</td>
<td><code>false</code></td>
</tr>
<tr>
<td>disable_array_reorder</td>
<td>If <code>true</code>, remove all "move up" and "move down" buttons from arrays.</td>
<td><code>false</code></td>
</tr>
<tr>
<td>disable_collapse</td>
<td>If <code>true</code>, remove all collapse buttons from objects and arrays.</td>
Expand Down Expand Up @@ -661,6 +676,9 @@ Editor Options
Editors can accept options which alter the behavior in some way.

* `collapsed` - If set to true, the editor will start collapsed (works for objects and arrays)
* `disable_array_add` - If set to true, the "add row" button will be hidden (works for arrays)
* `disable_array_delete` - If set to true, the "delete row" buttons will be hidden (works for arrays)
* `disable_array_reorder` - If set to true, the "move up/down" buttons will be hidden (works for arrays)
* `disable_collapse` - If set to true, the collapse button will be hidden (works for objects and arrays)
* `disable_edit_json` - If set to true, the Edit JSON button will be hidden (works for objects)
* `disable_properties` - If set to true, the Edit Properties button will be hidden (works for objects)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "json-editor",
"version": "0.6.14",
"version": "0.6.15",
"authors": [
"Jeremy Dorn <[email protected]>"
],
Expand Down
5 changes: 4 additions & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,16 @@ <h2>Options</h2>
</div>
<div>
<label>Boolean options</label>
<select multiple size=6 id='boolean_options' style='width: 100%;' class='form-control'>
<select multiple size=9 id='boolean_options' style='width: 100%;' class='form-control'>
<option value='required_by_default'>Object properties required by default</option>
<option value='no_additional_properties'>No additional object properties</option>
<option value='ajax'>Allow loading schemas via Ajax</option>
<option value='disable_edit_json'>Disable "Edit JSON" buttons</option>
<option value='disable_collapse'>Disable collapse buttons</option>
<option value='disable_properties'>Disable properties buttons</option>
<option value='disable_array_add'>Disable array add buttons</option>
<option value='disable_array_reorder'>Disable array move buttons</option>
<option value='disable_array_delete'>Disable array delete buttons</option>
</select>
</div>
</div>
Expand Down
Loading

0 comments on commit fbfec25

Please sign in to comment.