r59338 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59337‎ | r59338 | r59339 >
Date:18:05, 22 November 2009
Author:churchofemacs
Status:deferred
Tags:
Comment:
fixing r59216: adding i18n file for extension-desc
Modified paths:
  • /trunk/extensions/GroupsSidebar/GroupsSidebar.i18n.php (added) (history)
  • /trunk/extensions/GroupsSidebar/GroupsSidebar.php (modified) (history)
  • /trunk/extensions/WikiTrust/mediawiki/extensions/Trust/js/tip_centerwindow.js (modified) (history)
  • /trunk/extensions/WikiTrust/mediawiki/extensions/Trust/js/tip_followscroll.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiTrust/mediawiki/extensions/Trust/js/tip_centerwindow.js
@@ -1,104 +1,104 @@
2 -/*
3 -tip_centerwindow.js v. 1.21
4 -
5 -The latest version is available at
6 -http://www.walterzorn.com
7 -or http://www.devira.com
8 -or http://www.walterzorn.de
9 -
10 -Initial author: Walter Zorn
11 -Last modified: 3.6.2008
12 -
13 -Extension for the tooltip library wz_tooltip.js.
14 -Centers a sticky tooltip in the window's visible clientarea,
15 -optionally even if the window is being scrolled or resized.
16 -*/
17 -
18 -// Make sure that the core file wz_tooltip.js is included first
19 -if(typeof config == "undefined")
20 - alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
21 -
22 -// Here we define new global configuration variable(s) (as members of the
23 -// predefined "config." class).
24 -// From each of these config variables, wz_tooltip.js will automatically derive
25 -// a command which can be passed to Tip() or TagToTip() in order to customize
26 -// tooltips individually. These command names are just the config variable
27 -// name(s) translated to uppercase,
28 -// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be
29 -// created.
30 -
31 -//=================== GLOBAL TOOLTIP CONFIGURATION =========================//
32 -config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour
33 -config. CenterAlways = false // true or false - recenter if window is resized or scrolled
34 -//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
35 -
36 -
37 -// Create a new tt_Extension object (make sure that the name of that object,
38 -// here ctrwnd, is unique amongst the extensions available for
39 -// wz_tooltips.js):
40 -var ctrwnd = new tt_Extension();
41 -
42 -// Implement extension eventhandlers on which our extension should react
43 -ctrwnd.OnLoadConfig = function()
44 -{
45 - if(tt_aV[CENTERWINDOW])
46 - {
47 - // Permit CENTERWINDOW only if the tooltip is sticky
48 - if(tt_aV[STICKY])
49 - {
50 - if(tt_aV[CENTERALWAYS])
51 - {
52 - // IE doesn't support style.position "fixed"
53 - if(tt_ie)
54 - tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter);
55 - else
56 - tt_aElt[0].style.position = "fixed";
57 - tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter);
58 - }
59 - return true;
60 - }
61 - tt_aV[CENTERWINDOW] = false;
62 - }
63 - return false;
64 -};
65 -// We react on the first OnMouseMove event to center the tip on that occasion
66 -ctrwnd.OnMoveBefore = Ctrwnd_DoCenter;
67 -ctrwnd.OnKill = function()
68 -{
69 - if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS])
70 - {
71 - tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter);
72 - if(tt_ie)
73 - tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter);
74 - else
75 - tt_aElt[0].style.position = "absolute";
76 - }
77 - return false;
78 -};
79 -// Helper function
80 -function Ctrwnd_DoCenter()
81 -{
82 - if(tt_aV[CENTERWINDOW])
83 - {
84 - var x, y, dx, dy;
85 -
86 - // Here we use some functions and variables (tt_w, tt_h) which the
87 - // extension API of wz_tooltip.js provides for us
88 - if(tt_ie || !tt_aV[CENTERALWAYS])
89 - {
90 - dx = tt_GetScrollX();
91 - dy = tt_GetScrollY();
92 - }
93 - else
94 - {
95 - dx = 0;
96 - dy = 0;
97 - }
98 - // Position the tip, offset from the center by OFFSETX and OFFSETY
99 - x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX];
100 - y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY];
101 - tt_SetTipPos(x, y);
102 - return true;
103 - }
104 - return false;
105 -}
 2+/*
 3+tip_centerwindow.js v. 1.21
 4+
 5+The latest version is available at
 6+http://www.walterzorn.com
 7+or http://www.devira.com
 8+or http://www.walterzorn.de
 9+
 10+Initial author: Walter Zorn
 11+Last modified: 3.6.2008
 12+
 13+Extension for the tooltip library wz_tooltip.js.
 14+Centers a sticky tooltip in the window's visible clientarea,
 15+optionally even if the window is being scrolled or resized.
 16+*/
 17+
 18+// Make sure that the core file wz_tooltip.js is included first
 19+if(typeof config == "undefined")
 20+ alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
 21+
 22+// Here we define new global configuration variable(s) (as members of the
 23+// predefined "config." class).
 24+// From each of these config variables, wz_tooltip.js will automatically derive
 25+// a command which can be passed to Tip() or TagToTip() in order to customize
 26+// tooltips individually. These command names are just the config variable
 27+// name(s) translated to uppercase,
 28+// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be
 29+// created.
 30+
 31+//=================== GLOBAL TOOLTIP CONFIGURATION =========================//
 32+config. CenterWindow = false // true or false - set to true if you want this to be the default behaviour
 33+config. CenterAlways = false // true or false - recenter if window is resized or scrolled
 34+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
 35+
 36+
 37+// Create a new tt_Extension object (make sure that the name of that object,
 38+// here ctrwnd, is unique amongst the extensions available for
 39+// wz_tooltips.js):
 40+var ctrwnd = new tt_Extension();
 41+
 42+// Implement extension eventhandlers on which our extension should react
 43+ctrwnd.OnLoadConfig = function()
 44+{
 45+ if(tt_aV[CENTERWINDOW])
 46+ {
 47+ // Permit CENTERWINDOW only if the tooltip is sticky
 48+ if(tt_aV[STICKY])
 49+ {
 50+ if(tt_aV[CENTERALWAYS])
 51+ {
 52+ // IE doesn't support style.position "fixed"
 53+ if(tt_ie)
 54+ tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter);
 55+ else
 56+ tt_aElt[0].style.position = "fixed";
 57+ tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter);
 58+ }
 59+ return true;
 60+ }
 61+ tt_aV[CENTERWINDOW] = false;
 62+ }
 63+ return false;
 64+};
 65+// We react on the first OnMouseMove event to center the tip on that occasion
 66+ctrwnd.OnMoveBefore = Ctrwnd_DoCenter;
 67+ctrwnd.OnKill = function()
 68+{
 69+ if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS])
 70+ {
 71+ tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter);
 72+ if(tt_ie)
 73+ tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter);
 74+ else
 75+ tt_aElt[0].style.position = "absolute";
 76+ }
 77+ return false;
 78+};
 79+// Helper function
 80+function Ctrwnd_DoCenter()
 81+{
 82+ if(tt_aV[CENTERWINDOW])
 83+ {
 84+ var x, y, dx, dy;
 85+
 86+ // Here we use some functions and variables (tt_w, tt_h) which the
 87+ // extension API of wz_tooltip.js provides for us
 88+ if(tt_ie || !tt_aV[CENTERALWAYS])
 89+ {
 90+ dx = tt_GetScrollX();
 91+ dy = tt_GetScrollY();
 92+ }
 93+ else
 94+ {
 95+ dx = 0;
 96+ dy = 0;
 97+ }
 98+ // Position the tip, offset from the center by OFFSETX and OFFSETY
 99+ x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX];
 100+ y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY];
 101+ tt_SetTipPos(x, y);
 102+ return true;
 103+ }
 104+ return false;
 105+}
