mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-21 10:58:12 +01:00
git-svn-id: https://andors-trail.googlecode.com/svn/trunk@83 08aca716-68be-ccc6-4d58-36f5abd142ac
19 lines
475 B
JavaScript
19 lines
475 B
JavaScript
|
|
function createDroplistEditor(obj) {
|
|
var div = $( "#templates #editDroplist" ).clone(true);
|
|
applyCommonEditorBindings(div, obj, model.droplists);
|
|
if (!obj.items) obj.items = [];
|
|
|
|
applyTableEditor({
|
|
table: $( "#items", div ),
|
|
dialog: droplistItemDialog,
|
|
array: obj.items,
|
|
templateFunction: function() { return { quantity: 1, chance: 100 } },
|
|
editorSetup: function(div) {
|
|
bindFieldToDataStore( $( "#itemID", div ), model.items);
|
|
}
|
|
});
|
|
|
|
return div;
|
|
}
|