~etherpad/etherpad/ubuntu-lucid-backport

« back to all changes in this revision

Viewing changes to etherpad/src/static/js/plugins.js

  • Committer: James Page
  • Date: 2011-04-13 08:00:43 UTC
  • Revision ID: james.page@canonical.com-20110413080043-eee2nq7y1v7cv2mp
* Refactoring to use native Ubuntu Java libraries. 
* debian/control:
  - use openjdk instead of sun's java
  - update maintainer
* debian/etherpad.init.orig, debian/etherpad.upstart:
  - move the init script out of the way
  - create a basic upstart script
  - note that the open office document conversion daemon was dropped
    from the upstart configuration; if this behavior is desired, please
    create a separate upstart job for it
* debian/rules:
  - just use basic dh_installinit, as it will pick up the new upstart job
* New release
* Changed maintainer to Packaging
* Fixed installation scripts
* Initial Release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
plugins = {
 
2
  callHook: function (hookName, args) {
 
3
        var hook = clientVars.hooks[hookName];
 
4
    if (hook === undefined)
 
5
      return [];
 
6
    var res = [];
 
7
    for (var i = 0, N=hook.length; i < N; i++) {
 
8
      var plugin = hook[i];
 
9
      var pluginRes = eval(plugin.plugin)[plugin.original || hookName](args);
 
10
      if (pluginRes != undefined && pluginRes != null)
 
11
        res = res.concat(pluginRes);
 
12
    }
 
13
    return res;
 
14
  },
 
15
 
 
16
  callHookStr: function (hookName, args, sep, pre, post) {
 
17
    if (sep == undefined) sep = '';
 
18
    if (pre == undefined) pre = '';
 
19
    if (post == undefined) post = '';
 
20
    return plugins.callHook(hookName, args).map(function (x) { return pre + x + post}).join(sep || "");
 
21
  }
 
22
};