Index: trunk/extensions/WikiTrust/mediawiki/extensions/Trust/js/tip_followscroll.js
@@ -1,88 +1,88 @@
2 -/*
3 -tip_followscroll.js v. 1.11
4 -
5 -The latest version is available at
6 -http://www.walterzorn.com
7 -or http://www.devira.com
8 -or http://www.walterzorn.de
9 -
10 -Initial author: Walter Zorn
11 -Last modified: 3.6.2008
12 -
13 -Extension for the tooltip library wz_tooltip.js.
14 -Lets a "sticky" tooltip keep its position inside the clientarea if the window
15 -is scrolled.
16 -*/
17 -
18 -// Make sure that the core file wz_tooltip.js is included first
19 -if(typeof config == "undefined")
20 - alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
21 -
22 -// Here we define new global configuration variable(s) (as members of the
23 -// predefined "config." class).
24 -// From each of these config variables, wz_tooltip.js will automatically derive
25 -// a command which can be passed to Tip() or TagToTip() in order to customize
26 -// tooltips individually. These command names are just the config variable
27 -// name(s) translated to uppercase,
28 -// e.g. from config. FollowScroll a command FOLLOWSCROLL will automatically be
29 -// created.
30 -
31 -//=================== GLOBAL TOOLTIP CONFIGURATION ======================//
32 -config. FollowScroll = false // true or false - set to true if you want this to be the default behaviour
33 -//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
34 -
35 -
36 -// Create a new tt_Extension object (make sure that the name of that object,
37 -// here fscrl, is unique amongst the extensions available for
38 -// wz_tooltips.js):
39 -var fscrl = new tt_Extension();
40 -
41 -// Implement extension eventhandlers on which our extension should react
42 -fscrl.OnShow = function()
43 -{
44 - if(tt_aV[FOLLOWSCROLL])
45 - {
46 - // Permit FOLLOWSCROLL only if the tooltip is sticky
47 - if(tt_aV[STICKY])
48 - {
49 - var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY();
50 -
51 - if(tt_ie)
52 - {
53 - fscrl.MoveOnScrl.offX = x;
54 - fscrl.MoveOnScrl.offY = y;
55 - fscrl.AddRemEvtFncs(tt_AddEvtFnc);
56 - }
57 - else
58 - {
59 - tt_SetTipPos(x, y);
60 - tt_aElt[0].style.position = "fixed";
61 - }
62 - return true;
63 - }
64 - tt_aV[FOLLOWSCROLL] = false;
65 - }
66 - return false;
67 -};
68 -fscrl.OnHide = function()
69 -{
70 - if(tt_aV[FOLLOWSCROLL])
71 - {
72 - if(tt_ie)
73 - fscrl.AddRemEvtFncs(tt_RemEvtFnc);
74 - else
75 - tt_aElt[0].style.position = "absolute";
76 - }
77 -};
78 -// Helper functions (encapsulate in the class to avoid conflicts with other
79 -// extensions)
80 -fscrl.MoveOnScrl = function()
81 -{
82 - tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY());
83 -};
84 -fscrl.AddRemEvtFncs = function(PAddRem)
85 -{
86 - PAddRem(window, "resize", fscrl.MoveOnScrl);
87 - PAddRem(window, "scroll", fscrl.MoveOnScrl);
88 -};
89 -
 2+/*
 3+tip_followscroll.js v. 1.11
 4+
 5+The latest version is available at
 6+http://www.walterzorn.com
 7+or http://www.devira.com
 8+or http://www.walterzorn.de
 9+
 10+Initial author: Walter Zorn
 11+Last modified: 3.6.2008
 12+
 13+Extension for the tooltip library wz_tooltip.js.
 14+Lets a "sticky" tooltip keep its position inside the clientarea if the window
 15+is scrolled.
 16+*/
 17+
 18+// Make sure that the core file wz_tooltip.js is included first
 19+if(typeof config == "undefined")
 20+ alert("Error:\nThe core tooltip script file 'wz_tooltip.js' must be included first, before the plugin files!");
 21+
 22+// Here we define new global configuration variable(s) (as members of the
 23+// predefined "config." class).
 24+// From each of these config variables, wz_tooltip.js will automatically derive
 25+// a command which can be passed to Tip() or TagToTip() in order to customize
 26+// tooltips individually. These command names are just the config variable
 27+// name(s) translated to uppercase,
 28+// e.g. from config. FollowScroll a command FOLLOWSCROLL will automatically be
 29+// created.
 30+
 31+//=================== GLOBAL TOOLTIP CONFIGURATION ======================//
 32+config. FollowScroll = false // true or false - set to true if you want this to be the default behaviour
 33+//======= END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW ==============//
 34+
 35+
 36+// Create a new tt_Extension object (make sure that the name of that object,
 37+// here fscrl, is unique amongst the extensions available for
 38+// wz_tooltips.js):
 39+var fscrl = new tt_Extension();
 40+
 41+// Implement extension eventhandlers on which our extension should react
 42+fscrl.OnShow = function()
 43+{
 44+ if(tt_aV[FOLLOWSCROLL])
 45+ {
 46+ // Permit FOLLOWSCROLL only if the tooltip is sticky
 47+ if(tt_aV[STICKY])
 48+ {
 49+ var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY();
 50+
 51+ if(tt_ie)
 52+ {
 53+ fscrl.MoveOnScrl.offX = x;
 54+ fscrl.MoveOnScrl.offY = y;
 55+ fscrl.AddRemEvtFncs(tt_AddEvtFnc);
 56+ }
 57+ else
 58+ {
 59+ tt_SetTipPos(x, y);
 60+ tt_aElt[0].style.position = "fixed";
 61+ }
 62+ return true;
 63+ }
 64+ tt_aV[FOLLOWSCROLL] = false;
 65+ }
 66+ return false;
 67+};
 68+fscrl.OnHide = function()
 69+{
 70+ if(tt_aV[FOLLOWSCROLL])
 71+ {
 72+ if(tt_ie)
 73+ fscrl.AddRemEvtFncs(tt_RemEvtFnc);
 74+ else
 75+ tt_aElt[0].style.position = "absolute";
 76+ }
 77+};
 78+// Helper functions (encapsulate in the class to avoid conflicts with other
 79+// extensions)
 80+fscrl.MoveOnScrl = function()
 81+{
 82+ tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY());
 83+};
 84+fscrl.AddRemEvtFncs = function(PAddRem)
 85+{
 86+ PAddRem(window, "resize", fscrl.MoveOnScrl);
 87+ PAddRem(window, "scroll", fscrl.MoveOnScrl);
 88+};
 89+
