File: fckplugin.js

package info (click to toggle)
moin 1.9.8-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 74,956 kB
  • sloc: python: 118,347; java: 10,704; php: 2,374; perl: 1,572; xml: 371; makefile: 213; sh: 79; sed: 5
file content (32 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
var oAttachmentItem;

var noLink = /^(?:H1|H2|H3|H4|H5|H6|PRE|TT|IMG)$/i;

if (1 || !FCKBrowserInfo.IsIE){

function LinkState()
{
  if (FCKSelection.CheckForNodeNames(noLink))
  {
    return FCK_TRISTATE_DISABLED;
  }
  return (FCK.GetNamedCommandState('CreateAttachment')==FCK_TRISTATE_ON) ? 
    FCK_TRISTATE_ON : FCK_TRISTATE_OFF;
}

// Register the related command.
FCKCommands.RegisterCommand('Attachment', new FCKDialogCommand( 'Attachment', "Attachment", FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 600, 500, LinkState, 'CreateAttachment')) ;

oAttachmentItem = new FCKToolbarButton('Attachment', FCKLang.AttachmentBtn, null, null, false, true);
} 
else
{
FCKCommands.RegisterCommand('Attachment', new FCKDialogCommand( 'Attachment', "Attachment", FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 600, 500, FCK.GetNamedCommandState, 'CreateAttachment')) ;

oAttachmentItem = new FCKToolbarButton('Attachment', FCKLang.AttachmentBtn, null, null, false, false);
}

// Create the "Attachment" toolbar button.
oAttachmentItem.IconPath = FCKPlugins.Items['moinattachment'].Path + 'attachment.gif';
FCKToolbarItems.RegisterItem('Attachment', oAttachmentItem);