Show original script as well, still need to add revert/switch version functionality
This commit is contained in:
@@ -123,6 +123,18 @@ show_edit_form=True) }}
|
||||
</div>
|
||||
<!-- End Right Content -->
|
||||
</div>
|
||||
|
||||
<div id="diff_1_editor" class="relative rounded-lg shadow-lg p-4 text-opacity-0">{{ original_script }}</div>
|
||||
<script>
|
||||
var editor = ace.edit("diff_1_editor");
|
||||
editor.setOptions({
|
||||
maxLines: 100
|
||||
});
|
||||
editor.setTheme("ace/theme/github_dark");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
|
||||
editor.session.$worker.send("changeOptions", [{ asi: true }]);
|
||||
</script>
|
||||
<!-- End Item -->
|
||||
{% else %}
|
||||
|
||||
@@ -159,7 +171,23 @@ show_edit_form=True) }}
|
||||
</button>
|
||||
</div>
|
||||
<!-- End Right Content -->
|
||||
|
||||
</div>
|
||||
|
||||
<div id="diff_1_editor" class="relative rounded-lg shadow-lg p-4 text-opacity-0">{{ original_script }}</div>
|
||||
<script>
|
||||
var editor = ace.edit("diff_1_editor");
|
||||
editor.setOptions({
|
||||
maxLines: 100,
|
||||
readOnly: true, // Disable editing
|
||||
highlightActiveLine: false, // Optionally, disable highlighting the active line
|
||||
highlightGutterLine: false // Optionally, disable highlighting the gutter line
|
||||
});
|
||||
editor.setTheme("ace/theme/github_dark");
|
||||
editor.session.setMode("ace/mode/javascript");
|
||||
|
||||
</script>
|
||||
|
||||
<!-- End Item -->
|
||||
{% endif %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user