Index: trunk/extensions/SVGEdit/modules/ext.svgedit.editButton.js |
— | — | @@ -84,6 +84,20 @@ |
85 | 85 | .attr('src', url); |
86 | 86 | }; |
87 | 87 | |
| 88 | + var tab = mediaWiki.util.addPortletLink('p-cactions', |
| 89 | + document.location + '#!action=svgedit', |
| 90 | + mediaWiki.msg('svgedit-edit-tab'), |
| 91 | + 'ca-ext-svgedit', |
| 92 | + mediaWiki.msg('svgedit-edit-tab-tooltip'), |
| 93 | + '', |
| 94 | + document.getElementById('ca-edit')); |
| 95 | + |
| 96 | + $(tab).find('a').click(function(event) { |
| 97 | + triggerSVGEdit(wgTitle); |
| 98 | + event.preventDefault(); |
| 99 | + return false; |
| 100 | + }); |
| 101 | + |
88 | 102 | var button = $('<button></button>') |
89 | 103 | .text(mediaWiki.msg('svgedit-editbutton-edit')) |
90 | 104 | .click(function() { |
— | — | @@ -91,5 +105,9 @@ |
92 | 106 | }); |
93 | 107 | |
94 | 108 | $('.fullMedia').append(button); |
| 109 | + |
| 110 | + if (document.location.hash.indexOf('!action=svgedit') != -1) { |
| 111 | + triggerSVGEdit(wgTitle); |
| 112 | + } |
95 | 113 | } |
96 | 114 | }); |
Index: trunk/extensions/SVGEdit/SVGEdit.i18n.php |
— | — | @@ -18,6 +18,8 @@ |
19 | 19 | 'svgedit-editor-save-close' => 'Save and close', |
20 | 20 | 'svgedit-editor-close' => 'Cancel', |
21 | 21 | 'svgedit-desc' => 'In-browser editing of SVG drawings with [http://code.google.com/p/svg-edit/ SVG-Edit]', |
| 22 | + 'svgedit-edit-tab' => 'Edit drawing', |
| 23 | + 'svgedit-edit-tab-tooltip' => 'You can edit this SVG drawing in your browser' |
22 | 24 | ); |
23 | 25 | |
24 | 26 | /** Message documentation (Message documentation) |
Index: trunk/extensions/SVGEdit/SVGEdit.php |
— | — | @@ -47,6 +47,8 @@ |
48 | 48 | 'svgedit-summary-default', |
49 | 49 | 'svgedit-editor-save-close', |
50 | 50 | 'svgedit-editor-close', |
| 51 | + 'svgedit-edit-tab', |
| 52 | + 'svgedit-edit-tab-tooltip' |
51 | 53 | ), |
52 | 54 | ), |
53 | 55 | ); |
Index: trunk/extensions/SVGEdit/README |
— | — | @@ -6,8 +6,8 @@ |
7 | 7 | SVG-edit 2.5.1 is included at present. |
8 | 8 | |
9 | 9 | Current versions of most major browsers should work except for Internet Explorer |
10 | | -(IE currently requires Chrome Frame plugin, though native IE9 support should come |
11 | | -with upstream updates.) |
| 10 | +(IE currently requires Chrome Frame plugin, or using the development version of |
| 11 | +SVG-edit 2.6 with IE9.) |
12 | 12 | |
13 | 13 | While the master code for this extension lives in Wikimedia's SVN repository, I also |
14 | 14 | have a git repo where I may have some experimental branches: |
— | — | @@ -20,7 +20,6 @@ |
21 | 21 | |
22 | 22 | Known bugs: |
23 | 23 | * Actual editor issues belong upstream: http://code.google.com/p/svg-edit/ |
24 | | -* open seems to have some race conditions (sometimes doesn't load the initial file) |
25 | 24 | |
26 | 25 | Todo: |
27 | 26 | * add an editor trigger on SVG images visible in regular page views |