-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in the file for the diff editor
I forgot to actually the HTML file to display the diff editor. This commit adds it in. All the code to support the diff editor has already been pushed, so we just need this file.
- Loading branch information
1 parent
ac5842e
commit a0adf1a
Showing
3 changed files
with
64 additions
and
40 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
Innovator/Client/scripts/CodeEditor_Monaco/MonacoDiffEditor.html
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,62 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script type="text/javascript"> | ||
var topWnd = window.parent.parent; | ||
var aras = topWnd.aras; | ||
</script> | ||
<script type="text/javascript" src="javascript/monaco-editor/min/vs/loader.js"></script> | ||
<style type="text/css" media="screen"> | ||
#editor { | ||
|
||
} | ||
</style> | ||
<style type="text/css"> | ||
html, body { | ||
overflow: hidden; | ||
width: 100%; | ||
height: 100%; | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
|
||
li { | ||
list-style-type: none !important; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="css/methodeditor.css" /> | ||
<script type="text/javascript"> | ||
window.onload = function() { | ||
// initialize diff editor | ||
initDiffEditor(); | ||
} | ||
|
||
// Initialize the diff editor | ||
function initDiffEditor() { | ||
require.config({ paths: { 'vs': 'javascript/monaco-editor/min/vs' }}); | ||
require(['vs/editor/editor.main'], function() { | ||
var oldMethodCode = parent.methodEditorHelper.getComparisonMethodCode(); | ||
var currentMethodCode = aras.getItemProperty(parent.parent.document.item, "method_code") || ""; | ||
|
||
var originalModel = monaco.editor.createModel(oldMethodCode, "javascript"); | ||
var currentModel = monaco.editor.createModel(currentMethodCode, "javascript"); | ||
|
||
var diffEditor = monaco.editor.createDiffEditor(document.getElementById("diffeditormain")); | ||
diffEditor.setModel({ | ||
original: originalModel, | ||
modified: currentModel | ||
}) | ||
|
||
parent.editor = diffEditor; | ||
parent.monacoEditor = monaco.editor; | ||
// var codeLang = aras.getItemProperty(parent.parent.document.item, "method_type"); | ||
// parent.methodEditorHelper.setLanguage(codeLang); | ||
parent.methodEditorHelper.setEditorChangeEvent(); | ||
}); | ||
} | ||
</script> | ||
</head> | ||
<body> | ||
<div id="diffeditormain" style="height:100%; width:100%; overflow: hidden;"></div> | ||
</body> | ||
</html> |
40 changes: 0 additions & 40 deletions
40
Innovator/Client/scripts/CodeEditor_Monaco/xml.ja/toolbar.xml
This file was deleted.
Oops, something went wrong.
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