diff options
author | Florian Hülsmann <fh@cbix.de> | 2012-03-13 03:14:31 +0400 |
---|---|---|
committer | Florian Hülsmann <fh@cbix.de> | 2012-03-13 03:14:31 +0400 |
commit | 8cababf1db0e24db0c1aa76357efef1ed9283f2a (patch) | |
tree | 1e5fea1f34d709c42cab5a112ebec8affd1f5492 /files_svgedit | |
parent | f838fe33bf45e3dd8b1203db13704cc8136d8d1e (diff) |
added control bar, modified js for dynamic resizing (still buggy)
Diffstat (limited to 'files_svgedit')
-rw-r--r-- | files_svgedit/css/ocsvg.css | 13 | ||||
-rw-r--r-- | files_svgedit/js/ocsvg.js | 1 | ||||
-rw-r--r-- | files_svgedit/templates/editor.php | 17 |
3 files changed, 26 insertions, 5 deletions
diff --git a/files_svgedit/css/ocsvg.css b/files_svgedit/css/ocsvg.css index 9e4b719df..50f5417ae 100644 --- a/files_svgedit/css/ocsvg.css +++ b/files_svgedit/css/ocsvg.css @@ -1,8 +1,13 @@ div#editorWrapper { - width: 100%; + position: relative; + height: 0; + width: 0; } div#editorContent { - position: absolute; - width: 100%; - height: 100%; + position: absoloute; + display: block; + /*top: 80px; + left: 160px;*/ + width: 100%; + height: 100%; } diff --git a/files_svgedit/js/ocsvg.js b/files_svgedit/js/ocsvg.js index 047bc8fb4..d6e05754d 100644 --- a/files_svgedit/js/ocsvg.js +++ b/files_svgedit/js/ocsvg.js @@ -1,7 +1,6 @@ $(document).ready(function() { if(typeof FileActions!=='undefined'){ FileActions.register('image/svg+xml','Edit','',function(filename){ - //viewImage($('#dir').val(),filename); window.location = OC.filePath('files_svgedit', '', 'index.php') + "?file=" + $('#dir').val() + "/" + filename; }); diff --git a/files_svgedit/templates/editor.php b/files_svgedit/templates/editor.php index df897db25..6e87c67be 100644 --- a/files_svgedit/templates/editor.php +++ b/files_svgedit/templates/editor.php @@ -18,11 +18,28 @@ OC_Util::addScript('files_svgedit', 'jgraduate/jpicker-1.0.12.min'); ?> <script type="text/javascript"> +function setEditorSize(){ + // Sets the size of the text editor window. + //fillWindow($('#editorContent')); + fillWindow($('#editorWrapper')); +} + $(document).ready(function() { // Load specified file's contents into editor: svgEditor.loadFromString(<?php echo $_['fileContents']; ?>); + setEditorSize(); + $(window).resize(function() { + setEditorSize(); + }); }); </script> +<div id="controls"> + <input type="button" id="svgeditButtonSave" value="<?php echo $l->t('Save'); ?>" /> + <input type="button" id="svgeditButtonSaveAs" value="<?php echo $l->t('Save As'); ?>" /> + <input type="button" id="svgeditButtonExport" value="<?php echo $l->t('Export PNG'); ?>" /> + <input type="button" id="svgeditButtonProperties" value="<?php echo $l->t('Properties'); ?>" /> + <input type="button" id="svgeditButtonClose" value="<?php echo $l->t('Close'); ?>" /> +</div> <div id="editorWrapper"> <div id="editorContent"> <div id="svg_editor"> |