# HG changeset patch # User wycc # Date 1236732671 -28800 # Node ID 8c4456190d9a5706669aaaa1b8384901c9820945 # Parent b4f74753d12557df80682e54a95b94d6def59452 Add text editor support to edit C source file inside the MadBuilder diff -r b4f74753d125 -r 8c4456190d9a inkscape/firefox/content/inkscape.js --- a/inkscape/firefox/content/inkscape.js Wed Mar 11 08:50:40 2009 +0800 +++ b/inkscape/firefox/content/inkscape.js Wed Mar 11 08:51:11 2009 +0800 @@ -57,6 +57,19 @@ return obj; } } + +/** + * TextEditor class + * + */ + +function Inkscape(file) +{ + var editor = document.getElementById('editor'); + editor.innerHTML = ""; + this.isInProgress = 0; +} + /** * Inkscape class * @@ -441,6 +454,17 @@ { var file = node.textContent; inkscape = new Inkscape("file://"+file); + $('#inkscape').show('slow'); + $('#editor').hide('slow'); +} + + +function project_loadEditor(node) +{ + var file = node.textContent; + editor = new TextEditor(file); + $('#inkscape').hide('slow'); + $('#editor').show('slow'); } function project_parse(xml) diff -r b4f74753d125 -r 8c4456190d9a inkscape/firefox/content/madbuilder.html --- a/inkscape/firefox/content/madbuilder.html Wed Mar 11 08:50:40 2009 +0800 +++ b/inkscape/firefox/content/madbuilder.html Wed Mar 11 08:51:11 2009 +0800 @@ -65,7 +65,7 @@
- +