test loading spinner on note page

This commit is contained in:
lutranf
2014-10-28 14:45:01 +01:00
parent 60e2f0dfc8
commit d744590989

View File

@@ -9,6 +9,7 @@
databap.pageInit = function() databap.pageInit = function()
{ {
databap.tmp('note', 'integer'); databap.tmp('note', 'integer');
var $Frame = $('#note_frame');
//Add note selection form //Add note selection form
$('#note_id').addDefaultValue('N° note'); $('#note_id').addDefaultValue('N° note');
@@ -16,19 +17,23 @@ databap.pageInit = function()
.addButton('ok', 'Ok', $('#note_form').submit, 'submit', 'heavy') .addButton('ok', 'Ok', $('#note_form').submit, 'submit', 'heavy')
.submit(function(){databap.goToInternalLink('note', $('#note_id').val())}); .submit(function(){databap.goToInternalLink('note', $('#note_id').val())});
$('#note_frame').css('height', 'calc(100% - '+($('#note_form').outerHeight()+14)+'px)'); $Frame.css('height', 'calc(100% - '+($('#note_form').outerHeight()+14)+'px)');
//Start fetching note //Start fetching note
var iNote = databap.vars.id; var iNote = databap.vars.id;
if(isNumeric(iNote) && iNote > 0 && iNote!=databap.tmp('note')) if(isNumeric(iNote) && iNote > 0 && iNote!=databap.tmp('note'))
{ {
$('#note_id').val(iNote).focus(); $('#note_id').val(iNote).focus();
//self.addBufferIcon(); self.addBufferIcon();
$('#note_frame').attr('src', 'index.php?a=note&id='+iNote); $Frame
.attr('src', 'index.php?a=note&id='+iNote)
.load(databap.resetIcon);
databap.tmp('note', iNote); databap.tmp('note', iNote);
} }
} }
/*
function onEndOfProcess() function onEndOfProcess()
{ {
databap.resetIcon(); databap.resetIcon();
@@ -40,4 +45,5 @@ function onEndOfProcess()
$Frame.find('#Display_Group').height('+=200px'); $Frame.find('#Display_Group').height('+=200px');
} }
*/
</script> </script>