~ubuntu-branches/ubuntu/saucy/mediawiki-extensions/saucy

« back to all changes in this revision

Viewing changes to dist/mediawiki-extensions-fckeditor/usr/share/mediawiki-extensions/fckeditor/plugins/mediawiki/dialogs/ref.html

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2010-05-04 15:13:35 UTC
  • mfrom: (0.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100504151335-54qeucg3ec108q28
Tags: 2.2
* Added Replaces:/Conflicts: to allow a proper upgrade.
Closes: #580066
* Fixed package descriptions.
Closes: #579667
* Patched mediawiki-extensions-fckeditor to make it work with
  php 5.3. The fix may not be perfect but at least it work.
  Not closing the bug (#579822) for now..

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
2
<!--
 
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 
4
 * Copyright (C) 2003-2007 Frederico Caldeira Knabben
 
5
 *
 
6
 * == BEGIN LICENSE ==
 
7
 *
 
8
 * Licensed under the terms of any of the following licenses at your
 
9
 * choice:
 
10
 *
 
11
 *  - GNU General Public License Version 2 or later (the "GPL")
 
12
 *    http://www.gnu.org/licenses/gpl.html
 
13
 *
 
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 
15
 *    http://www.gnu.org/licenses/lgpl.html
 
16
 *
 
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
 
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
 
19
 *
 
20
 * == END LICENSE ==
 
21
 *
 
22
 * Link dialog window.
 
23
-->
 
24
<html>
 
25
<head>
 
26
        <title>Reference Properties</title>
 
27
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
28
        <meta name="robots" content="noindex, nofollow" />
 
29
        <script type="text/javascript">
 
30
 
 
31
var oEditor             = window.parent.InnerDialogLoaded() ;
 
32
var FCK                 = oEditor.FCK ;
 
33
var FCKLang             = oEditor.FCKLang ;
 
34
var FCKConfig   = oEditor.FCKConfig ;
 
35
var FCKRegexLib = oEditor.FCKRegexLib ;
 
36
var FCKTools    = oEditor.FCKTools ;
 
37
 
 
38
document.write( '<script src="' + FCKConfig.BasePath + 'dialog/common/fck_dialog_common.js" type="text/javascript"><\/script>' ) ;
 
39
 
 
40
        </script>
 
41
        <script type="text/javascript">
 
42
 
 
43
// Get the selected flash embed (if available).
 
44
var oFakeImage = FCK.Selection.GetSelectedElement() ;
 
45
var oRef ;
 
46
 
 
47
if ( oFakeImage )
 
48
{
 
49
        if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fck_mw_ref') )
 
50
                oRef = FCK.GetRealElement( oFakeImage ) ;
 
51
        else
 
52
                oFakeImage = null ;
 
53
}
 
54
 
 
55
window.onload = function()
 
56
{
 
57
        // Translate the dialog box texts.
 
58
        oEditor.FCKLanguageManager.TranslatePage(document) ;
 
59
 
 
60
        // Load the selected link information (if any).
 
61
        LoadSelection() ;
 
62
 
 
63
        // Activate the "OK" button.
 
64
        window.parent.SetOkButton( true ) ;
 
65
        window.parent.SetAutoSize( true ) ;
 
66
        GetE('xRefText').focus();
 
67
}
 
68
 
 
69
function LoadSelection()
 
70
{
 
71
        if ( !oRef ) return ;
 
72
 
 
73
        GetE('xRefText').value = FCKTools.HTMLDecode( oRef.innerHTML ).replace( /&quot;/g, '"' ) ;
 
74
        GetE('xRefName').value = oRef.getAttribute( 'name' ) ;
 
75
}
 
76
 
 
77
//#### The OK button was hit.
 
78
function Ok()
 
79
{
 
80
        if ( !oRef )
 
81
        {
 
82
                oRef = FCK.EditorDocument.createElement( 'SPAN' ) ;
 
83
                oRef.className = 'fck_mw_ref' ;
 
84
        }
 
85
 
 
86
        var refData = FCKTools.HTMLEncode( GetE('xRefText').value ).Trim().replace( /"/g, '&quot;' ) ;
 
87
        oRef.innerHTML = refData ;
 
88
        SetAttribute( oRef, "name", GetE('xRefName').value ) ;
 
89
 
 
90
        if ( !oFakeImage )
 
91
        {
 
92
                oFakeImage      = oEditor.FCKDocumentProcessor_CreateFakeImage( 'FCK__MWRef', oRef ) ;
 
93
                oFakeImage.setAttribute( '_fck_mw_ref', 'true', 0 ) ;
 
94
                oFakeImage      = FCK.InsertElement( oFakeImage ) ;
 
95
        }
 
96
 
 
97
        return true ;
 
98
}
 
99
 
 
100
        </script>
 
101
</head>
 
102
<body style="overflow: hidden">
 
103
        <div id="divInfo">
 
104
                <table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
 
105
                        <tr>
 
106
                                <td>
 
107
                                        <span fcklang="wikiRef">Reference text (Wikitext)</span>
 
108
                                </td>
 
109
                        </tr>
 
110
                        <tr>
 
111
                                <td height="100%">
 
112
                                        <textarea id="xRefText" style="width: 100%; height: 100%; font-family: Monospace"
 
113
                                                cols="50" rows="5"></textarea>
 
114
                                </td>
 
115
                        </tr>
 
116
                        <tr>
 
117
                                <td>
 
118
                                        <span fcklang="wikiRefName">Reference name (optional)</span><br />
 
119
                                        <input id="xRefName" type="text" size="15" />
 
120
                                </td>
 
121
                        </tr>
 
122
                </table>
 
123
        </div>
 
124
</body>
 
125
</html>