diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-03-13 00:24:55 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-03-13 00:24:55 +0100 |
commit | dbd40f035d765cfa442a0731229d31a9113d8d11 (patch) | |
tree | be155899af0418075c9353efaa31de320aa29978 | |
parent | 0ac64400c89d61c2c79f41c42c7506d27a81f273 (diff) | |
download | etherpad-dbd40f035d765cfa442a0731229d31a9113d8d11.tar.gz etherpad-dbd40f035d765cfa442a0731229d31a9113d8d11.tar.xz etherpad-dbd40f035d765cfa442a0731229d31a9113d8d11.zip |
Fixed the paths for plugin-provided static files, and added an example usage to the testplugin
Diffstat (limited to '')
3 files changed, 7 insertions, 6 deletions
diff --git a/trunk/etherpad/src/etherpad/control/static_control.js b/trunk/etherpad/src/etherpad/control/static_control.js index ba509d8..d938b26 100644 --- a/trunk/etherpad/src/etherpad/control/static_control.js +++ b/trunk/etherpad/src/etherpad/control/static_control.js @@ -31,11 +31,11 @@ function onRequest() { /* FIXME: Is there a more effective way to do this? */ for (plugin in plugins.plugins) { disp.addLocations([ - [PrefixMatcher('/static/js/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/js/', opts)], - [PrefixMatcher('/static/css/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/css/', opts)], - [PrefixMatcher('/static/swf/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/swf/', opts)], - [PrefixMatcher('/static/html/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/html/', opts)], - [PrefixMatcher('/static/zip/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/zip/', opts)]]); + [PrefixMatcher('/static/js/plugins/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/js/', opts)], + [PrefixMatcher('/static/css/plugins/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/css/', opts)], + [PrefixMatcher('/static/swf/plugins/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/swf/', opts)], + [PrefixMatcher('/static/html/plugins/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/html/', opts)], + [PrefixMatcher('/static/zip/plugins/'+plugin+'/'), faststatic.directoryServer('/plugins/' + plugin + '/static/zip/', opts)]]); } var serveFavicon = faststatic.singleFileServer(staticBase + '/favicon.ico', opts); diff --git a/trunk/etherpad/src/plugins/testplugin/static/js/test.js b/trunk/etherpad/src/plugins/testplugin/static/js/test.js index 2899720..de6ac71 100644 --- a/trunk/etherpad/src/plugins/testplugin/static/js/test.js +++ b/trunk/etherpad/src/plugins/testplugin/static/js/test.js @@ -1 +1 @@ -kafoo +alert("KAFOOOOO"); diff --git a/trunk/etherpad/src/plugins/testplugin/templates/testplugin.ejs b/trunk/etherpad/src/plugins/testplugin/templates/testplugin.ejs index e529982..02bf934 100644 --- a/trunk/etherpad/src/plugins/testplugin/templates/testplugin.ejs +++ b/trunk/etherpad/src/plugins/testplugin/templates/testplugin.ejs @@ -20,6 +20,7 @@ limitations under the License. */ %> helpers.includeJQuery(); helpers.includeCometJs(); helpers.includeJs("json2.js"); + helpers.includeJs("plugins/testplugin/test.js") helpers.addToHead('\n<style type="text/css" title="dynamicsyntax"></style>\n'); %> |