Files
databap/masks/note.html
2014-12-13 03:18:04 +01:00

52 lines
1.5 KiB
HTML
Executable File

<div id="note">
<!-- <p class="loading_box step_box round"><i class="fa fa-60 fa-inline fa-spin fa-c-loading"></i>La note est en cours de chargement...</p> -->
<form id="note_form">
<input type="text" id="note_id" class="round" />
</form>
<iframe id="note_frame" class="round" src=""></iframe>
</div>
<script type="text/javascript">
databap.pageInit = function()
{
databap.tmp('note', 'integer');
var $Frame = $('#note_frame');
//Add note selection form
$('#note_id').addDefaultValue('N° note');
$('#note_form')
.addButton('ok', 'Ok', function($This){$This.submit();}, 'submit', 'heavy')
.submit(function(){databap.goToInternalLink('note', $('#note_id').val())});
$Frame
.css('height', 'calc(100% - '+($('#note_form').outerHeight()+10)+'px)')
.hide();
//Start fetching note
var iNote = databap.vars.id;
if(isNumeric(iNote) && iNote > 0 && iNote!=databap.tmp('note'))
{
$('#note_id').val(iNote).focus();
self.addBufferIcon();
$Frame
.show('slow')
.attr('src', 'index.php?a=note&id='+iNote)
.load(databap.resetIcon);
databap.tmp('note', iNote);
}
}
/*
function onEndOfProcess()
{
databap.resetIcon();
var $Frame = $('#note_frame').contents().find('body').css({'margin':0, 'width':'calc(100% - 6px)'});
var $Form = $Frame.find('#htmlb_form_1').css('margin-bottom', 0);
var $Rows = $Form.children('table').eq(2).find('tbody').children();
$Rows.filter(':lt(2), :eq(3)').add('#htmlb_form_2').hide();
$Frame.find('#Display_Group').height('+=200px');
}
*/
</script>