| | @@ -1446,13 +1446,13 @@ |
| 1446 | 1446 | |
| 1447 | 1447 | /* |
| 1448 | 1448 | ** Emits utility script code specific to the /fileedit page. |
| 1449 | 1449 | */ |
| 1450 | 1450 | static void fileedit_emit_page_script(){ |
| 1451 | | - style_emit_script_tag(0); |
| 1452 | | - CX("%s\n", builtin_text("fossil.page.fileedit.js")); |
| 1453 | | - style_emit_script_tag(1); |
| 1451 | + style_emit_script_fetch(); |
| 1452 | + style_emit_script_tabs(); |
| 1453 | + style_emit_script_builtin("fossil.page.fileedit.js"); |
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | 1456 | /* |
| 1457 | 1457 | ** WEBPAGE: fileedit |
| 1458 | 1458 | ** |
| | @@ -1516,194 +1516,254 @@ |
| 1516 | 1516 | ** thus have already caused us to skipped to the end of the page to |
| 1517 | 1517 | ** render the errors. Any up-coming errors, barring malloc failure |
| 1518 | 1518 | ** or similar, are not "that" fatal. We can/should continue |
| 1519 | 1519 | ** rendering the page, then output the error message at the end. |
| 1520 | 1520 | ********************************************************************/ |
| 1521 | | - CX("<h1>Editing:</h1>"); |
| 1522 | | - CX("<p class='fileedit-hint'>"); |
| 1523 | | - CX("File: " |
| 1524 | | - "[<a id='finfo-link' href='#'>info</a>] " |
| 1525 | | - /* %R/finfo?name=%T&m=%!S */ |
| 1526 | | - "<code id='finfo-file-name'>(loading)</code><br>"); |
| 1527 | | - CX("Checkin Version: " |
| 1528 | | - "[<a id='r-link' href='#'>info</a>] " |
| 1529 | | - /* %R/info/%!S */ |
| 1530 | | - "<code id='r-label'>(loading...)</code><br>" |
| 1531 | | - ); |
| 1532 | | - CX("Permalink: <code>" |
| 1533 | | - "<a id='permalink' href='#'>(loading...)</a></code><br>" |
| 1534 | | - "(Clicking the permalink will reload the page and discard " |
| 1535 | | - "all edits!)", |
| 1536 | | - zFilename, cimi.zParentUuid, |
| 1537 | | - zFilename, cimi.zParentUuid); |
| 1538 | | - CX("</p>"); |
| 1539 | 1521 | CX("<p>This page is <em>NEW AND EXPERIMENTAL</em>. " |
| 1540 | 1522 | "USE AT YOUR OWN RISK, preferably on a test " |
| 1541 | 1523 | "repo.</p>\n"); |
| 1542 | | - |
| 1543 | | - CX("<form action='#' method='POST' " |
| 1544 | | - "class='fileedit' id='fileedit-form' " |
| 1545 | | - "onsubmit='function(e){" |
| 1546 | | - "e.preventDefault(); e.stopPropagation(); return false;" |
| 1547 | | - "}'>\n"); |
| 1524 | + |
| 1525 | + /* |
| 1526 | + ** We don't strictly need a FORM because we manually cherry-pick and |
| 1527 | + ** submit the form data, but it being in a form allows us to easily |
| 1528 | + ** use the FormData type for serialization. |
| 1529 | + ** |
| 1530 | + ** TODO?: we can almost certainly replace this element with a plain |
| 1531 | + ** DIV, which would eliminate the event-handling hassles of trying |
| 1532 | + ** to suppress the submit... but it would also eliminate the option |
| 1533 | + ** of using HTML form field validation. |
| 1534 | + */ |
| 1535 | + CX("<form action='#' method='POST' class='fileedit' " |
| 1536 | + "id='fileedit-form'>"); |
| 1548 | 1537 | |
| 1549 | 1538 | /******* Hidden fields *******/ |
| 1550 | 1539 | CX("<input type='hidden' name='r' value='%s'>", |
| 1551 | 1540 | cimi.zParentUuid); |
| 1552 | 1541 | CX("<input type='hidden' name='file' value='%T'>", |
| 1553 | 1542 | zFilename); |
| 1554 | 1543 | |
| 1555 | | - /******* Content *******/ |
| 1556 | | - CX("<h3>File Content</h3>\n"); |
| 1557 | | - CX("<textarea name='content' id='fileedit-content' " |
| 1558 | | - "rows='20' cols='80'>"); |
| 1559 | | - CX("Loading..."); |
| 1560 | | - CX("</textarea>\n"); |
| 1561 | | - |
| 1544 | + /* Status bar */ |
| 1562 | 1545 | CX("<div id='fossil-status-bar'>Async. status messages will go " |
| 1563 | | - "here.</div>\n"); |
| 1564 | | - |
| 1565 | | - /******* Flags/options *******/ |
| 1566 | | - CX("<fieldset class='fileedit-options' id='options'>" |
| 1567 | | - "<legend>Options</legend><div>" |
| 1568 | | - /* Chrome does not sanely lay out multiple |
| 1569 | | - ** fieldset children after the <legend>, so |
| 1570 | | - ** a containing div is necessary. */); |
| 1571 | | - style_labeled_checkbox("cb-dry-run", |
| 1572 | | - "dry_run", "Dry-run?", "1", |
| 1573 | | - "In dry-run mode, the Save button performs " |
| 1574 | | - "all work needed for saving but then rolls " |
| 1575 | | - "back the transaction, and thus does not " |
| 1576 | | - "really save.", |
| 1577 | | - 1); |
| 1578 | | - style_labeled_checkbox("cb-allow-fork", |
| 1579 | | - "allow_fork", "Allow fork?", "1", |
| 1580 | | - "Allow saving to create a fork?", |
| 1581 | | - cimi.flags & CIMINI_ALLOW_FORK); |
| 1582 | | - style_labeled_checkbox("cb-allow-older", |
| 1583 | | - "allow_older", "Allow older?", "1", |
| 1584 | | - "Allow saving against a parent version " |
| 1585 | | - "which has a newer timestamp?", |
| 1586 | | - cimi.flags & CIMINI_ALLOW_OLDER); |
| 1587 | | - style_labeled_checkbox("cb-exec-bit", |
| 1588 | | - "exec_bit", "Executable?", "1", |
| 1589 | | - "Set the executable bit?", |
| 1590 | | - PERM_EXE==cimi.filePerm); |
| 1591 | | - style_labeled_checkbox("cb-allow-merge-conflict", |
| 1592 | | - "allow_merge_conflict", |
| 1593 | | - "Allow merge conflict markers?", "1", |
| 1594 | | - "Allow saving even if the content contains " |
| 1595 | | - "what appear to be fossil merge conflict " |
| 1596 | | - "markers?", |
| 1597 | | - cimi.flags & CIMINI_ALLOW_MERGE_MARKER); |
| 1598 | | - style_labeled_checkbox("cb-prefer-delta", |
| 1599 | | - "prefer_delta", |
| 1600 | | - "Prefer delta manifest?", "1", |
| 1601 | | - "Will create a delta manifest, instead of " |
| 1602 | | - "baseline, if conditions are favorable to do " |
| 1603 | | - "so. This option is only a suggestion.", |
| 1604 | | - cimi.flags & CIMINI_PREFER_DELTA); |
| 1605 | | - style_select_list_int("select-eol-style", |
| 1606 | | - "eol", "EOL Style", |
| 1607 | | - "EOL conversion policy, noting that " |
| 1608 | | - "form-processing may implicitly change the " |
| 1609 | | - "line endings of the input.", |
| 1610 | | - (cimi.flags & CIMINI_CONVERT_EOL_UNIX) |
| 1611 | | - ? 1 : (cimi.flags & CIMINI_CONVERT_EOL_WINDOWS |
| 1612 | | - ? 2 : 0), |
| 1613 | | - "Inherit", 0, |
| 1614 | | - "Unix", 1, |
| 1615 | | - "Windows", 2, |
| 1616 | | - NULL); |
| 1617 | | - style_select_list_int("select-font-size", |
| 1618 | | - "editor_font_size", "Editor Font Size", |
| 1619 | | - NULL/*tooltip*/, |
| 1620 | | - 100, |
| 1621 | | - "100%", 100, "125%", 125, |
| 1622 | | - "150%", 150, "175%", 175, |
| 1623 | | - "200%", 200, NULL); |
| 1624 | | - |
| 1625 | | - CX("</div></fieldset>") /* end of checkboxes */; |
| 1626 | | - |
| 1627 | | - /******* Comment *******/ |
| 1628 | | - CX("<a id='comment'></a>"); |
| 1629 | | - CX("<fieldset><legend>Commit message</legend><div>"); |
| 1630 | | - CX("<textarea name='comment' rows='3' cols='80' " |
| 1631 | | - "id='fileedit-comment'>"); |
| 1632 | | - /* ^^^ adding the 'required' attribute means we cannot even submit |
| 1633 | | - ** for PREVIEW mode if it's empty :/. */ |
| 1634 | | - if(blob_size(&cimi.comment)){ |
| 1635 | | - CX("%h", blob_str(&cimi.comment)); |
| 1636 | | - } |
| 1637 | | - CX("</textarea>\n"); |
| 1638 | | - CX("<div class='fileedit-hint'>Comments use the Fossil wiki markup " |
| 1639 | | - "syntax.</div>\n"/*TODO: select for fossil/md/plain text*/); |
| 1640 | | - CX("</div></fieldset>\n"); |
| 1641 | | - |
| 1642 | | - /******* Buttons *******/ |
| 1643 | | - CX("<a id='buttons'></a>"); |
| 1644 | | - CX("<fieldset class='fileedit-options'>" |
| 1645 | | - "<legend>Ask the server to...</legend><div>"); |
| 1646 | | - CX("<button id='fileedit-btn-commit'>Commit</button>"); |
| 1647 | | - CX("<button id='fileedit-btn-diffsbs'>Diff (SBS)</button>"); |
| 1648 | | - CX("<button id='fileedit-btn-diffu'>Diff (Unified)</button>"); |
| 1649 | | - CX("<button id='fileedit-btn-preview'>Preview</button>"); |
| 1650 | | - /* Default preview rendering mode selection... */ |
| 1651 | | - previewRenderMode = fileedit_render_mode_for_mimetype(zFileMime); |
| 1652 | | - style_select_list_int("select-preview-mode", |
| 1653 | | - "preview_render_mode", |
| 1654 | | - "Preview Mode", |
| 1655 | | - "Preview mode format.", |
| 1656 | | - previewRenderMode, |
| 1657 | | - "Guess", FE_RENDER_GUESS, |
| 1658 | | - "Wiki/Markdown", FE_RENDER_WIKI, |
| 1659 | | - "HTML (iframe)", FE_RENDER_HTML, |
| 1660 | | - "Plain Text", FE_RENDER_PLAIN_TEXT, |
| 1661 | | - NULL); |
| 1662 | | - /* |
| 1663 | | - ** Set up a JS-side mapping of the FE_RENDER_xyz values. This is |
| 1664 | | - ** used for dynamically toggling certain UI components on and off. |
| 1665 | | - */ |
| 1666 | | - blob_appendf(&endScript, "fossil.page.previewModes={" |
| 1667 | | - "guess: %d, %d: 'guess', wiki: %d, %d: 'wiki'," |
| 1668 | | - "html: %d, %d: 'html', text: %d, %d: 'text'" |
| 1669 | | - "};\n", |
| 1670 | | - FE_RENDER_GUESS, FE_RENDER_GUESS, |
| 1671 | | - FE_RENDER_WIKI, FE_RENDER_WIKI, |
| 1672 | | - FE_RENDER_HTML, FE_RENDER_HTML, |
| 1673 | | - FE_RENDER_PLAIN_TEXT, FE_RENDER_PLAIN_TEXT); |
| 1674 | | - |
| 1675 | | - /* Allow selection of HTML preview iframe height */ |
| 1676 | | - previewHtmlHeight = atoi(PD("preview_html_ems","0")); |
| 1677 | | - if(!previewHtmlHeight){ |
| 1678 | | - previewHtmlHeight = 40; |
| 1679 | | - } |
| 1680 | | - style_select_list_int("select-preview-html-ems", |
| 1681 | | - "preview_html_ems", |
| 1682 | | - "HTML Preview IFrame Height (EMs)", |
| 1683 | | - "Height (in EMs) of the iframe used for " |
| 1684 | | - "HTML preview", |
| 1685 | | - previewHtmlHeight, |
| 1686 | | - "", 20, "", 40, |
| 1687 | | - "", 60, "", 80, |
| 1688 | | - "", 100, NULL); |
| 1689 | | - /* Selection of line numbers for text preview */ |
| 1690 | | - style_labeled_checkbox("cb-line-numbers", |
| 1691 | | - "preview_ln", |
| 1692 | | - "Add line numbers to plain-text previews?", |
| 1693 | | - "1", |
| 1694 | | - "If on, plain-text files (only) will get " |
| 1695 | | - "line numbers added to the preview.", |
| 1696 | | - P("preview_ln")!=0); |
| 1697 | | - |
| 1698 | | - CX("</div></fieldset>"); |
| 1699 | | - |
| 1546 | + "here.</div>\n"/* will be moved into the tab container via JS */); |
| 1547 | + |
| 1548 | + /* Main tab container... */ |
| 1549 | + CX("<div id='fileedit-tabs' class='tab-container'></div>"); |
| 1550 | + |
| 1551 | + /***** File/version info tab *****/ |
| 1552 | + { |
| 1553 | + CX("<div id='fileedit-tab-version' " |
| 1554 | + "data-tab-parent='fileedit-tabs' " |
| 1555 | + "data-tab-label='Version Info'" |
| 1556 | + ">"); |
| 1557 | + CX("File: " |
| 1558 | + "[<a id='finfo-link' href='#'>/finfo</a>] " |
| 1559 | + /* %R/finfo?name=%T&m=%!S */ |
| 1560 | + "<code id='finfo-file-name'>(loading)</code><br>"); |
| 1561 | + CX("Checkin Version: " |
| 1562 | + "[<a id='r-link' href='#'>/info</a>] " |
| 1563 | + /* %R/info/%!S */ |
| 1564 | + "<code id='r-label'>(loading...)</code><br>" |
| 1565 | + ); |
| 1566 | + CX("Permalink: <code>" |
| 1567 | + "<a id='permalink' href='#'>(loading...)</a></code><br>" |
| 1568 | + "(Clicking the permalink will reload the page and discard " |
| 1569 | + "all edits!)", |
| 1570 | + zFilename, cimi.zParentUuid, |
| 1571 | + zFilename, cimi.zParentUuid); |
| 1572 | + CX("</div>"/*#fileedit-tab-version*/); |
| 1573 | + } |
| 1574 | + |
| 1575 | + /******* Content tab *******/ |
| 1576 | + { |
| 1577 | + CX("<div id='fileedit-tab-content' " |
| 1578 | + "data-tab-parent='fileedit-tabs' " |
| 1579 | + "data-tab-label='File Content'" |
| 1580 | + ">"); |
| 1581 | + CX("<textarea name='content' id='fileedit-content-editor' " |
| 1582 | + "rows='20' cols='80'>"); |
| 1583 | + CX("Loading..."); |
| 1584 | + CX("</textarea>\n"); |
| 1585 | + CX("</div>"/*#tab-file-content*/); |
| 1586 | + } |
| 1587 | + |
| 1588 | + /****** Preview tab ******/ |
| 1589 | + { |
| 1590 | + CX("<div id='fileedit-tab-preview' " |
| 1591 | + "data-tab-parent='fileedit-tabs' " |
| 1592 | + "data-tab-label='Preview'" |
| 1593 | + ">"); |
| 1594 | + |
| 1595 | + CX("<fieldset class='fileedit-options'>" |
| 1596 | + "<legend>Preview...</legend><div>"); |
| 1597 | + |
| 1598 | + CX("<div class='preview-controls'>"); |
| 1599 | + CX("<button>Refresh</button>"); |
| 1600 | + /* Default preview rendering mode selection... */ |
| 1601 | + previewRenderMode = fileedit_render_mode_for_mimetype(zFileMime); |
| 1602 | + style_select_list_int("select-preview-mode", |
| 1603 | + "preview_render_mode", |
| 1604 | + "Preview Mode", |
| 1605 | + "Preview mode format.", |
| 1606 | + previewRenderMode, |
| 1607 | + "Guess", FE_RENDER_GUESS, |
| 1608 | + "Wiki/Markdown", FE_RENDER_WIKI, |
| 1609 | + "HTML (iframe)", FE_RENDER_HTML, |
| 1610 | + "Plain Text", FE_RENDER_PLAIN_TEXT, |
| 1611 | + NULL); |
| 1612 | + /* |
| 1613 | + ** Set up a JS-side mapping of the FE_RENDER_xyz values. This is |
| 1614 | + ** used for dynamically toggling certain UI components on and off. |
| 1615 | + */ |
| 1616 | + blob_appendf(&endScript, "fossil.page.previewModes={" |
| 1617 | + "guess: %d, %d: 'guess', wiki: %d, %d: 'wiki'," |
| 1618 | + "html: %d, %d: 'html', text: %d, %d: 'text'" |
| 1619 | + "};\n", |
| 1620 | + FE_RENDER_GUESS, FE_RENDER_GUESS, |
| 1621 | + FE_RENDER_WIKI, FE_RENDER_WIKI, |
| 1622 | + FE_RENDER_HTML, FE_RENDER_HTML, |
| 1623 | + FE_RENDER_PLAIN_TEXT, FE_RENDER_PLAIN_TEXT); |
| 1624 | + /* Allow selection of HTML preview iframe height */ |
| 1625 | + previewHtmlHeight = atoi(PD("preview_html_ems","0")); |
| 1626 | + if(!previewHtmlHeight){ |
| 1627 | + previewHtmlHeight = 40; |
| 1628 | + } |
| 1629 | + style_select_list_int("select-preview-html-ems", |
| 1630 | + "preview_html_ems", |
| 1631 | + "HTML Preview IFrame Height (EMs)", |
| 1632 | + "Height (in EMs) of the iframe used for " |
| 1633 | + "HTML preview", |
| 1634 | + previewHtmlHeight, |
| 1635 | + "", 20, "", 40, |
| 1636 | + "", 60, "", 80, |
| 1637 | + "", 100, NULL); |
| 1638 | + /* Selection of line numbers for text preview */ |
| 1639 | + style_labeled_checkbox("cb-line-numbers", |
| 1640 | + "preview_ln", |
| 1641 | + "Add line numbers to plain-text previews?", |
| 1642 | + "1", |
| 1643 | + "If on, plain-text files (only) will get " |
| 1644 | + "line numbers added to the preview.", |
| 1645 | + P("preview_ln")!=0); |
| 1646 | + CX("</div></fieldset>"/*.fileedit-options*/); |
| 1647 | + CX("<div id='fileedit-tab-preview-wrapper'></div>"); |
| 1648 | + CX("</div>"/*#fileedit-tab-preview*/); |
| 1649 | + } |
| 1650 | + |
| 1651 | + /****** Diff tab ******/ |
| 1652 | + { |
| 1653 | + CX("<div id='fileedit-tab-diff' " |
| 1654 | + "data-tab-parent='fileedit-tabs' " |
| 1655 | + "data-tab-label='Diff'" |
| 1656 | + ">"); |
| 1657 | + CX("<div id='fileedit-tab-diff-buttons'>" |
| 1658 | + "<button class='sbs'>Side-by-side</button>" |
| 1659 | + "<button class='unified'>Unified</button>" |
| 1660 | + "</div>"); |
| 1661 | + CX("<div id='fileedit-tab-diff-wrapper'>" |
| 1662 | + "Diffs will be shown here." |
| 1663 | + "</div>"); |
| 1664 | + CX("</div>"); |
| 1665 | + } |
| 1666 | + |
| 1667 | + |
| 1668 | + /****** Commit ******/ |
| 1669 | + CX("<div id='fileedit-tab-commit' " |
| 1670 | + "data-tab-parent='fileedit-tabs' " |
| 1671 | + "data-tab-label='Commit'" |
| 1672 | + ">"); |
| 1673 | + |
| 1674 | + { |
| 1675 | + /******* Flags/options *******/ |
| 1676 | + CX("<fieldset class='fileedit-options'>" |
| 1677 | + "<legend>Options</legend><div>" |
| 1678 | + /* Chrome does not sanely lay out multiple |
| 1679 | + ** fieldset children after the <legend>, so |
| 1680 | + ** a containing div is necessary. */); |
| 1681 | + style_labeled_checkbox("cb-dry-run", |
| 1682 | + "dry_run", "Dry-run?", "1", |
| 1683 | + "In dry-run mode, the Save button performs " |
| 1684 | + "all work needed for saving but then rolls " |
| 1685 | + "back the transaction, and thus does not " |
| 1686 | + "really save.", |
| 1687 | + 1); |
| 1688 | + style_labeled_checkbox("cb-allow-fork", |
| 1689 | + "allow_fork", "Allow fork?", "1", |
| 1690 | + "Allow saving to create a fork?", |
| 1691 | + cimi.flags & CIMINI_ALLOW_FORK); |
| 1692 | + style_labeled_checkbox("cb-allow-older", |
| 1693 | + "allow_older", "Allow older?", "1", |
| 1694 | + "Allow saving against a parent version " |
| 1695 | + "which has a newer timestamp?", |
| 1696 | + cimi.flags & CIMINI_ALLOW_OLDER); |
| 1697 | + style_labeled_checkbox("cb-exec-bit", |
| 1698 | + "exec_bit", "Executable?", "1", |
| 1699 | + "Set the executable bit?", |
| 1700 | + PERM_EXE==cimi.filePerm); |
| 1701 | + style_labeled_checkbox("cb-allow-merge-conflict", |
| 1702 | + "allow_merge_conflict", |
| 1703 | + "Allow merge conflict markers?", "1", |
| 1704 | + "Allow saving even if the content contains " |
| 1705 | + "what appear to be fossil merge conflict " |
| 1706 | + "markers?", |
| 1707 | + cimi.flags & CIMINI_ALLOW_MERGE_MARKER); |
| 1708 | + style_labeled_checkbox("cb-prefer-delta", |
| 1709 | + "prefer_delta", |
| 1710 | + "Prefer delta manifest?", "1", |
| 1711 | + "Will create a delta manifest, instead of " |
| 1712 | + "baseline, if conditions are favorable to " |
| 1713 | + "do so. This option is only a suggestion.", |
| 1714 | + cimi.flags & CIMINI_PREFER_DELTA); |
| 1715 | + style_select_list_int("select-eol-style", |
| 1716 | + "eol", "EOL Style", |
| 1717 | + "EOL conversion policy, noting that " |
| 1718 | + "form-processing may implicitly change the " |
| 1719 | + "line endings of the input.", |
| 1720 | + (cimi.flags & CIMINI_CONVERT_EOL_UNIX) |
| 1721 | + ? 1 : (cimi.flags & CIMINI_CONVERT_EOL_WINDOWS |
| 1722 | + ? 2 : 0), |
| 1723 | + "Inherit", 0, |
| 1724 | + "Unix", 1, |
| 1725 | + "Windows", 2, |
| 1726 | + NULL); |
| 1727 | +#if 0 |
| 1728 | + style_select_list_int("select-font-size", |
| 1729 | + "editor_font_size", "Editor Font Size", |
| 1730 | + NULL/*tooltip*/, |
| 1731 | + 100, |
| 1732 | + "100%", 100, "125%", 125, |
| 1733 | + "150%", 150, "175%", 175, |
| 1734 | + "200%", 200, NULL); |
| 1735 | +#endif |
| 1736 | + CX("</div></fieldset>"/*checkboxes*/); |
| 1737 | + } |
| 1738 | + |
| 1739 | + { /******* Comment *******/ |
| 1740 | + CX("<fieldset class='fileedit-options'>" |
| 1741 | + "<legend>Message (required)</legend><div>"); |
| 1742 | + CX("<input type='text' name='comment' " |
| 1743 | + "id='fileedit-comment'>"); |
| 1744 | + /* ^^^ adding the 'required' attribute means we cannot even |
| 1745 | + submit for PREVIEW mode if it's empty :/. */ |
| 1746 | + if(blob_size(&cimi.comment)){ |
| 1747 | + blob_appendf(&endScript, |
| 1748 | + "document.querySelector('#fileedit-comment').value=" |
| 1749 | + "\"%h\";\n", blob_str(&cimi.comment)); |
| 1750 | + } |
| 1751 | + CX("</input>\n"); |
| 1752 | + CX("<div class='fileedit-hint'>Comments use the Fossil wiki markup " |
| 1753 | + "syntax.</div>\n"/*TODO: select for fossil/md/plain text*/); |
| 1754 | + CX("</div></fieldset>\n"/*commit comment*/); |
| 1755 | + CX("<div>" |
| 1756 | + "<button id='fileedit-btn-commit'>Commit</button>" |
| 1757 | + "</div>\n"); |
| 1758 | + CX("<div id='fileedit-manifest'></div>\n"); |
| 1759 | + } |
| 1760 | + |
| 1761 | + CX("</div>"/*#fileedit-tab-commit*/); |
| 1762 | + |
| 1700 | 1763 | /******* End of form *******/ |
| 1701 | 1764 | CX("</form>\n"); |
| 1702 | | - |
| 1703 | | - CX("<div id='ajax-target'>%s</div>" |
| 1704 | | - /* this is where preview/diff go */); |
| 1705 | 1765 | |
| 1706 | 1766 | /* Dynamically populate the editor... */ |
| 1707 | 1767 | blob_appendf(&endScript, |
| 1708 | 1768 | "fossil.page.loadFile('%j','%j');", |
| 1709 | 1769 | zFilename, cimi.zParentUuid); |
| | @@ -1717,11 +1777,10 @@ |
| 1717 | 1777 | CX("<div class='fileedit-error-report'>%s</div>", |
| 1718 | 1778 | blob_str(&err)); |
| 1719 | 1779 | } |
| 1720 | 1780 | blob_reset(&err); |
| 1721 | 1781 | CheckinMiniInfo_cleanup(&cimi); |
| 1722 | | - style_emit_script_fetch(); |
| 1723 | 1782 | fileedit_emit_page_script(); |
| 1724 | 1783 | if(blob_size(&endScript)>0){ |
| 1725 | 1784 | style_emit_script_tag(0); |
| 1726 | 1785 | CX("(function(){\n"); |
| 1727 | 1786 | CX("try{\n%b\n}catch(e){console.error('Exception:',e)}\n", |
| 1728 | 1787 | |