retrieve SAP notes
This commit is contained in:
@@ -1,9 +1,43 @@
|
||||
<div id="article">
|
||||
<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>
|
||||
<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()
|
||||
{
|
||||
self.goToExternalLink('http://service.sap.com/sap/support/notes/'+self.vars.id);
|
||||
databap.tmp('note', 'integer');
|
||||
|
||||
//Add note selection form
|
||||
$('#note_id').addDefaultValue('N° note');
|
||||
$('#note_form')
|
||||
.addButton('ok', 'Ok', $('#note_form').submit, 'submit', 'heavy')
|
||||
.submit(function(){databap.goToInternalLink('note', $('#note_id').val())});
|
||||
|
||||
$('#note_frame').css('height', 'calc(100% - '+($('#note_form').outerHeight()+14)+'px)');
|
||||
|
||||
//Start fetching note
|
||||
var iNote = databap.vars.id;
|
||||
if(isNumeric(iNote) && iNote > 0 && iNote!=databap.tmp('note'))
|
||||
{
|
||||
$('#note_id').val(iNote).focus();
|
||||
self.addBufferIcon();
|
||||
$('#note_frame').attr('src', 'index.php?a=note&id='+iNote);
|
||||
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>
|
||||
Reference in New Issue
Block a user