// use this to isolate the scope (function () { if (!configuration.showPageNotes) { return; } var SHOW_HIDE_ANIMATION_DURATION = 0; $(document).ready(function () { $axure.player.createPluginHost({ id: 'pageNotesHost', context: 'interface', title: 'Page Notes' }); generatePageNotes(); // $('#pageNotesHost').parent().resize(function () { // $('#pageNotesHost').height($(this).height()); // }); // bind to the page load $axure.page.bind('load.page_notes', function () { $('#pageNameHeader').html(""); $('#pageNotesContent').html(""); //populate the notes var notes = $axure.page.notes; if (notes) { var pageName = notes["pageName"]; $('#pageNameHeader').html(pageName); var showNames = notes["showNotesNames"] == "True"; for (var noteName in notes) { if (noteName != "pageName" && noteName != "showNotesNames") { if (showNames) { $('#pageNotesContent').append("
" + noteName + "
"); } $('#pageNotesContent').append("
" + notes[noteName] + "
"); } } } return false; }); }); function generatePageNotes() { var pageNotesUI = "
"; pageNotesUI += "
"; pageNotesUI += "
"; pageNotesUI += ""; pageNotesUI += "
"; $('#pageNotesHost').html(pageNotesUI); } })();