Skip to content

Commit

Permalink
Added 'double-click-to-create' feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedurbin committed Jun 19, 2015
1 parent cff0a86 commit c06c351
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/webapp/js/document-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,20 @@ function addDropZones(div) {
drop: dropComponent
});

$(this).dblclick(function() {
var index = getDropZoneIndex($(this));
var partId = $(this).parent().attr("id");
$.ajax({
type: "POST",
url: partId + "/new?index=" + index,
data: "",
success: replaceDocumentElement,
beforeSend: block($('.ROOT')),
complete: release
});

});

});
}

Expand Down

0 comments on commit c06c351

Please sign in to comment.