Always create new album in current album

This commit is contained in:
Tobias Reich 2016-10-25 18:40:00 +02:00
parent a0abb1a460
commit 635b31eb0b
2 changed files with 4 additions and 12 deletions

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -170,7 +170,7 @@ album.add = function(albumID = 0) {
const action = function(data) {
let title = data.title
let parent = data.parent
let parent = albumID
const isNumber = (n) => (!isNaN(parseFloat(n)) && isFinite(n))
@ -196,16 +196,8 @@ album.add = function(albumID = 0) {
api.post('Albums::get', { parent: -1 }, function(data) {
let cmbxOptions = `
<select name='parent'>
<option value='0'>- None -</option>
${ buildAlbumOptions(data.albums, albumID) }
</select>
`
let msg = `
<p>Enter a title for the new album: <input class='text' name='title' type='text' maxlength='50' placeholder='Title' value='Untitled'></p>
<p>Select the parent album:<br/> ${ cmbxOptions }</p>
`
basicModal.show({