diff options
author | Florian Hülsmann <fh@cbix.de> | 2012-03-30 23:45:32 +0400 |
---|---|---|
committer | Florian Hülsmann <fh@cbix.de> | 2012-03-30 23:45:32 +0400 |
commit | ed92bca4ef8f4b6888e7ca69fcdb207e01856c99 (patch) | |
tree | 5134eb4987e691e6430f4c31fb2feb6b204dcb02 /files_svgedit | |
parent | 9519a2196562d75101da92de751d1bd40f22d253 (diff) |
no OC controls
Diffstat (limited to 'files_svgedit')
-rw-r--r-- | files_svgedit/appinfo/app.php | 6 | ||||
-rw-r--r-- | files_svgedit/js/ocsvgEditor.js | 29 | ||||
-rw-r--r-- | files_svgedit/templates/editor.php | 2 |
3 files changed, 10 insertions, 27 deletions
diff --git a/files_svgedit/appinfo/app.php b/files_svgedit/appinfo/app.php index 9e233dd0c..56ba8f94f 100644 --- a/files_svgedit/appinfo/app.php +++ b/files_svgedit/appinfo/app.php @@ -22,9 +22,9 @@ */ OC_Util::addScript('files_svgedit', 'ocsvg'); OC_App::register(array( - 'order' => 80, - 'id' => 'apptemplate', - 'name' => 'App Template' + 'order' => 50, + 'id' => 'files_svgedit', + 'name' => 'SVG Editor' )); ?> diff --git a/files_svgedit/js/ocsvgEditor.js b/files_svgedit/js/ocsvgEditor.js index b99e9d7e6..dca809e59 100644 --- a/files_svgedit/js/ocsvgEditor.js +++ b/files_svgedit/js/ocsvgEditor.js @@ -86,11 +86,12 @@ var ocsvg = { }; $(document).ready(function() { + /* // set control buttons' onclick handlers: $('#ocsvgBtnSave').click(function() { svgCanvas.getSvgString()(ocsvg.save); }); - + */ // import file ocsvg.setFileContents(ocsvgFile.contents); ocsvg.setFilePath(ocsvgFile.path); @@ -109,9 +110,10 @@ $(document).ready(function() { svgCanvas = new embedded_svg_edit(frame); // hide main menu button, then shift the tool bar to the left border: - ocsvg.frameDoc.find('#main_button').hide().next().css('left', 0).css('padding-left', 2).css('padding-top', 2); + //ocsvg.frameDoc.find('#main_button').hide().next().css('left', 0).css('padding-left', 2).css('padding-top', 2); // fix broken color select field ocsvg.frameDoc.find('#fill_color,#stroke_color').find('svg').css('height', '100%'); + /* // set handler for show preferences button: //$('#ocsvgBtnPrefs').click(ocsvg.showPreferences); $('#ocsvgBtnPrefs').click(function() { @@ -121,7 +123,7 @@ $(document).ready(function() { ocsvg.frameDoc.find('#tool_prefs_cancel').click(function() { ocsvg.frameDoc.find('#svg_prefs').hide(); }); - + */ svgCanvas.setSvgString(ocsvg.currentFile.filecontents)(function(data, error) { if(error) { alert("Could not load file!\n\n" + error); @@ -129,24 +131,3 @@ $(document).ready(function() { }); }); }); -/* -$(document).ready(function() { - // Load specified file's contents into editor and set attributes: - ocsvg.fileContents = ocsvgFile.contents; - svgEditor.loadFromString(ocsvg.fileContents); - ocsvg.setFilePath(ocsvgFile.path); - ocsvg.setFileMTime(ocsvgFile.mtime); - ocsvg.setEditorSize(); - $(window).resize(function() { - ocsvg.setEditorSize(); - }); - // overwrite saveHandler: - /*svgEditor.setConfig({ - saveHandler: ocsvg.save - });*//* - svgEditor.addExtension("OCSVG Handlers", function() { - svgCanvas.bind('saved', ocsvg.save); - return {}; - }); -}); -*/ diff --git a/files_svgedit/templates/editor.php b/files_svgedit/templates/editor.php index 7f7c027b4..28517bec0 100644 --- a/files_svgedit/templates/editor.php +++ b/files_svgedit/templates/editor.php @@ -15,10 +15,12 @@ var ocsvgFile = { }; //--> </script> +<!-- <div id="controls"> <input type="button" id="ocsvgBtnSave" value="<?php echo $l->t('Save'); ?>" /> <input type="button" id="ocsvgBtnPrefs" value="<?php echo $l->t('Preferences'); ?>" /> </div> +--> <div id="editor"> <iframe src="<?php echo OC_Helper::linkTo('files_svgedit', 'svg-edit/svg-editor.html'); ?>" id="svgedit"></iframe> </div> |