Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Added Transloadit library to the list of dependencies
Browse files Browse the repository at this point in the history
Also updated the deprecated "file-hosted-public" field type to add
the same "delete" functionality as "file-transloadit".
  • Loading branch information
François Daoust committed Jun 4, 2013
1 parent eb99744 commit c35464f
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 2 deletions.
52 changes: 52 additions & 0 deletions deps/opt/jquery.transloadit2.js

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

9 changes: 9 additions & 0 deletions lib/jsonform.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,15 @@ jsonform.elementTypes = {
}
});
},
'onInsert': function (evt, node) {
$(node.el).find('a._jsonform-delete').on('click', function (evt) {
$(node.el).find('._jsonform-preview').remove();
$(node.el).find('a._jsonform-delete').remove();
$(node.el).find('#' + escapeSelector(node.id)).val('');
evt.preventDefault();
return false;
});
},
'onSubmit':function(evt, elt) {
if (elt.ownerTree._transloadit_bound) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion playground/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ <h2>Generated form</h2>
<script src="../deps/opt/jquery.ui.mouse.js"></script>
<script src="../deps/opt/jquery.ui.sortable.js"></script>
<script src="../deps/opt/bootstrap-dropdown.js"></script>
<script src="../deps/opt/jsv.js"></script>
<script src="../deps/opt/spectrum.js"></script>
<script src="../deps/opt/ace/ace.js"></script>
<script src="../deps/opt/ace/mode-json.js"></script>
<script src="../deps/opt/jquery.transloadit2.js"></script>

<script src="../lib/jsonform.js"></script>

Expand Down
Loading

0 comments on commit c35464f

Please sign in to comment.