~ubuntu-it-wiki/wiki-ubuntu-it/wiki-repo

« back to all changes in this revision

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

  • Committer: Leo Iannacone
  • Date: 2011-06-02 15:05:37 UTC
  • Revision ID: l3on@ubuntu.com-20110602150537-ycrnf58qf67uf593
Added applets for gui editor

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', "Attachment", FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 600, 500, 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', "Attachment", FCKConfig.WikiBasePath + FCKConfig.WikiPage + '?action=fckdialog&dialog=attachment', 600, 500, 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