fix duplicate check

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1775 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-02-02 23:37:50 +00:00
parent 13af77c1e4
commit ea2f231ad8
3 changed files with 26 additions and 5 deletions

View File

@ -209,7 +209,10 @@ puts {
<div id=savestreamform title="Save streamed content" <div id=savestreamform title="Save streamed content"
style="display: none"> style="display: none">
<div class=pre id=savestream_detail></div> <div class=pre id=savestream_detail></div>
<form id=savestream_form> <div id=savestream_retrieving>
<img src=/img/loading.gif> Retrieving details...
</div>
<form id=savestream_form class=hidden>
} }
puts "<input type=hidden name=dir value=\"$dir\">" puts "<input type=hidden name=dir value=\"$dir\">"
puts { puts {
@ -217,7 +220,7 @@ puts {
<tr> <tr>
<th> <th>
<label for="savestream_name"> <label for="savestream_name">
<b>Filename</b> <b>Enter Filename</b>
</label> </label>
</th> </th>
<td> <td>
@ -225,7 +228,9 @@ puts {
id="savestream_name" id="savestream_name"
value="" size=70 maxlength=255 value="" size=70 maxlength=255
class="text ui-widget-content ui-corner-all"> class="text ui-widget-content ui-corner-all">
<img id=savestream_spin src=/img/loading.gif> <span id=savestream_spin>
<img src=/img/loading.gif> Saving...
</span>
</td> </td>
</tr> </tr>
</table> </table>

View File

@ -231,6 +231,7 @@ function savestream_submit()
{ {
var s = $('#savestream_form').serialize(); var s = $('#savestream_form').serialize();
var sf = $('#save_stream').attr('file'); var sf = $('#save_stream').attr('file');
$('#savestream_name').disable();
$('#savestream_spin').show(); $('#savestream_spin').show();
$.get('/browse/savestream.jim?sfile=' + $.get('/browse/savestream.jim?sfile=' +
encodeURIComponent(sf) + '&' + s, encodeURIComponent(sf) + '&' + s,
@ -791,6 +792,11 @@ var dmenuclick = function(action, el, pos)
close: function() { $('#savestream_name').val(''); } close: function() { $('#savestream_name').val(''); }
}); });
$('#savestream_name').keyup(function(e) {
if (e.keyCode == $.ui.keyCode.ENTER)
savestream_submit();
});
$('#bmpdialogue').dialog({ $('#bmpdialogue').dialog({
autoOpen: false, autoOpen: false,
height: 'auto', width: 'auto', height: 'auto', width: 'auto',
@ -837,11 +843,20 @@ var dmenuclick = function(action, el, pos)
}); });
$('#save_stream').button().click(function() { $('#save_stream').button().click(function() {
$('#savestream_retrieving').show();
$('#savestream_detail').text('').hide();
$('#savestream_spin').hide(); $('#savestream_spin').hide();
$('#savestream_name').val('').enable();
$('#savestreamform').dialog('open'); $('#savestreamform').dialog('open');
$('#savestream_detail').load( $('#savestream_detail').load(
'/browse/ffmpeg.jim?file=' + '/browse/ffmpeg.jim?file=' +
encodeURIComponent($('#save_stream').attr('file'))); encodeURIComponent($('#save_stream').attr('file')),
function() {
$('#savestream_retrieving').hide();
$('#savestream_detail').show();
$('#savestream_form').show();
});
}); });
$('#selectall').click(function(e) { $('#selectall').click(function(e) {

View File

@ -224,7 +224,8 @@ rsv method insert {{table pending} {force 0}} {
set rec [$rsvdb query " set rec [$rsvdb query "
select ulslot from $tab select ulslot from $tab
where szCRID = '%s' where szCRID = '%s'
" $szCRID] and hsvc = '%s'
" $szCRID $hsvc]
if {[llength $rec] > 0} { if {[llength $rec] > 0} {
throw 20 "Duplicate reservation." throw 20 "Duplicate reservation."
return return