-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove sassc/sprockets dependencies. add propshaft + css/js-bundling-rails instead * add puma for system tests * remove jquery-rails * add built assets to git * make jquery available globally for now * add propshaft to all gemfiles, update rails versions to fix security warnings * use sprockets for 6.1 - propshaft needs rails 7 * enable file_upload * add flatpickr package * fix burger menu * move redactor imports to wysywyg.js * remove compiled assets from git. compile on gem build instead. Downside: the gem cannot be used directly from git (referenced in Gemfile via github/git/path) since assets are missing.
- Loading branch information
Showing
105 changed files
with
1,542 additions
and
20,245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
app/assets/javascripts/comfy/vendor/* linguist-vendored | ||
app/assets/stylesheets/comfy/vendor/* linguist-vendored | ||
app/assets/builds/* linguist-generated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//= link_tree ../builds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,24 @@ | ||
//= require rails-ujs | ||
//= require jquery3 | ||
import ujs from "@rails/ujs"; | ||
ujs.start(); | ||
|
||
//= require comfy/vendor/codemirror | ||
//= require comfy/vendor/codemirror/mode/css/css | ||
//= require comfy/vendor/codemirror/mode/htmlmixed/htmlmixed | ||
//= require comfy/vendor/codemirror/mode/javascript/javascript | ||
//= require comfy/vendor/codemirror/mode/markdown/markdown | ||
//= require comfy/vendor/codemirror/mode/xml/xml | ||
//= require comfy/vendor/codemirror/addon/edit/closetag | ||
//= require comfy/vendor/sortable.min | ||
//= require comfy/vendor/bootstrap.bundle.min | ||
//= require comfy/vendor/diff/diff_match_patch.min | ||
//= require comfy/vendor/diff/pretty_text_diff | ||
//= require comfy/vendor/fontawesome | ||
//= require comfy/vendor/redactor | ||
//= require comfy/vendor/redactor/filemanager | ||
//= require comfy/vendor/redactor/imagemanager | ||
//= require comfy/vendor/redactor/definedlinks | ||
//= require comfy/vendor/redactor/table | ||
//= require comfy/vendor/redactor/video | ||
//= require_directory ../../vendor/redactor/i18n/ | ||
//= require comfy/vendor/flatpickr.min | ||
//= require_directory ../../vendor/flatpickr/i18n/ | ||
import "bootstrap/js/src/tab"; | ||
import "bootstrap/js/src/collapse"; | ||
|
||
//= require comfy/admin/cms/base | ||
//= require comfy/admin/cms/categories | ||
//= require comfy/admin/cms/codemirror | ||
//= require comfy/admin/cms/diff | ||
//= require comfy/admin/cms/file_link | ||
//= require comfy/admin/cms/file_upload | ||
//= require comfy/admin/cms/files_modal | ||
//= require comfy/admin/cms/page_fragments | ||
//= require comfy/admin/cms/sortable_list | ||
//= require comfy/admin/cms/slugify | ||
//= require comfy/admin/cms/timepicker | ||
//= require comfy/admin/cms/wysiwyg | ||
import "../../vendor/diff/diff_match_patch.min"; | ||
import "../../vendor/diff/pretty_text_diff"; | ||
import "../../vendor/fontawesome"; | ||
|
||
//= require comfy/admin/cms/custom | ||
import "./base"; | ||
import "./categories"; | ||
import "./codemirror"; | ||
import "./diff"; | ||
import "./file_link"; | ||
import "./file_upload"; | ||
import "./files_modal"; | ||
import "./page_fragments"; | ||
import "./sortable_list"; | ||
import "./slugify"; | ||
import "./timepicker"; | ||
import "./wysiwyg"; | ||
|
||
import "./custom"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,43 @@ | ||
import jQuery from "jquery"; | ||
import CodeMirror from "codemirror"; | ||
import "codemirror/mode/markdown/markdown"; | ||
import "codemirror/mode/htmlmixed/htmlmixed"; | ||
|
||
(() => { | ||
const codeMirrorInstances = []; | ||
window.CMS.codemirror = { | ||
init(root = document) { | ||
for (const textarea of root.querySelectorAll('textarea[data-cms-cm-mode]')) { | ||
for (const textarea of root.querySelectorAll( | ||
"textarea[data-cms-cm-mode]" | ||
)) { | ||
const codemirror = CodeMirror.fromTextArea(textarea, { | ||
mode: textarea.dataset.cmsCmMode, | ||
tabSize: 2, | ||
lineWrapping: true, | ||
autoCloseTags: true, | ||
lineNumbers: true, | ||
viewportMargin: Infinity | ||
viewportMargin: Infinity, | ||
}); | ||
codeMirrorInstances.push(codemirror); | ||
} | ||
|
||
const tabsRoot = root.id === 'form-fragments' ? root : root.querySelector('#form-fragments'); | ||
jQuery(tabsRoot).find('a[data-toggle="tab"]').on('shown.bs.tab', () => { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.refresh(); | ||
} | ||
}); | ||
const tabsRoot = | ||
root.id === "form-fragments" | ||
? root | ||
: root.querySelector("#form-fragments"); | ||
jQuery(tabsRoot) | ||
.find('a[data-toggle="tab"]') | ||
.on("shown.bs.tab", () => { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.refresh(); | ||
} | ||
}); | ||
}, | ||
dispose() { | ||
for (const codemirror of codeMirrorInstances) { | ||
codemirror.toTextArea(); | ||
} | ||
codeMirrorInstances.length = 0; | ||
} | ||
} | ||
}, | ||
}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import jQuery from "jquery"; | ||
|
||
(() => { | ||
window.CMS.diff = () => { | ||
jQuery('.revision').prettyTextDiff({ | ||
jQuery(".revision").prettyTextDiff({ | ||
cleanup: true, | ||
originalContainer: '.original', | ||
changedContainer: '.current', | ||
diffContainer: '.diff .content', | ||
originalContainer: ".original", | ||
changedContainer: ".current", | ||
diffContainer: ".diff .content", | ||
}); | ||
} | ||
}; | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.