~ubuntu-branches/ubuntu/oneiric/moin/oneiric-security

« back to all changes in this revision

Viewing changes to MoinMoin/web/static/htdocs/applets/moinFCKplugins/moinformat/fckplugin.js

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-03-30 12:55:34 UTC
  • mfrom: (0.1.17 sid)
  • Revision ID: james.westby@ubuntu.com-20100330125534-4c2ufc1rok24447l
Tags: 1.9.2-2ubuntu1
* Merge from Debian testing (LP: #521834). Based on work by Stefan Ebner.
  Remaining changes:
 - Remove python-xml from Suggests field, the package isn't anymore in
   sys.path.
 - Demote fckeditor from Recommends to Suggests; the code was previously
   embedded in moin, but it was also disabled, so there's no reason for us
   to pull this in by default currently. Note: This isn't necessary anymore
   but needs a MIR for fckeditor, so postpone dropping this change until
   lucid+1
* debian/rules:
  - Replace hardcoded python2.5 with python* and hardcore python2.6 for ln
* debian/control.in: drop versioned depends on cdbs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * FCKeditor - The text editor for internet
 
3
 * Copyright (C) 2003-2004 Frederico Caldeira Knabben
 
4
 * 
 
5
 * Licensed under the terms of the GNU Lesser General Public License:
 
6
 *   http://www.opensource.org/licenses/lgpl-license.php
 
7
 * 
 
8
 * For further information visit:
 
9
 *   http://www.fckeditor.net/
 
10
 * 
 
11
 * File Name: fckplugin.js
 
12
 *  MoinToolbarFontFormatCombo Class: Handles the Fonts combo selector.
 
13
 *   modified version of FCKToolbarFontFormatCombo
 
14
 *
 
15
 * File Authors:
 
16
 *   Frederico Caldeira Knabben (fredck@fckeditor.net)
 
17
 *   Florian Festi
 
18
 */
 
19
 
 
20
var MoinToolbarFontFormatCombo = function()
 
21
{
 
22
  this.CommandName = 'FontFormat';
 
23
  this.Command =  FCKCommands.GetCommand(this.CommandName);
 
24
}
 
25
 
 
26
// Inherit from MoinToolbarSpecialCombo.
 
27
MoinToolbarFontFormatCombo.prototype = new FCKToolbarSpecialCombo();
 
28
 
 
29
MoinToolbarFontFormatCombo.prototype.GetLabel = function()
 
30
{
 
31
  return FCKLang.FontFormat;
 
32
}
 
33
 
 
34
MoinToolbarFontFormatCombo.prototype.CreateItems = function(targetSpecialCombo)
 
35
{
 
36
  // Get the format names from the language file.
 
37
  var aNames = FCKLang['FontFormats'].split(';');
 
38
  var oNames = {
 
39
    p   : aNames[0],
 
40
    pre : aNames[1],
 
41
    h1  : aNames[3], // h1 as Title 1, aNames[2] is address
 
42
    h2  : aNames[4], // and so on
 
43
    h3  : aNames[5], 
 
44
    h4  : aNames[6],
 
45
    h5  : aNames[7],
 
46
    h6  : aNames[8]
 
47
  };
 
48
 
 
49
  // Get the available formats from the configuration file.
 
50
  var aTags = FCKConfig.FontFormats.split(';');
 
51
 
 
52
  for (var i in oNames)
 
53
  {
 
54
    this._Combo.AddItem(i, '<' + i + '>' + oNames[i] + '</' + i + '>', oNames[i]);
 
55
  }
 
56
}
 
57
 
 
58
FCKToolbarItems.RegisterItem( 'MoinFormat', new MoinToolbarFontFormatCombo());