FlightGear wiki:Instant-Refs: Difference between revisions

Jump to navigation Jump to search
m
→‎The Script: add stubs for event handlers to update the target (wiki/forum) and format (refs vs. quotes) - should be a NOP for now
m (→‎The Script: add stubs for event handlers to update the target (wiki/forum) and format (refs vs. quotes) - should be a NOP for now)
Line 476: Line 476:
// placeholder for now
// placeholder for now
}; // TemplateTable
}; // TemplateTable
var EventHandlers = {
updateTarget: function() {alert("not yet implement");},
updateFormat: function() {alert("not yet implement");},
}; // EventHandlers


// output methods (alert and jQuery for now)
// output methods (alert and jQuery for now)
Line 486: Line 491:
   // Show a jQuery dialog
   // Show a jQuery dialog
   jQueryDiag: function (msg) {
   jQueryDiag: function (msg) {
// TODO: add separate Format combo for changing the template to be used (e.g. for refs instead of quotes)
 
     var target_format = "<form name='target'>Target: <select name='selection' onChange='updateTarget()'><option value='0'>to wiki</option><option value='1'>to forum</option></select>Format: <select name='format' onChange='updateFormat()'><option value='0'>refonly</option><option value='1'>fgcquote</option></select></form>";
    // WIP: add separate Target/Format combo boxes for changing the template to be used (e.g. for refs instead of quotes)
     var target_format = "<form name='target'>Target: <select name='selection' onchange='EventHandlers.updateTarget();'><option value='0'>to wiki</option><option value='1'>to forum</option></select>Format: <select name='format' onchange='EventHandlers.updateFormat();'><option value='0'>refonly</option><option value='1'>fgcquote</option></select></form>";
     var diagDiv = $('<div id="MyDialog"><textarea id="quotedtext" rows="10"cols="80" style="width: 290px; height: 290px">' + msg + '</textarea>' + target_format + '</div>');
     var diagDiv = $('<div id="MyDialog"><textarea id="quotedtext" rows="10"cols="80" style="width: 290px; height: 290px">' + msg + '</textarea>' + target_format + '</div>');
     var diagParam = {
     var diagParam = {

Navigation menu