~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/moinFCKplugins/moinattachment/fckplugin.js

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
var oAttachmentItem;
 
2
 
 
3
var noLink = /^(?:H1|H2|H3|H4|H5|H6|PRE|TT|IMG)$/i;
 
4
 
 
5
if (1 || !FCKBrowserInfo.IsIE){
 
6
 
 
7
function LinkState()
 
8
{
 
9
  if (FCKSelection.CheckForNodeNames(noLink))
 
10
  {
 
11
    return FCK_TRISTATE_DISABLED;
 
12
  }
 
13
  return (FCK.GetNamedCommandState('CreateAttachment')==FCK_TRISTATE_ON) ? 
 
14
    FCK_TRISTATE_ON : FCK_TRISTATE_OFF;
 
15
}
 
16
 
 
17
// Register the related command.
 
18
FCKCommands.RegisterCommand('Attachment', new FCKDialogCommand( 'Attachment', FCKLang.DlgLnkWindowTitle, FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 400, 330, LinkState, 'CreateAttachment')) ;
 
19
 
 
20
oAttachmentItem = new FCKToolbarButton('Attachment', FCKLang.AttachmentBtn, null, null, false, true);
 
21
 
22
else
 
23
{
 
24
FCKCommands.RegisterCommand('Attachment', new FCKDialogCommand( 'Attachment', FCKLang.DlgLnkWindowTitle, FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 400, 330, FCK.GetNamedCommandState, 'CreateAttachment')) ;
 
25
 
 
26
oAttachmentItem = new FCKToolbarButton('Attachment', FCKLang.AttachmentBtn, null, null, false, false);
 
27
}
 
28
 
 
29
// Create the "Attachment" toolbar button.
 
30
oAttachmentItem.IconPath = FCKPlugins.Items['moinattachment'].Path + 'attachment.gif';
 
31
FCKToolbarItems.RegisterItem('Attachment', oAttachmentItem);
 
32