Sfoglia il codice sorgente

#324 Improve: Enable ON/OFF switch of attaching a title header
* Change implementation way for attaching title header to new page.
* attach to template( not save draft)

Tatsuya Ise 8 anni fa
parent
commit
55698a5456

+ 0 - 1
lib/models/config.js

@@ -510,7 +510,6 @@ module.exports = function(crowi) {
       layoutType: Config.layoutType(config),
       isEnabledLineBreaks: Config.isEnabledLinebreaks(config),
       isSavedStatesOfTabChanges: Config.isSavedStatesOfTabChanges(config),
-      isEnabledAttachTitleHeader: Config.isEnabledAttachTitleHeader(config),
       env: {
         PLANTUML_URI: env.PLANTUML_URI || null,
         MATHJAX: env.MATHJAX || null,

+ 0 - 1
lib/routes/admin.js

@@ -132,7 +132,6 @@ module.exports = function(crowi, app) {
   actions.customize = {};
   actions.customize.index = function(req, res) {
     var settingForm;
-    debug("Here!");
     settingForm = Config.setupCofigFormData('crowi', req.config);
 
     const highlightJsCssSelectorOptions = {

+ 2 - 6
lib/views/widget/not_found_content.html

@@ -16,13 +16,9 @@
   {% include 'not_found_tabs.html' %}
 
   <div class="tab-content">
-    {#
-     # Commented out temporally -- 2018.04.07 Yuki Takei
-     # This will be fixed by https://github.com/weseek/growi/issues/324
-     #
-     #
+    {% if isEnabledAttachTitleHeader() %}
     <script type="text/template" id="raw-text-original"># {{ path|path2name }}</script>
-     #}
+    {% endif %}
     {# list view #}
     <div class="p-t-10 active tab-pane page-list-container" id="revision-body">
       {% if pages.length == 0 %}

+ 0 - 5
resource/js/util/Crowi.js

@@ -147,11 +147,6 @@ export default class Crowi {
     if (this.draft && this.draft[path]) {
       return this.draft[path];
     }
-    if (this.config.isEnabledAttachTitleHeader) {
-      var pathdraft = "# " + path;
-      this.saveDraft(path, pathdraft);
-      return this.draft[path];
-    }
 
     return null;
   }