1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
|
Blob err = empty_blob; /* Error report */
Blob endScript = empty_blob; /* Script code to run at the
end. This content will be
combined into a single JS
function call, thus each
entry must end with a
semicolon. */
Stmt stmt = empty_Stmt;
const char *zAjax = P("ajax");
if(0!=zAjax){
if(0==strcmp("content",zAjax)){
fileedit_ajax_content();
}else if(0==strcmp("preview",zAjax)){
fileedit_ajax_preview();
|
<
|
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
|
Blob err = empty_blob; /* Error report */
Blob endScript = empty_blob; /* Script code to run at the
end. This content will be
combined into a single JS
function call, thus each
entry must end with a
semicolon. */
const char *zAjax = P("ajax");
if(0!=zAjax){
if(0==strcmp("content",zAjax)){
fileedit_ajax_content();
}else if(0==strcmp("preview",zAjax)){
fileedit_ajax_preview();
|
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
|
"in leaf checkins to be selected, but files may be edited via "
"non-leaf checkins by passing them as the <code>filename</code> "
"and <code>checkin</code> URL arguments to this page.</li>");
CX("</ul>");
}
CX("</div>"/*#fileedit-tab-help*/);
{
/* Dynamically populate the editor, display a any error
** in the err blob, and/or switch to tab #0, where the file
** selector lives... */
blob_appendf(&endScript,
"window.addEventListener('load',");
if(zRev && zFilename){
assert(0==blob_size(&err));
blob_appendf(&endScript,
"()=>fossil.page.loadFile(\"%j\",'%j')",
zFilename, cimi.zParentUuid);
|
|
<
|
|
|
|
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
|
"in leaf checkins to be selected, but files may be edited via "
"non-leaf checkins by passing them as the <code>filename</code> "
"and <code>checkin</code> URL arguments to this page.</li>");
CX("</ul>");
}
CX("</div>"/*#fileedit-tab-help*/);
{
/* Dynamically populate the editor, display any error in the err
** blob, and/or switch to tab #0, where the file selector
** lives... */
blob_appendf(&endScript,
"window.addEventListener('load',");
if(zRev && zFilename){
assert(0==blob_size(&err));
blob_appendf(&endScript,
"()=>fossil.page.loadFile(\"%j\",'%j')",
zFilename, cimi.zParentUuid);
|
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
|
blob_appendf(&endScript,
"fossil.page.tabs.switchToTab(0);\n");
blob_appendf(&endScript,"}");
}
blob_appendf(&endScript,", false);\n");
}
if(stmt.pStmt){
db_finalize(&stmt);
}
blob_reset(&err);
CheckinMiniInfo_cleanup(&cimi);
style_emit_script_fossil_bootstrap(0);
style_emit_script_fetch(0);
style_emit_script_tabs(0);
style_emit_script_confirmer(0);
style_emit_script_builtin(0, "fossil.page.fileedit.js");
if(blob_size(&endScript)>0){
style_emit_script_tag(0,0);
CX("(function(){\n");
CX("try{\n%b\n}"
"catch(e){"
|
<
<
<
|
|
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
|
blob_appendf(&endScript,
"fossil.page.tabs.switchToTab(0);\n");
blob_appendf(&endScript,"}");
}
blob_appendf(&endScript,", false);\n");
}
blob_reset(&err);
CheckinMiniInfo_cleanup(&cimi);
style_emit_script_fossil_bootstrap(0);
style_emit_script_fetch(0);
style_emit_script_tabs(0)/*also emits fossil.dom*/;
style_emit_script_confirmer(0);
style_emit_script_builtin(0, "fossil.page.fileedit.js");
if(blob_size(&endScript)>0){
style_emit_script_tag(0,0);
CX("(function(){\n");
CX("try{\n%b\n}"
"catch(e){"
|