44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
-
+
-
-
+
|
** with the current nonce, else no SCRIPT tag is emitted.
**
** Requires that builtin_emit_script_fossil_bootstrap() has already been
** called in order to initialize the window.fossil.page object.
*/
void ajax_emit_js_preview_modes(int addScriptTag){
if(addScriptTag){
style_emit_script_tag(0,0);
style_script_begin(__FILE__,__LINE__);
CX("\n");
}
CX("fossil.page.previewModes={"
"guess: %d, %d: 'guess', wiki: %d, %d: 'wiki',"
"htmlIframe: %d, %d: 'htmlIframe', "
"htmlInline: %d, %d: 'htmlInline', "
"text: %d, %d: 'text'"
"};\n",
AJAX_RENDER_GUESS, AJAX_RENDER_GUESS,
AJAX_RENDER_WIKI, AJAX_RENDER_WIKI,
AJAX_RENDER_HTML_IFRAME, AJAX_RENDER_HTML_IFRAME,
AJAX_RENDER_HTML_INLINE, AJAX_RENDER_HTML_INLINE,
AJAX_RENDER_PLAIN_TEXT, AJAX_RENDER_PLAIN_TEXT);
if(addScriptTag){
style_emit_script_tag(1,0);
style_script_end();
}
}
/*
** Returns a value from the ajax_render_modes enum, based on the
** given mime type string (which may be NULL), defaulting to
** AJAX_RENDER_PLAIN_TEXT.
|