Various changes
This commit is contained in:
@ -1,24 +1,39 @@
|
||||
$(document).ready(() ->
|
||||
$('.channel-path').click((e) ->
|
||||
newPath = prompt('New channel directory path', $('.channel-path').val())
|
||||
if newPath
|
||||
payload =
|
||||
directory_path: newPath
|
||||
channelId = $('#channel-id').val()
|
||||
$.post('/channel/' + channelId + '/edit/directory_path', payload, (data) ->
|
||||
if data == 'success'
|
||||
$('.channel-path span').text(newPath)
|
||||
)
|
||||
)
|
||||
|
||||
$('.video-status').click((e) ->
|
||||
newStatus = prompt('New video status').toLowerCase()
|
||||
payload =
|
||||
status: newStatus
|
||||
videoId = $('#video-id').val()
|
||||
$.post('/video/' + videoId + '/edit/status', payload, (data) ->
|
||||
if data == 'success'
|
||||
$('.video-status span').text(capitalizeWord(newStatus))
|
||||
)
|
||||
newStatus = prompt('New video status', $('.video-status').val())
|
||||
if newStatus
|
||||
newStatus = newStatus.toLowerCase()
|
||||
payload =
|
||||
status: newStatus
|
||||
videoId = $('#video-id').val()
|
||||
$.post('/video/' + videoId + '/edit/status', payload, (data) ->
|
||||
if data == 'success'
|
||||
$('.video-status span').text(capitalizeWord(newStatus))
|
||||
)
|
||||
)
|
||||
|
||||
$('.video-serial').click((e) ->
|
||||
newSerial = prompt('New video serial number')
|
||||
payload =
|
||||
serial: newSerial
|
||||
videoId = $('#video-id').val()
|
||||
$.post('/video/' + videoId + '/edit/serial', payload, (data) ->
|
||||
if data == 'success'
|
||||
$('.video-serial span').text(newSerial)
|
||||
)
|
||||
newSerial = prompt('New video serial number', $('.video-serial').val())
|
||||
if newSerial
|
||||
payload =
|
||||
serial: newSerial
|
||||
videoId = $('#video-id').val()
|
||||
$.post('/video/' + videoId + '/edit/serial', payload, (data) ->
|
||||
if data == 'success'
|
||||
$('.video-serial span').text(newSerial)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user