add unused presets
This commit is contained in:
parent
5ddc19a267
commit
8033e98f20
|
@ -96,7 +96,7 @@
|
|||
<h2>Edit:</h2>
|
||||
<li><button class="delete">delete row</button></li>
|
||||
<li><button class="insert">insert row</button></li>
|
||||
<li><button class="all_presets">load all presets</button></li>
|
||||
<li><button class="all_presets">add unused presets</button></li>
|
||||
<li>Global Speed: <input type="text" style="width:30px" value="20" class="default_speed"><button class="set_speed">set</button></li>
|
||||
<h2>Export:</h2>
|
||||
<li><a><button class="export_sequence">export sequence</button></a></li>
|
||||
|
|
|
@ -483,12 +483,18 @@ $('button.export_presets').on({click: function() {
|
|||
$('button.all_presets').on({click: function() {
|
||||
api('getPresets', {}, function(response) {
|
||||
presets = response.result.presets
|
||||
loadData(presets.map(function(preset) {
|
||||
var seq = [].concat(data, presets.filter(function(preset) {
|
||||
return data.filter(function(row) {
|
||||
return row.preset == preset.id
|
||||
}).length == 0
|
||||
}).map(function(preset) {
|
||||
return {
|
||||
preset: preset.id,
|
||||
speed: parseInt($('input.default_speed').val(), 10)
|
||||
}
|
||||
}))
|
||||
|
||||
loadData(seq)
|
||||
})
|
||||
}})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user