User:DannyS712/EFFPRH/sandbox.js: Difference between revisions

Content deleted Content added
try to actual launch a vue display
m createMwApp, function names
Line 33:
);
const reporterName = $( this ).text();
EFFPRH.addReportHandleraddHandlerLink( $editSectionLinks, reporterName, sectionNum );
} );
};
Line 56:
* Add a link next to the edit section link that will launch the report handler.
*/
EFFPRH.addReportHandleraddHandlerLink = function ( $editSectionLinks, reporterName, sectionNum ) {
console.log( reporterName, sectionNum );
const $handlerLink = $( '<a>' )
Line 63:
function () {
console.log( 'Should launch for: ', reporterName, sectionNum );
EFFPRH.showReportershowHandler( reporterName, sectionNum );
}
);
Line 76:
* Actually show the handler for a given reporter name and section number.
*/
EFFPRH.showReportershowHandler = function ( reporterName, sectionNum ) {
const targetDivId = 'script-EFFPRH-' + sectionNum;
const handlerApp = {
new Vue( {
el: '#' + targetDivId,
data: function () {
return {
Line 87 ⟶ 86:
},
template: `<div>Section {{ sectionNum }} for report by {{ reporterName }}.</div>`
} );
Vue.createMwApp( handlerApp ).mount( '#' + targetDivId );
};