Index: trunk/extensions/GroupsSidebar/GroupsSidebar.php
@@ -10,7 +10,7 @@
1111 'author' => 'Church of emacs',
1212 'url' => 'http://www.mediawiki.org/wiki/Extension:GroupsSidebar',
1313 'description' => 'Add sidebar element for specific user groups',
14 -# 'descriptionmsg' => 'myextension-desc',
 14+ 'descriptionmsg' => 'groupssidebar-desc',
1515 'version' => '0.1',
1616 );
1717
@@ -18,5 +18,5 @@
1919
2020 $wgAutoloadClasses['GroupsSidebar'] = $dir . 'GroupsSidebar.body.php'; # Tell MediaWiki to load the extension body.
2121 $wgHooks['SkinBuildSidebar'][] = array(new GroupsSidebar(), 'efHideSidebar');
22 -
 22+$wgExtensionMessagesFiles['myextension'] = $dir . 'GroupsSidebar.i18n.php';
2323 $wgGroupsSidebar = array();
Index: trunk/extensions/GroupsSidebar/GroupsSidebar.i18n.php
@@ -0,0 +1,6 @@
 2+<?php
 3+$messages = array();
 4+$messages['en'] = array(
 5+ 'groupssidebar-desc' => 'This extension enables site admins to include sidebar elements for specific user groups.'
 6+);
 7+
Property changes on: trunk/extensions/GroupsSidebar/GroupsSidebar.i18n.php
___________________________________________________________________
Name: svn:eol-style
18 + native

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59216New Extension:GroupsSidebar. More information about this extension in mediawi...churchofemacs21:07, 18 November 2009

Status & tagging log