Fossil

Diff
Login

Diff

Differences From Artifact [53c86bb6ec]:

To Artifact [b50bca957e]:


1703
1704
1705
1706
1707
1708
1709

1710
1711




1712
1713
1714
1715



1716
1717
1718
1719
1720
1721
1722
1703
1704
1705
1706
1707
1708
1709
1710


1711
1712
1713
1714
1715
1716


1717
1718
1719
1720
1721
1722
1723
1724
1725
1726







+
-
-
+
+
+
+


-
-
+
+
+







  {
    CX("<div id='fileedit-tab-content' "
       "data-tab-parent='fileedit-tabs' "
       "data-tab-label='File Content' "
       "class='hidden'"
       ">");
    CX("<div class='flex-container flex-row child-gap-small'>");
    CX("<div class='input-with-label'>"
    CX("<button class='fileedit-content-reload confirmer' "
       "title='Reload the file from the server, discarding "
       "<button class='fileedit-content-reload confirmer' "
       ">Discard &amp; Reload</button>"
       "<div class='help-buttonlet'>"
       "Reload the file from the server, discarding "
       "any local edits. To help avoid accidental loss of "
       "edits, it requires confirmation (a second click) within "
       "a few seconds or it will not reload.'"
       ">Discard &amp; Reload</button>");
       "a few seconds or it will not reload."
       "</div>"
       "</div>");
    style_select_list_int("select-font-size",
                          "editor_font_size", "Editor font size",
                          NULL/*tooltip*/,
                          100,
                          "100%", 100, "125%", 125,
                          "150%", 150, "175%", 175,
                          "200%", 200, NULL);
1744
1745
1746
1747
1748
1749
1750


1751

1752
1753

1754
1755
1756





1757
1758
1759
1760
1761
1762
1763
1748
1749
1750
1751
1752
1753
1754
1755
1756

1757


1758



1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770







+
+
-
+
-
-
+
-
-
-
+
+
+
+
+







      ** the text editor with their own. */
       "data-f-preview-via='_postPreview' "
       /* ^^^ fossil.page[methodName](content, callback) */
       "data-f-preview-to='#fileedit-tab-preview-wrapper' "
       /* ^^^ dest elem ID */
       ">Refresh</button>");
    /* Toggle auto-update of preview when the Preview tab is selected. */
    CX("<div class='input-with-label'>"
       "<input type='checkbox' value='1' "
    style_labeled_checkbox("cb-preview-autoupdate",
       "id='cb-preview-autorefresh' checked>"
                           NULL,
                           "Auto-refresh?",
       "<label for='cb-preview-autorefresh'>Auto-refresh?</label>"
                           "1", 1,
                           "If on, the preview will automatically "
                           "refresh when this tab is selected.");
       "<div class='help-buttonlet'>"
       "If on, the preview will automatically "
       "refresh (if needed) when this tab is selected."
       "</div>"
       "</div>");

    /* Default preview rendering mode selection... */
    previewRenderMode = zFileMime
      ? ajax_render_mode_for_mimetype(zFileMime)
      : AJAX_RENDER_GUESS;
    style_select_list_int("select-preview-mode",
                          "preview_render_mode",
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987



1988
1989
1990
1991
1992
1993

1994
1995
1996
1997
1998
1999
2000
1985
1986
1987
1988
1989
1990
1991



1992
1993
1994






1995
1996
1997
1998
1999
2000
2001
2002







-
-
-
+
+
+
-
-
-
-
-
-
+







       "committing or force-reloading a file, local edits to that "
       "file/check-in combination are discarded.</li>");
    CX("</ul>");
  }
  CX("</div>"/*#fileedit-tab-help*/);

  builtin_request_js("sbsdiff.js");
#if 0
  style_emit_fossil_js_apis(0, "fetch", "dom", "tabs", "confirmer",
                            "storage", 0);
  if(!builtin_bundle_all_fossil_js_apis()){
    builtin_emit_fossil_js_apis("fetch", "dom", "tabs", "confirmer",
                              "storage", 0);
#else
  style_emit_all_fossil_js_apis();
  builtin_fulfill_js_requests();
  builtin_request_js("fossil.page.fileedit.js");
#endif
  builtin_fulfill_js_requests();
  }
  /*
  ** Set up a JS-side mapping of the AJAX_RENDER_xyz values. This is
  ** used for dynamically toggling certain UI components on and off.
  ** Must come after window.fossil has been intialized and before
  ** fossil.page.fileedit.js. Potential TODO: move this into the
  ** window.fossil bootstrapping so that we don't have to "fulfill"
  ** the JS multiple times.