r40615 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40614‎ | r40615 | r40616 >
Date:20:47, 8 September 2008
Author:siebrand
Status:old
Tags:
Comment:
* removed trailing whitespace and some empty lines
* fixed indentation
* added svn:eol-style native
Modified paths:
  • /trunk/extensions/uniwiki/.uniwiki.settings (modified) (history)
  • /trunk/extensions/uniwiki/Authors/Authors.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/Authors/Authors.php (modified) (history)
  • /trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.php (modified) (history)
  • /trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php (modified) (history)
  • /trunk/extensions/uniwiki/CatBoxAtTop/style.css (modified) (history)
  • /trunk/extensions/uniwiki/CreatePage/CreatePage.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/CreatePage/CreatePage.php (modified) (history)
  • /trunk/extensions/uniwiki/CreatePage/style.css (modified) (history)
  • /trunk/extensions/uniwiki/CssHooks/CssHooks.php (modified) (history)
  • /trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.js (modified) (history)
  • /trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.php (modified) (history)
  • /trunk/extensions/uniwiki/CustomToolbar/Element.Forms.js (modified) (history)
  • /trunk/extensions/uniwiki/CustomToolbar/style.css (modified) (history)
  • /trunk/extensions/uniwiki/FormatChanges/FormatChanges.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/FormatChanges/FormatChanges.php (modified) (history)
  • /trunk/extensions/uniwiki/FormatSearch/FormatSearch.php (modified) (history)
  • /trunk/extensions/uniwiki/FormatSearch/style.css (modified) (history)
  • /trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.js (modified) (history)
  • /trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php (modified) (history)
  • /trunk/extensions/uniwiki/GenericEditPage/global.css (modified) (history)
  • /trunk/extensions/uniwiki/GenericEditPage/style.css (modified) (history)
  • /trunk/extensions/uniwiki/Javascript/Javascript.php (modified) (history)
  • /trunk/extensions/uniwiki/Javascript/uniwiki.js (modified) (history)
  • /trunk/extensions/uniwiki/Layouts/Layouts.i18n.php (modified) (history)
  • /trunk/extensions/uniwiki/Layouts/Layouts.php (modified) (history)
  • /trunk/extensions/uniwiki/Layouts/style.css (modified) (history)
  • /trunk/extensions/uniwiki/MooTools12core/MooTools12core.php (modified) (history)
  • /trunk/extensions/uniwiki/MooTools12core/mootools-1.2-core-yc.js (modified) (history)

Diff [purge]

Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.i18n.php
@@ -6,7 +6,6 @@
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 $wgGenericEditPageMessages = array();
1211 $wgGenericEditPageMessages['en'] = array(
1312 'gep_emailsubject' => "[$1] Category suggestion: $2",
@@ -87,4 +86,3 @@
8887 'gep_nosectioninstructions' => "Não há seções nesta página. Use as ferramentas à direita para incluir algumas seções.",
8988 'gep_nocategories' => "Selecione, no mínimo, uma categoria antes de salvar"
9089 );
91 -
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.i18n.php
___________________________________________________________________
Added: svn:eol-style
9290 + native
Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php
@@ -2,11 +2,10 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
1211
1312 $wgExtensionCredits['other'][] = array(
@@ -15,7 +14,6 @@
1615 'description' => "Suppliments the edit page with something more usable"
1716 );
1817
19 -
2018 /* ---- CONFIGURABLE OPTIONS ---- */
2119
2220 $wgSectionBox = true;
@@ -63,15 +61,15 @@
6462 function UW_GenericEditPage_emailSuggestion ($category) {
6563 global $wgSuggestCategoryRecipient, $wgEmergencyContact, $wgSitename, $wgUser;
6664 require_once ("UserMailer.php");
67 -
 65+
6866 $from = new MailAddress ($wgEmergencyContact);
6967 $to = new MailAddress ($wgSuggestCategoryRecipient);
7068 $subj = wfMsg ("gep_emailsubject", $wgSitename, $category);
7169 $body = wfMsg ("gep_emailbody", $wgUser->getName(), $category, $wgSitename);
72 -
 70+
7371 // attempt to send the notification
7472 $result = userMailer ($to, $from, $subj, $body);
75 -
 73+
7674 /* send a message back to the client, to let them
7775 * know if the suggestion was successfully sent (or not) */
7876 return WikiError::isError ($result)
@@ -86,10 +84,10 @@
8785 $re = "/\n*<layout\s+name=\"(.+)\"\s+\/>/";
8886 preg_match_all ($re, $text, $matches);
8987 $text = preg_replace ($re, "", $text);
90 -
 88+
9189 /* if no layout tag was found, this
9290 * function does nothing useful */
93 - if (!$matches[1][0]) return array();
 91+ if (!$matches[1][0]) return array();
9492
9593 /* get the wiki markup (containing the
9694 * directives) from this page's layout */
@@ -102,7 +100,7 @@
103101 // and the second for the untitled first section
104102 $layout[] = array ("name" => $matches[1][0]);
105103 $layout[] = array();
106 -
 104+
107105 // ignore (delete) the categories on the layout
108106 $layout_text = preg_replace ("/\[\[category:(.+?)\]\]/i", "", $layout_text);
109107
@@ -112,7 +110,7 @@
113111 // build an array with the layout section attributes
114112 for ($i= 0; $i < count ($nodes); $i++) {
115113 $value = trim ($nodes[$i]);
116 -
 114+
117115 /* is this block of text a header?
118116 * update the 'current section' flag ($title), so
119117 * all following directives are dropped in to it */
@@ -131,7 +129,7 @@
132130 preg_match_all ($re, $value, $matches);
133131 foreach ($matches[1] as $attribute)
134132 $layout[$section_num][$attribute] = true;
135 -
 133+
136134 // add the remaining stuff as text
137135 $value = preg_replace ($re, "", $value);
138136 $layout[$section_num]['text'] = trim($value);
@@ -145,40 +143,40 @@
146144 global $wgDBprefix, $wgAddCategory, $wgSuggestCategory, $wgRequest,
147145 $wgEmergencyContact, $wgUseCategoryPage, $wgCategoryPage;
148146 $out = "";
149 -
 147+
150148 /* build an array of the categories, either from a page
151149 * or from all available categories in the wiki */
152150 $categories = array();
153151 if ($wgUseCategoryPage) {
154 -
 152+
155153 // from the specified page
156154 $revision = Revision::newFromTitle (Title::newFromDBKey ($wgCategoryPage));
157155 $results = $revision ? split ("\n", $revision->getText()) : array();
158156 foreach ($results as $result) {
159 - if (trim($result) != '')
160 - $categories[] = Title::newFromText (trim ($result))->getDBkey();
 157+ if (trim($result) != '')
 158+ $categories[] = Title::newFromText (trim ($result))->getDBkey();
161159 }
162160 } else {
163 -
 161+
164162 // all the categories
165163 $db = wfGetDB (DB_MASTER);
166164 $results = $db->resultObject ($db->query(
167165 "select distinct cl_to from {$wgDBprefix}categorylinks order by cl_to"));
168 -
 166+
169167 while ($result = $results->next())
170168 $categories[] = $result->cl_to;
171169 }
172 -
 170+
173171 // extract the categories on this page
174172 $regex = "/\[\[category:(.+?)(?:\|.*)?\]\]/i";
175173 preg_match_all ($regex, strtolower($text), $matches);
176174 $text = preg_replace ($regex, "", $text);
177 -
 175+
178176 // an array of the categories on the page (in db form)
179177 $on_page = array();
180178 foreach ($matches[1] as $cat)
181179 $on_page[] = strtolower (Title::newFromText ($cat)->getDBkey());
182 -
 180+
183181 /* add any categories that may have been passed with the
184182 * GET request as if they started out on the page */
185183 $data = $wgRequest->data;
@@ -186,20 +184,20 @@
187185 if ($key == 'category') {
188186 $category = substr ($value, 9); // value = category-categoryname
189187 $on_page[] = strtolower ($category);
190 - if (!in_array ($category, $categories))
 188+ if (!in_array ($category, $categories))
191189 $categories[] = $category;
192190 }
193191 }
194192
195 - /* add checkboxes for the categories,
 193+ /* add checkboxes for the categories,
196194 * with ones from the page already checked */
197195 $out .= "<div id='category-box'><h3>".wfMsg ('gep_categories')."</h3>";
198196 foreach ($categories as $category) {
199197 $fm_id = "category-$category";
200198 $caption = Title::newFromDBkey ($category)->getText();
201 - $checked = in_array (strtolower ($category), $on_page)
 199+ $checked = in_array (strtolower ($category), $on_page)
202200 ? "checked='checked'" : '';
203 -
 201+
204202 $out .= "
205203 <div>
206204 <input type='checkbox' name='$fm_id' id='$fm_id' $checked/>
@@ -207,7 +205,7 @@
208206 </div>
209207 ";
210208 }
211 -
 209+
212210 // add a text field to add new categories
213211 if ($wgAddCategory) {
214212 $out .= "
@@ -222,8 +220,8 @@
223221 </script>
224222 ";
225223 }
226 -
227 - /* add a text field to suggest a category
 224+
 225+ /* add a text field to suggest a category
228226 * as email to $wgEmergencyContact */
229227 if ($wgSuggestCategory) {
230228 $out .= "
@@ -241,7 +239,7 @@
242240 var cat_name = field.value.trim();
243241 if (cat_name != '') {
244242 sajax_do_call ('emailSuggestion', [cat_name], function (msg) {
245 -
 243+
246244 /* got response from the server, append it after the
247245 * suggest form (so subsequent suggestions are injected
248246 * ABOVE existing suggetions before they're removed) */
@@ -249,7 +247,7 @@
250248 .injectAfter ('fm-suggest-cat-button', 'after')
251249 .appendText (msg.responseText)
252250 .highlight();
253 -
 251+
254252 /* fade out and destroy the notification within
255253 * a timely manner, to keep the DOM tidy */
256254 (function() { n.fade() }).delay(6000);
@@ -314,7 +312,7 @@
315313 $out .= "
316314 </div>
317315 ";
318 -
 316+
319317 if ($wgAddSection) {
320318 $out .= "
321319 <div class='add'>
@@ -328,7 +326,7 @@
329327 </script>
330328 ";
331329 }
332 -
 330+
333331 $out .= "
334332 </div>
335333 <script type='text/javascript'>
@@ -344,17 +342,17 @@
345343 function UW_GenericEditPage_displayEditPage ($editor, $out) {
346344 global $wgHooks, $wgParser, $wgTitle, $wgRequest, $wgUser, $wgCategoryBox, $wgSectionBox, $wgRequireCategory;
347345 global $wgGenericEditPageClass, $wgSwitchMode, $wgGenericEditPageWhiteList;
348 -
 346+
349347 // disable this whole thing on conflict and comment pages
350348 if ($editor->section == "new" || $editor->isConflict)
351349 return true;
352 -
 350+
353351 // get the article text (as wiki markup)
354352 $text = trim ($editor->safeUnicodeOutput ($editor->textbox1));
355 -
 353+
356354 // see if we have a link to a layout
357355 $layout = UW_GenericEditPage_extractLayout ($text);
358 -
 356+
359357 /* remove the categories, to be added as
360358 * checkboxes later (after the edit form) */
361359 if ($wgCategoryBox) {
@@ -369,14 +367,14 @@
370368 // add css hooks only to the edit page
371369 $wgHooks['SkinTemplateSetupPageCss'][] = 'UW_GenericEditPage_editPageCss';
372370 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'UW_GenericEditPage_addCssHookGenEd';
373 -
374371
 372+
375373 /* the current contents of the page we are
376374 * editing will be broken up into $page(and
377375 * combined with $layout, later on) */
378376 $page = array();
379377 $title = "";
380 -
 378+
381379 /* always create a space for the first un-named
382380 * section, even if it is not used */
383381 $page[] = array();
@@ -384,14 +382,14 @@
385383 for ($i = 0; $i < count ($nodes); $i++) {
386384 $value = trim ($nodes[$i]);
387385 $this_section = count ($page) - 1;
388 -
 386+
389387 // is this block of text a header?
390388 $node_is_title = preg_match ('/^(==?)\s*(.+?)\s*\\1$/i', $value, $matches);
391389
392390 /* for titles, create a new element in the
393391 * page array, to store the title and text */
394392 if ($node_is_title) {
395 -
 393+
396394 // extract header level and title
397395 $level = strlen ($matches[1]);
398396 $title = htmlspecialchars ($matches[2]);
@@ -402,30 +400,30 @@
403401 'level' => $level,
404402 'in-use' => true
405403 );
406 -
 404+
407405 /* not header -> plain text (store in
408406 / * the previous section, with title) */
409407 } else {
410408 $page[$this_section]['text'] = $value;
411409 }
412 -
 410+
413411 /* fetch the meta-data for new sections, or
414412 * the un-named first section. this is done
415413 * here (not when merging) because meta-data
416414 * can ONLY come from the layout (not the page) */
417415 if ($node_is_title or $i==0) {
418 -
 416+
419417 /* now check if any meta-data exists for this
420418 * section in the layout for this page
421419 * (ignore the first two sections)
422420 * j = 0: page meta-data
423421 * j = 1: special first section */
424 - for ($j = 1; $j < count ($layout); $j++) {
 422+ for ($j = 1; $j < count ($layout); $j++) {
425423 if ($layout[$j]['title'] == $title) {
426424 // we found a corresponding section in the layout
427425 // so we copy all the associated meta-data
428426 foreach ($layout[$j] as $k => $v) {
429 -
 427+
430428 // don't overwrite the page text!
431429 if ($k != "text") $page[count ($page)-1][$k] = $v;
432430 }
@@ -433,11 +431,11 @@
434432 }
435433 }
436434 }
437 -
 435+
438436 /* the results of the
439437 * layout + page merge */
440438 $result = array();
441 -
 439+
442440 /* special case: if the first (un-named) section has text in the layout,
443441 * but not in the page, copy it. otherwise, use the page text (even if empty) */
444442 $result[] = ($layout[0]['text'] && !$page[0]['text']) ? $layout[0] : $page[0];
@@ -461,10 +459,10 @@
462460 $result[] = $page[$found_at];
463461 }
464462 }
465 -
 463+
466464 // now put in the stuff that is not in the layout, but IS in the page
467465 for ($i = 1; $i < count ($page); $i++) {
468 -
 466+
469467 // if this section is already in the result,
470468 // then skip to the next page section
471469 for ($j=0; $j<count ($result); $j++) {
@@ -477,14 +475,14 @@
478476 * of the section BEFORE this section, which
479477 * we will insert after */
480478 $insert_at = null;
481 -
 479+
482480 for ($j=0; $j<count ($result); $j++) {
483481 if ($result[$j]['title'] == $page[$i-1]['title']) {
484482 $insert_at = $j+1;
485483 break;
486484 }
487485 }
488 -
 486+
489487 if ($insert_at===null) $result[] = $page[$i];
490488 else array_splice ($result, $insert_at, 0, array($page[$i]));
491489 }
@@ -498,7 +496,7 @@
499497 break;
500498 }
501499 }
502 -
 500+
503501 // use the default (untitled) section if there is nothing else
504502 if (!$any_in_use) {
505503 $result[0]['in-use'] = true;
@@ -532,7 +530,7 @@
533531 value: '".wfMsg ('gep_genericmode')."'
534532 }).inject($('content'));
535533 ");
536 -
 534+
537535 /* only enforce the categorization of pages in the
538536 * main namespace, using the generic edit page */
539537 if ($wgRequireCategory && ($wgTitle->getNamespace() == NS_MAIN)) {
@@ -540,11 +538,11 @@
541539 /* when the form is submitted, check that one or
542540 * more categories were selected, or alert */
543541 $('editform').addEvent ('submit', function (e) {
544 -
 542+
545543 // only enforce when in generic mode
546544 if (!document.body.hasClass ('edit-generic'))
547545 return true;
548 -
 546+
549547 /* iterate the category checkboxes, and count
550548 * how many of them are 'ticked' */
551549 var checked = 0;
@@ -603,7 +601,7 @@
604602 * not it is currently in use. titles
605603 * without text are kind of useless */
606604 if ($result[$i]['lock-text']) {
607 -
 605+
608606 /* render the wiki markup into HTML, the old-school
609607 * way which actually works, unlike recursiveTagParse() */
610608 $text = $wgParser->parse ($result[$i]['text'], $wgTitle, new ParserOptions)->getText();
@@ -681,7 +679,7 @@
682680 }
683681
684682
685 - // also attach our generic editor stylesheet
 683+ // also attach our generic editor stylesheet
686684 function UW_GenericEditPage_editPageCss (&$out) {
687685 global $wgScriptPath;
688686 $out .= "@import '$wgScriptPath/extensions/uniwiki/GenericEditPage/style.css';\n";
@@ -694,7 +692,7 @@
695693 function UW_GenericEditPage_combineBeforeSave (&$editpage_Obj) {
696694 global $wgRequest, $wgSwitchMode;
697695 $data = $wgRequest->data;
698 -
 696+
699697 /* if this request was triggered by the user
700698 * pressing the "switch mode" button, then
701699 * set a global to do some jiggery-pokery
@@ -706,7 +704,7 @@
707705 * then this function does nothing! */
708706 if ($data['edit-mode'] != "generic")
709707 return true;
710 -
 708+
711709 /* otherwise, clear the textbox and rebuild it
712710 * from the generic input POST data */
713711 $editpage_Obj->textbox1 = '';
@@ -715,14 +713,14 @@
716714 $directives = array();
717715 foreach ($data as $key => $value) {
718716 if (trim ($value) != '') {
719 -
 717+
720718 if (substr($key, 0, 6) == 'title-') {
721719 $index = intval (substr($key, 6));
722 -
 720+
723721 /* only add this section if it is enabled,
724722 * by checking the associated checkbox */
725723 if (isset ($data["enable-$index"])) {
726 -
 724+
727725 /* got a title -> add it back as a header,
728726 * by fetching the level from field "level-N" */
729727 $level = isset ($data["level-$index"]) ? $data["level-$index"] : 2;
@@ -746,14 +744,14 @@
747745 }
748746 }
749747 }
750 -
 748+
751749 /* put the section titles and text
752750 * back into the default textbox */
753751 foreach (array_keys ($nodes) as $k) {
754752 if ($nodes[$k]['title']) $editpage_Obj->textbox1 .= $nodes[$k]['title'];
755753 if ($nodes[$k]['text']) $editpage_Obj->textbox1 .= $nodes[$k]['text'];
756754 }
757 -
 755+
758756 // then add back the categories
759757 if (count ($categories) != 0) {
760758 sort ($categories);
@@ -769,4 +767,3 @@
770768
771769 return true;
772770 }
773 -
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php
___________________________________________________________________
Added: svn:eol-style
774771 + native
Index: trunk/extensions/uniwiki/GenericEditPage/global.css
@@ -3,5 +3,5 @@
44
55 /* hide the [edit] section links */
66 .editsection {
7 - display: none;
 7+ display: none;
88 }
Property changes on: trunk/extensions/uniwiki/GenericEditPage/global.css
___________________________________________________________________
Added: svn:eol-style
99 + native
Index: trunk/extensions/uniwiki/GenericEditPage/style.css
@@ -2,54 +2,53 @@
33 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page
44 * http://www.gnu.org/licenses/gpl-3.0.txt */
55
6 -
76 #editform {
87 position: relative;
9 -
 8+
109 /* mootools sortables requires relative elements to
1110 * have "layout", to correctly calculate dimensions
1211 * see: http://dev.mootools.net/changeset/1499 */
1312 zoom: 1;
1413 }
1514
16 - .generic-editor .instructions {
17 - border: 1px solid #ccc;
18 - background: #eee;
19 - line-height: 6em;
20 - font-size: 200%;
21 - text-align: center;
22 - display: none;
23 - }
 15+.generic-editor .instructions {
 16+ border: 1px solid #ccc;
 17+ background: #eee;
 18+ line-height: 6em;
 19+ font-size: 200%;
 20+ text-align: center;
 21+ display: none;
 22+}
2423
25 - .generic-editor.show-instructions .instructions {
26 - display: block; }
 24+.generic-editor.show-instructions .instructions {
 25+ display: block; }
2726
28 - .generic-editor input,
29 - .generic-editor h2 {
30 - font-size: 160%;
31 - width: 40%;
32 - }
 27+.generic-editor input,
 28+.generic-editor h2 {
 29+ font-size: 160%;
 30+ width: 40%;
 31+}
3332
34 - .generic-editor .in-use {
35 - padding-bottom: 2em;
36 - }
 33+.generic-editor .in-use {
 34+ padding-bottom: 2em;
 35+}
3736
38 - #bodyContent .generic-editor h2 {
39 - margin-bottom: 3px;
40 - padding-top: 0;
41 - width: auto;
42 - }
 37+#bodyContent .generic-editor h2 {
 38+ margin-bottom: 3px;
 39+ padding-top: 0;
 40+ width: auto;
 41+}
4342
44 - .generic-editor .not-in-use {
45 - display: none;
46 - }
 43+.generic-editor .not-in-use {
 44+ display: none;
 45+}
4746
48 - .generic-editor textarea {
49 - height: 12em;
50 - }
 47+.generic-editor textarea {
 48+ height: 12em;
 49+}
5150
52 - .generic-editor .locked-text {
53 - }
 51+.generic-editor .locked-text {
 52+}
5453
5554 /* hide a lot of mediawiki junk at the
5655 * top of the edit form when it generic mode */
@@ -84,85 +83,85 @@
8584 body.edit-generic.with-sidebar #editform {
8685 padding-right: 17em; }
8786
88 - /* hide the sidebar as default */
89 - #sidebar {
90 - position: absolute;
91 - display: none;
92 - right: 0;
93 - top: 0;
94 - width: 15em;
95 - background: #fff;
96 - }
97 -
98 - /* only make it visible in generic mode */
99 - body.edit-generic #sidebar {
100 - display: block; }
101 -
102 - #section-box .sortables div,
103 - #category-box div {
104 - margin-bottom: 1px;
105 - padding: 1px;
106 - }
 87+/* hide the sidebar as default */
 88+#sidebar {
 89+ position: absolute;
 90+ display: none;
 91+ right: 0;
 92+ top: 0;
 93+ width: 15em;
 94+ background: #fff;
 95+}
10796
108 - /* hack to hide the crazy mootools temporary div (spawned
109 - * when dragging starts), to prevent the scrollbar jumping */
110 - #section-box .sortables div { display: none; }
111 - #section-box .sortables div.section-box { display: block; }
 97+/* only make it visible in generic mode */
 98+body.edit-generic #sidebar {
 99+ display: block; }
112100
113 - /* disabled/required sections */
114 - #section-box .disabled {
115 - color: #888;
116 - }
117 -
118 - /* something is draggable, use the hand */
119 - #section-box .sortables div,
120 - #section-box .sortables label {
121 - cursor: pointer;
122 - }
 101+#section-box .sortables div,
 102+#category-box div {
 103+ margin-bottom: 1px;
 104+ padding: 1px;
 105+}
123106
124 - /* something is currently being dragged,
125 - * so use the 'grabbing hand' cursor
126 - * (the whole box, to avoid flickering) */
127 - #section-box .sortables.dragging,
128 - #section-box .sortables.dragging div,
129 - #section-box .sortables.dragging label {
130 - cursor: move !important;
131 - }
 107+/* hack to hide the crazy mootools temporary div (spawned
 108+ * when dragging starts), to prevent the scrollbar jumping */
 109+#section-box .sortables div { display: none; }
 110+#section-box .sortables div.section-box { display: block; }
132111
133 - /* sidebar contains both category-box
134 - * and section-box */
135 - #section-box .add,
136 - #category-box,
137 - #category-box .add,
138 - #category-box .suggest {
139 - border-top: 1px dotted #ccc;
140 - margin: 1em 0 0 0;
141 - padding: 1em 0 0 0;
142 - }
143 - #category-box .add #fm-add-cat,
144 - #category-box .suggest #fm-suggest-cat { clear: both; }
145 - #fm-add-cat, #fm-add-sect { width: 10em; }
146 - #fm-suggest-cat { width: 8em; }
147 -
148 - #category-box .add #fm-add-cat-button,
149 - #category-box .suggest #fm-suggest-cat-button {
150 - margin-top: 0.5em; }
151 -
152 - /* the ajax response box */
153 - #category-box .suggest div {
154 - margin-top: 1em; }
155 -
156 - #sidebar h3,
157 - #section-box .add label,
158 - #category-box .add label,
159 - #category-box .suggest label {
160 - padding: 0;
161 - margin: 0;
162 - font-size: 100%;
163 - font-weight: bold;
164 - padding-bottom: 0.5em;
165 - }
 112+/* disabled/required sections */
 113+#section-box .disabled {
 114+ color: #888;
 115+}
166116
 117+/* something is draggable, use the hand */
 118+#section-box .sortables div,
 119+#section-box .sortables label {
 120+ cursor: pointer;
 121+}
 122+
 123+/* something is currently being dragged,
 124+ * so use the 'grabbing hand' cursor
 125+ * (the whole box, to avoid flickering) */
 126+#section-box .sortables.dragging,
 127+#section-box .sortables.dragging div,
 128+#section-box .sortables.dragging label {
 129+ cursor: move !important;
 130+}
 131+
 132+/* sidebar contains both category-box
 133+ * and section-box */
 134+#section-box .add,
 135+#category-box,
 136+#category-box .add,
 137+#category-box .suggest {
 138+ border-top: 1px dotted #ccc;
 139+ margin: 1em 0 0 0;
 140+ padding: 1em 0 0 0;
 141+}
 142+ #category-box .add #fm-add-cat,
 143+ #category-box .suggest #fm-suggest-cat { clear: both; }
 144+ #fm-add-cat, #fm-add-sect { width: 10em; }
 145+ #fm-suggest-cat { width: 8em; }
 146+
 147+ #category-box .add #fm-add-cat-button,
 148+ #category-box .suggest #fm-suggest-cat-button {
 149+ margin-top: 0.5em; }
 150+
 151+ /* the ajax response box */
 152+ #category-box .suggest div {
 153+ margin-top: 1em; }
 154+
 155+#sidebar h3,
 156+#section-box .add label,
 157+#category-box .add label,
 158+#category-box .suggest label {
 159+ padding: 0;
 160+ margin: 0;
 161+ font-size: 100%;
 162+ font-weight: bold;
 163+ padding-bottom: 0.5em;
 164+}
 165+
167166 .edit-classic .generic-editor,
168167 .edit-generic #toolbar,
169168 .edit-generic #wpTextbox1 {
@@ -190,4 +189,3 @@
191190 body.switching-mode #catlinks {
192191 display: none;
193192 }
194 -
Property changes on: trunk/extensions/uniwiki/GenericEditPage/style.css
___________________________________________________________________
Added: svn:eol-style
195193 + native
Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.js
@@ -2,7 +2,6 @@
33 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page
44 * http://www.gnu.org/licenses/gpl-3.0.txt */
55
6 -
76 Uniwiki.GenericEditPage = {
87
98 /* store the instance of the Mootools sortable
@@ -15,7 +14,7 @@
1615 * sliding around */
1716 sections_sorting: true,
1817
19 -
 18+
2019 /* to switch between modes (generic and classic),
2120 * we must (effectively) click preview (to re-
2221 * combine the wiki markup server-side), and
@@ -24,7 +23,7 @@
2524 /* picked up by the combineBeforeSave hook
2625 * in GenericEditor.php to set the new mode */
2726 $("switch-mode").value = 1;
28 -
 27+
2928 /* simulate a click on "preview" by setting
3029 * a faux input field with the same name */
3130 $("wpFakePreview").name = "wpPreview";
@@ -38,7 +37,7 @@
3938 editor: function () {
4039 return $$(".generic-editor")[0];
4140 },
42 -
 41+
4342 /* util function to trigger a click event
4443 * upon receiving an [ENTER] key press (for
4544 * the add [cat | section] boxes, initially */
@@ -79,7 +78,7 @@
8079
8180
8281 Events: {
83 -
 82+
8483 // == SYNCHRONISE SIDEBAR WITH EDITABLE TITLES ==
8584 section_title_change: function() {
8685 $$(".generic-editor input.section-title").
@@ -101,7 +100,7 @@
102101 * have to do insert any wiki markup, because the combine-
103102 * BeforeSave function in GenericEditPage.php will do it */
104103 acat_btn.addEvent( "click", function(e) {
105 -
 104+
106105 // abort if no category name was entered
107106 var cat_name = acat_fld.value.trim();
108107 if (cat_name == "") return true;
@@ -111,7 +110,7 @@
112111 var already_exists = false;
113112 $$("#category-box input[type=checkbox]").each (function(obj) {
114113 if (obj.name == "category-" + cat_name) {
115 -
 114+
116115 /* ensure that the category is checked,
117116 * and highlight it to notify the user */
118117 already_exists = true;
@@ -123,13 +122,13 @@
124123
125124 // abort if the new cat name already exists
126125 if (already_exists) return true;
127 -
 126+
128127 /* if no category by this name already exists,
129128 * then we will add a new checkbox (to be found
130129 * by the server-side combineBeforeSave function) */
131130 var f_id = "category-" + cat_name;
132131 var div = new Element ("div").appendText(" ");
133 -
 132+
134133 // create the new checkbox
135134 var input = new Element ("input", {
136135 'id': f_id,
@@ -137,20 +136,20 @@
138137 'type': "checkbox",
139138 'checked': "checked"
140139 }).inject(div);
141 -
 140+
142141 // create the label
143142 var label = new Element ("label", { 'for': f_id })
144143 .appendText (cat_name).inject (div);
145 -
 144+
146145 /* insert the new category before the add
147146 * form and flash it, to notify the user */
148147 div.inject (acat_btn.getParent(), "before");
149148 div.highlight();
150 -
 149+
151150 /* clear the new category name field */
152151 acat_fld.value = "";
153152 });
154 -
 153+
155154 /* catch the ENTER key in the category name box,
156155 * to prevent the entire edit form from submitting
157156 * (redirect it to the click event, above) */
@@ -173,7 +172,7 @@
174173
175174 var already_exists = false;
176175 $$("#section-box input[type=checkbox]").each (function(obj) {
177 -
 176+
178177 /* fetch the NAME of this checkbox, via its label
179178 * (section checkboxes are only identified by index) */
180179 var labels = obj.getParent().getElements('label');
@@ -196,14 +195,14 @@
197196 if (already_exists) return true;
198197
199198 /* we're creating a new section; index
200 - * it one higher than the current maximum */
 199+ * it one higher than the current maximum */
201200 sect_index++;
202 -
 201+
203202 var div = new Element ("div", {
204203 'id': "sect-" + sect_index,
205204 'class': "section-box"
206205 });
207 -
 206+
208207 // create the checkbox
209208 var f_name = "enable-" + sect_index;
210209 var f_id = "fm-" + f_name;
@@ -217,11 +216,11 @@
218217 /* add a single space between the checkbox
219218 * and label, to match existing sections */
220219 div.appendText(" ");
221 -
 220+
222221 // create the label
223222 var label = new Element ("label", { 'for': f_id })
224223 .appendText (sect_name).inject (div);
225 -
 224+
226225 /* insert the new section div (in sidebar) into the
227226 * sortables container, and hook up the event handlers
228227 * to make it play nice with the other sections */
@@ -229,7 +228,7 @@
230229 var sortables = Uniwiki.GenericEditPage.sections_sortables;
231230 if (sortables) sortables.addItems (div);
232231 div.highlight();
233 -
 232+
234233 // create and inject the real section into the editor
235234 var klass = "section sect-" + (sect_index+1) + " in-use";
236235 var div = new Element ("div", { 'id': "section-" + sect_index, 'class': klass });
@@ -244,15 +243,15 @@
245244 * this section */
246245 if (Uniwiki.CustomToolbar)
247246 Uniwiki.CustomToolbar.attach (txta);
248 -
 247+
249248 /* hide the instructions box, now that we
250249 * have at least one section in the editor */
251250 Uniwiki.GenericEditPage.update_instructions_box();
252 -
 251+
253252 // clear the "new section name" field
254253 asect_fld.value = "";
255254 });
256 -
 255+
257256 Uniwiki.GenericEditPage.bind_enter_to_click (asect_fld, asect_btn);
258257 },
259258
@@ -264,7 +263,7 @@
265264 // == HANDLE SECTION-IN-USE CHECKBOXES ==
266265 var evt_type = Browser.Engine.trident ? 'click' : 'change';
267266 sortables.addEvent(evt_type, function(e) {
268 -
 267+
269268 // don't mess with things that aren't checkboxes
270269 if ($(e.target).get('tag') != 'input') return true;
271270
@@ -288,7 +287,7 @@
289288
290289 // we will need this all over the place
291290 var editor = Uniwiki.GenericEditPage.editor();
292 -
 291+
293292 // check that this document has a sortable sections box
294293 var sortables = $$("#section-box .sortables")[0];
295294 if (!sortables) return true;
@@ -300,14 +299,14 @@
301300 * because mootools waits for mousedown THEN mousemove to trigger; which
302301 * is quite confusing for end-users */
303302 sortables.addEvent ("mousedown", function(e) {
304 -
 303+
305304 // don't highlight anything if sorting is suspended
306305 if (!Uniwiki.GenericEditPage.sections_sorting)
307306 return false;
308307
309308 var t = $(e.target);
310309 var tag = t.get("tag");
311 -
 310+
312311 /* do nothing for input (checkbox), as not to interfere
313312 * with their normal behaviour. otherwise, highlight
314313 * the section box (entire row) */
@@ -324,12 +323,12 @@
325324 dragger.retrieve ("tween").cancel();
326325 dragger.store ("tween", null);
327326 }
328 -
 327+
329328 // set css hooks to make dragging visible
330329 dragger.setStyle ("background-color", "#ff8");
331330 dragger.getParent().addClass ("dragging");
332331 dragger.addClass ("dragging");
333 -
 332+
334333 /* watch the whole document for mouseup, because the
335334 * cursor may no longer be in the sortables box */
336335 var evt = function() {
@@ -363,7 +362,7 @@
364363 Uniwiki.GenericEditPage.sections_sortables =
365364 new Sortables(sortables, {
366365 onComplete: function(obj) {
367 -
 366+
368367 // fetch the section we are moving
369368 var sect_id = obj.id.replace(/\D/g, "");
370369 var section = $("section-" + sect_id);
@@ -377,7 +376,7 @@
378377 // skip this whole thing is the position has not changed
379378 if (!section || (newIndex == oldIndex))
380379 return true;
381 -
 380+
382381 /* disable sorting and sizing until all of the
383382 * re-ordering and sliding around is done */
384383 Uniwiki.GenericEditPage.sections_sortables.detach();
@@ -387,7 +386,7 @@
388387 var stage = 1;
389388 var slider = new Fx.Slide (section, {
390389 onComplete: function() {
391 -
 390+
392391 // 1 = SLIDE OUT EVENT
393392 if (stage==1) {
394393 stage = 2;
@@ -397,7 +396,7 @@
398397 /* the div that is actually moving is
399398 * intermediate (inserted by MooTools) */
400399 var moving = section.getParent();
401 -
 400+
402401 /* newIndex offset is always +2, to skip the first (anonymous)
403402 * introduction section and the instruction box. both are inside
404403 * the generic editor (even if they shouldn't be) */
@@ -430,10 +429,10 @@
431430 * condition in IE6, which i don't have time to debug */
432431 moving.inject(anchor, rel);
433432 (function () { slider.slideIn(); }).delay(100);
434 -
 433+
435434 // 2 = SLIDE IN EVENT
436435 } else if (stage==2) {
437 -
 436+
438437 /* get rid of intermediate element,
439438 * and don't re-call this event. this
440439 * breaks encapsulation, and is a hack :( */
@@ -499,4 +498,3 @@
500499 }
501500 } // Events
502501 };
503 -
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.js
___________________________________________________________________
Added: svn:eol-style
504502 + native
Index: trunk/extensions/uniwiki/CreatePage/CreatePage.i18n.php
@@ -47,4 +47,3 @@
4848 'createpage_tryagain' => "Não - Eu quero criar uma nova página com outro título.",
4949 'createpage_editexisting' => "Sim - Eu quero editar a página existente."
5050 );
51 -
Property changes on: trunk/extensions/uniwiki/CreatePage/CreatePage.i18n.php
___________________________________________________________________
Added: svn:eol-style
5251 + native
Index: trunk/extensions/uniwiki/CreatePage/CreatePage.php
@@ -2,17 +2,16 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
1211
1312 /* This code was adapted from CreatePage.php from:
1413 * Travis Derouin <travis@wikihow.com>
1514 *
16 - * originally licensed as:
 15+ * originally licensed as:
1716 * GNU GPL v2.0 or later */
1817
1918 $wgExtensionCredits['other'][] = array(
@@ -56,63 +55,62 @@
5756 $skin = $wgUser->getSkin();
5857 $thisPage = Title::newFromText ("CreatePage", NS_SPECIAL);
5958 $target = $wgRequest->getVal ("target", null);
60 -
 59+
6160 // check to see if we are trying to create a page
6261 if ($target != null) {
6362 $title = Title::newFromText ($target);
64 -
 63+
6564 if ($title->getArticleID() > 0) {
66 -
 65+
6766 // if the title exists then let the user know and give other options
6867 $wgOut->addWikiText (wfMsg ("createpage_titleexists", $title->getFullText())."<br/>");
69 - $wgOut->addHTML ("<a href='".$title->getEditURL()."'>".wfMsg ("createpage_editexisting")."</a><br/>"
 68+ $wgOut->addHTML ("<a href='".$title->getEditURL()."'>".wfMsg ("createpage_editexisting")."</a><br/>"
7069 .$skin->makeLinkObj ($thisPage, wfMsg ("createpage_tryagain"))
7170 );
7271 } else {
7372 /* TODO - may want to search for closely named pages and give
7473 * other options here... */
75 -
 74+
7675 // otherwise, redirect them to the edit page for their title
7776 $wgOut->redirect ($title->getEditURL());
7877 }
79 -
 78+
8079 return;
8180 }
82 -
 81+
8382 // if this is just a normal GET, then output the form
84 -
 83+
8584 // prefill the input with the title, if it was passed along
8685 $newTitle = $wgRequest->getVal("newtitle", null);
8786 if ($newTitle != null) $newTitle = str_replace("_", " ", $newTitle);
88 -
 87+
8988 // add some instructions
9089 $wgOut->addHTML(wfMsg('createpage_instructions'));
91 -
 90+
9291 // js for checking the form
9392 $wgOut->addHTML("
94 - <script type='text/javascript' >
95 - function checkForm(){
96 - // check the title
97 - if (document.createpageform.target && document.createpageform.target.value == \"\") {
98 - alert('".wfMsg('createpage_entertitle')."');
99 - document.createpageform.target.focus();
100 - return false;
101 - }
 93+ <script type='text/javascript' >
 94+ function checkForm(){
 95+ // check the title
 96+ if (document.createpageform.target && document.createpageform.target.value == \"\") {
 97+ alert('".wfMsg('createpage_entertitle')."');
 98+ document.createpageform.target.focus();
 99+ return false;
 100+ }
102101 // everything is OK, return true
103 - return true;
104 - }
105 - </script>
 102+ return true;
 103+ }
 104+ </script>
106105 ");
107 -
 106+
108107 // output the form
109108 $wgOut->addHTML("
110109 <form method=POST onsubmit='return checkForm()' name='createpageform'>
111110 <input type=text name=target size=50 value='$newTitle'><br/><br/>
112111 ");
113 -
 112+
114113 $wgOut->addHTML("
115114 <input type=submit value='".wfMsg('createpage_submitbutton')."'>
116115 </form>
117116 ");
118117 }
119 -
Property changes on: trunk/extensions/uniwiki/CreatePage/CreatePage.php
___________________________________________________________________
Added: svn:eol-style
120118 + native
Index: trunk/extensions/uniwiki/CreatePage/style.css
@@ -18,14 +18,14 @@
1919 border: 0;
2020 }
2121
22 - #p-create .pBody a {
23 - display: block;
24 - font-size: 18px;
25 - font-weight: bold;
26 - line-height: 1;
27 - text-align: center;
28 - border: 2px solid #c7c7c7;
29 - border-top-width: 4px;
30 - padding: 1em 0;
31 - color: #0099ff;
32 - }
 22+#p-create .pBody a {
 23+ display: block;
 24+ font-size: 18px;
 25+ font-weight: bold;
 26+ line-height: 1;
 27+ text-align: center;
 28+ border: 2px solid #c7c7c7;
 29+ border-top-width: 4px;
 30+ padding: 1em 0;
 31+ color: #0099ff;
 32+}
Property changes on: trunk/extensions/uniwiki/CreatePage/style.css
___________________________________________________________________
Added: svn:eol-style
3333 + native
Index: trunk/extensions/uniwiki/Layouts/Layouts.i18n.php
@@ -6,7 +6,6 @@
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 $wgLayoutsMessages = array();
1211 $wgLayoutsMessages['en'] = array(
1312 'layouts_title' => "Create a page",
@@ -47,4 +46,3 @@
4847 'layouts_unknown' => "DESCONHECIDO",
4948 'layouts_tagline' => "Esta página foi gerada pelo layout <strong>$1</strong>."
5049 );
51 -
Property changes on: trunk/extensions/uniwiki/Layouts/Layouts.i18n.php
___________________________________________________________________
Added: svn:eol-style
5250 + native
Index: trunk/extensions/uniwiki/Layouts/Layouts.php
@@ -2,11 +2,10 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Layouts
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
1211
1312 $wgExtensionCredits['other'][] = array(
@@ -83,32 +82,32 @@
8483 * in the middle of switching modes */
8584 if ($wgRequest->data['switch-mode'])
8685 return true;
87 -
 86+
8887 /* if this page is new,
8988 * no layout variable is in the query string,
9089 * and the page is in a namespace that is using the extension
9190 * and we are not submitting the form (either saving OR preview) */
92 - if ($article->fetchContent()===false
93 - && ($wgRequest->getVal ("layout")===NULL)
 91+ if ($article->fetchContent()===false
 92+ && ($wgRequest->getVal ("layout")===NULL)
9493 && in_array ($article->mTitle->getNamespace(), $wgLayoutWhiteList)
9594 && ($wgRequest->getVal("action") != "submit"))
9695
9796 // redirect to the "pick a layout" page!
9897 $wgOut->redirect($article->mTitle->getInternalUrl ("action=layout"));
99 -
 98+
10099 return true;
101100 }
102101
103102 $wgHooks['UnknownAction'][] = "UW_Layouts_checkActionIsLayout";
104103 function UW_Layouts_checkActionIsLayout($action, $article) {
105 - global $wgOut, $wgDBprefix, $wgLayoutCategories, $wgLayoutUseCategoryPage,
 104+ global $wgOut, $wgDBprefix, $wgLayoutCategories, $wgLayoutUseCategoryPage,
106105 $wgNoLayoutOption, $wgLayoutCategoryPage, $wgContLang,
107106 $wgLayoutCategoryNSWhiteList;
108 -
 107+
109108 // not layout = do nothing
110109 if ($action!="layout")
111110 return true;
112 -
 111+
113112 /* if this page already exists, or
114113 * is a discussion page, redirect
115114 * to the regular edit page */
@@ -117,7 +116,7 @@
118117 $wgOut->redirect($article->mTitle->getInternalUrl ("action=edit"));
119118 return false;
120119 }
121 -
 120+
122121 // pluck out the bits that we need from mTitle
123122 $title = $article->mTitle->getPrefixedText();
124123 $url = $article->mTitle->getInternalUrl();
@@ -125,13 +124,13 @@
126125 $namespace = $article->mTitle->getNamespace();
127126
128127 $wgOut->setPageTitle (wfMsg ("layouts_title"));
129 -
 128+
130129 /* fetch all articles/pages in the NS_LAYOUT namespace
131130 * by directly querying the database. mediawiki doesn't
132131 * provide any OO way of doing this :( */
133132 $db = wfGetDB(DB_MASTER);
134133 $layouts = $db->resultObject ($db->query ("select * from {$wgDBprefix}page where page_namespace=".NS_LAYOUT." order by page_title"));
135 -
 134+
136135 $wgOut->addHTML (wfMsg ("layouts_chooselayout", $title)."
137136 <form action='$url' method='get'>
138137 <input type='hidden' name='title' value='$name' />
@@ -150,17 +149,17 @@
151150 $text = $revision->getText();
152151 $lines = explode ("\n", $text);
153152 $namespaces = array();
154 -
 153+
155154 // add this layout to the choices by default
156155 $add = true;
157 -
 156+
158157 /* go through the layout text and see if it has an @namespace
159158 * restriction, if so only add the layout as a choice if we find
160159 * the namespace of this page in the layout text */
161160 foreach ($lines as $line) {
162161 if (preg_match ("/^@namespace(.+?)$/m", $line, $matches)) {
163162 $namespaces = explode (" ", trim($matches[1]));
164 - $add = in_array ($wgContLang->getNsText ($namespace), $namespaces) ||
 163+ $add = in_array ($wgContLang->getNsText ($namespace), $namespaces) ||
165164 $namespace == NS_MAIN && in_array ("Main", $namespaces);
166165 }
167166 }
@@ -189,32 +188,32 @@
190189 ");
191190 }
192191 $wgOut->addHTML("<br/>");
193 -
 192+
194193 /* check to see if we are allowing categories on the layout page
195194 * and if so then, either grab all the categories, or get them from
196195 * the designated page (do this for pages in the whitelisted namespaces) */
197196 if ($wgLayoutCategories && in_array($namespace, $wgLayoutCategoryNSWhiteList)) {
198197 $categories = array();
199 -
 198+
200199 /* get the categories from the page if desired,
201200 * otherwise grab them from the db */
202201 if ($wgLayoutUseCategoryPage) {
203202 $revision = Revision::newFromTitle(Title::newFromDBKey($wgLayoutCategoryPage));
204203 $results = $revision ? split("\n", $revision->getText()) : array();
205204 foreach ($results as $result) {
206 - if (trim ($result) != '')
207 - $categories[] = Title::newFromText(trim($result))->getDBkey();
 205+ if (trim ($result) != '')
 206+ $categories[] = Title::newFromText(trim($result))->getDBkey();
208207 }
209208 } else {
210209 // todo: implement this later...
211210 }
212 -
 211+
213212 // add radio buttons for the categories
214213 $default = true;
215214 $title = $article->mTitle->getPrefixedText();
216215 $wgOut->addHTML("<div id='category-box'>".wfMsg ("layouts_choosecategory", $title));
217216 foreach ($categories as $category) {
218 - $checked = $default ? "checked='checked'" : "";
 217+ $checked = $default ? "checked='checked'" : "";
219218 $default = false;
220219 $fm_id = "category-$category";
221220 $caption = Title::newFromDBkey ($category)->getText();
@@ -227,10 +226,10 @@
228227 }
229228 $wgOut->addHTML ("</div><br/>");
230229 }
231 -
 230+
232231 $wgOut->addHTML ("<input type='submit' value='".wfMsg('layouts_continue')."' />");
233232 $wgOut->addHTML ("</form>");
234 -
 233+
235234 return false;
236235 }
237236
@@ -244,31 +243,31 @@
245244 $wgHooks['EditFormPreloadText'][] = "UW_Layouts_preFillTextBox";
246245 function UW_Layouts_preFillTextBox (&$text, $title) {
247246 global $wgRequest, $wgAddLayoutLink;
248 -
 247+
249248 /* fetch the layout from the query string,
250249 * or abort this hook if it is missing */
251250 $layout_slug = $wgRequest->getVal ("layout");
252251 if ($layout_slug === NULL)
253252 return true;
254 -
 253+
255254 // fetch the layout object
256255 $layout_title = Title::newFromURL ("Layout:".$layout_slug);
257256 $layout_article = new Article ($layout_title);
258 -
 257+
259258 /* if the layout article exists, pre-fill the textarea with its
260259 * wiki text. if it doesn't exist, do nothing (no error) */
261260 if (($layout_text = $layout_article->fetchContent()) !== false) {
262 -
 261+
263262 /* break the layout text into sections by splitting
264263 * at header level =one= or ==two==, and iterate */
265264 $nodes = preg_split ("/^(==?[^=].*)$/mi", $layout_text, -1, PREG_SPLIT_DELIM_CAPTURE);
266265 for ($i=0; $i<count($nodes); $i++) {
267 -
 266+
268267 /* if the next node is OPTIONAL, then skip over it
269268 * (it will be included if using GenericEditor) */
270269 if (preg_match ("/^@optional$/m", $nodes[$i+1])) {
271270 $i++;
272 -
 271+
273272 /* not an optional section, or
274273 * text that hasn't been skipped */
275274 } else {
@@ -281,7 +280,6 @@
282281
283282 if ($wgAddLayoutLink && $layout_slug != 'none')
284283 $text .= "\n\n<layout name=\"$layout_slug\" />";
285 -
 284+
286285 return true;
287286 }
288 -
Property changes on: trunk/extensions/uniwiki/Layouts/Layouts.php
___________________________________________________________________
Added: svn:eol-style
289287 + native
Index: trunk/extensions/uniwiki/Layouts/style.css
@@ -17,16 +17,15 @@
1818 padding: 0pt 0.8em 0.3em 0.5em;
1919 }
2020
21 - #p-search form {
22 - padding: 5px;
23 - }
 21+#p-search form {
 22+ padding: 5px;
 23+}
2424
25 - #searchInput {
26 - width: 10em;
27 - margin-bottom: 4px;
28 - }
29 -
30 - /* hide the "GO" button, but leave
31 - * it accessible by hitting ENTER */
32 - #searchGoButton { display: none; }
 25+#searchInput {
 26+ width: 10em;
 27+ margin-bottom: 4px;
 28+}
3329
 30+/* hide the "GO" button, but leave
 31+ * it accessible by hitting ENTER */
 32+#searchGoButton { display: none; }
Property changes on: trunk/extensions/uniwiki/Layouts/style.css
___________________________________________________________________
Added: svn:eol-style
3433 + native
Index: trunk/extensions/uniwiki/FormatChanges/FormatChanges.i18n.php
@@ -10,5 +10,5 @@
1111 $wgFormatChangesMessages['en'] = array(
1212 'fc_anonymous' => "Anonymous",
1313 'fc_createdby' => "created by",
14 - 'fc_editedby' => "edited by"
 14+ 'fc_editedby' => "edited by",
1515 );
Property changes on: trunk/extensions/uniwiki/FormatChanges/FormatChanges.i18n.php
___________________________________________________________________
Added: svn:eol-style
1616 + native
Index: trunk/extensions/uniwiki/FormatChanges/FormatChanges.php
@@ -1,11 +1,10 @@
22 <?php
33 /* vim: noet ts=4 sw=4
44 * http://www.gnu.org/licenses/gpl-3.0.txt */
5 -
 5+
66 if (!defined("MEDIAWIKI"))
77 die();
88
9 -
109 /* ---- CREDITS ---- */
1110
1211 $wgExtensionCredits['other'][] = array(
@@ -30,11 +29,11 @@
3130
3231 $wgHooks['FetchChangesList'][] = "UW_FormatChanges";
3332 function UW_FormatChanges($user, $skin, $list) {
34 - $list = new UniwikiChangesList($skin);
 33+ $list = new UniwikiChangesList($skin);
3534 return false;
3635 }
3736
38 -class UniwikiChangesList extends ChangesList {
 37+class UniwikiChangesList extends ChangesList {
3938
4039 public function recentChangesLine(&$rc, $watched=false) {
4140 global $wgLang;
@@ -47,18 +46,18 @@
4847 /* NOTE: the following logic is reproduced from
4948 * the old version of the recent changes
5049 * page in case we want to produce a
51 - * similar result (though much is not
52 - * implemented yet)...
 50+ * similar result (though much is not
 51+ * implemented yet)...
5352 */
5453
5554 // moved pages
5655 if ($rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT) {
5756 // handle these?
58 - }
 57+ }
5958 // log entries(old) and special pages
6059 else if ($rc_namespace == NS_SPECIAL) {
6160 // handle these?
62 - }
 61+ }
6362 // new unpatrolled pages
6463 else if ($rc->unpatrolled && $rc_type == RC_NEW) {
6564 // handle these?
@@ -77,12 +76,11 @@
7877 $user_link = ($rc_user > 0) ? $this->skin->userLink($rc_user, $rc_user_text) : wfMsg('fc_anonymous');
7978 }
8079 $timestamp = $wgLang->time($rc->mAttribs['rc_timestamp'], true, true);
81 - $action = ($rc_type == RC_NEW) ? wfMsg('fc_createdby') : wfMsg('fc_editedby');
 80+ $action = ($rc_type == RC_NEW) ? wfMsg('fc_createdby') : wfMsg('fc_editedby');
8281 $line .= $page_link . " - " . $action . " " . $user_link . " (" . $timestamp . ")";
8382 $line .= "</li>";
8483 }
8584
8685 return $line;
8786 }
88 -
8987 }
Property changes on: trunk/extensions/uniwiki/FormatChanges/FormatChanges.php
___________________________________________________________________
Added: svn:eol-style
9088 + native
Index: trunk/extensions/uniwiki/Authors/Authors.i18n.php
@@ -9,5 +9,5 @@
1010
1111 $wgAuthorsMessages['en'] = array(
1212 'authors_authors' => "Authors",
13 - 'authors_anonymous' => "Anonymous"
 13+ 'authors_anonymous' => "Anonymous",
1414 );
Property changes on: trunk/extensions/uniwiki/Authors/Authors.i18n.php
___________________________________________________________________
Added: svn:eol-style
1515 + native
Index: trunk/extensions/uniwiki/Authors/Authors.php
@@ -2,13 +2,11 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Authors
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
12 -
1311 $wgExtensionCredits['other'][] = array(
1412 'name' => "Authors",
1513 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)",
@@ -16,7 +14,6 @@
1715 );
1816
1917 /* ---- INTERNATIONALIZATION ---- */
20 -
2118 require_once ("Authors.i18n.php");
2219 $wgExtensionFunctions[] = "UW_Authors_i18n";
2320
@@ -28,26 +25,23 @@
2926 }
3027
3128 /* ---- CONFIGURABLE OPTIONS ---- */
32 -
3329 $wgShowAuthorsNamespaces = array (NS_MAIN);
3430 $wgShowAuthors = true;
3531
36 -
3732 /* ---- HOOKS ---- */
38 -
3933 $wgHooks['OutputPageBeforeHTML'][] = "UW_Authors_List";
4034 function UW_Authors_List (&$out, &$text) {
4135 global $wgTitle, $wgRequest, $wgShowAuthorsNamespaces, $wgShowAuthors;
42 -
 36+
4337 /* do nothing if the option is disabled
4438 * (but why would the extension be enabled?) */
4539 if (!wgShowAuthors)
4640 return true;
47 -
 41+
4842 // only build authors on namespaces in $wgShowAuthorsNamespaces
4943 if (!in_array ($wgTitle->getNamespace(), $wgShowAuthorsNamespaces))
5044 return true;
51 -
 45+
5246 /* get the contribs from the database (don't use the default
5347 * MediaWiki one since it ignores the current user) */
5448 $article = new Article ($wgTitle);
@@ -61,23 +55,23 @@
6256 WHERE rev_page = {$article->getID()}
6357 GROUP BY rev_user, rev_user_text, user_real_name
6458 ORDER BY timestamp DESC";
65 -
 59+
6660 $results = $db->query ($sql, __METHOD__);
6761 while ($line = $db->fetchObject ($results)) {
6862 $contribs[] = array(
69 - $line->rev_user,
70 - $line->rev_user_text,
 63+ $line->rev_user,
 64+ $line->rev_user_text,
7165 $line->user_real_name
7266 );
7367 }
7468
7569 $db->freeResult ($results);
76 -
77 -
 70+
 71+
7872 // return if there are no authors
7973 if (sizeof ($results) <= 0)
8074 return true;
81 -
 75+
8276 // now build a sensible authors display in HTML
8377 require_once ("includes/Credits.php");
8478 $authors = "\n<div class='authors'>".
@@ -88,10 +82,10 @@
8983 $id = $author[0];
9084 $username = $author[1];
9185 $realname = $author[2];
92 -
 86+
9387 if ($id != "0") { // user with an id
9488 $author_link = $realname
95 - ? creditLink($username, $realname)
 89+ ? creditLink($username, $realname)
9690 : creditLink($username);
9791 $authors .= "<li>$author_link</li>";
9892 } else { // anonymous
@@ -102,8 +96,7 @@
10397 if ($anons > 0)
10498 $authors .= "<li>" . wfMsg('authors_anonymous') . "</li>";
10599 $authors .= "</ul></div>";
106 -
 100+
107101 $text .= $authors;
108102 return true;
109103 }
110 -
Property changes on: trunk/extensions/uniwiki/Authors/Authors.php
___________________________________________________________________
Added: svn:eol-style
111104 + native
Index: trunk/extensions/uniwiki/Javascript/uniwiki.js
@@ -2,11 +2,10 @@
33 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Javascript
44 * http://www.gnu.org/licenses/gpl-3.0.txt */
55
6 -
76 // global uniwiki stuff
87 var Uniwiki = {
98 i18n: {
10 -
 9+
1110 /* other extensions should use this function
1211 * to make their i18n strings accessible to JS */
1312 add: function(obj) {
@@ -22,4 +21,3 @@
2322 function wfMsg (key) {
2423 return Uniwiki.i18n[key];
2524 }
26 -
Property changes on: trunk/extensions/uniwiki/Javascript/uniwiki.js
___________________________________________________________________
Added: svn:eol-style
2725 + native
Index: trunk/extensions/uniwiki/Javascript/Javascript.php
@@ -6,14 +6,12 @@
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 $wgExtensionCredits['other'][] = array(
1211 'name' => "Uniwiki Javascript",
1312 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)",
1413 'description' => "Adds uniwiki.js to each page (which currently just provides lightweight i18n support in Javascript), and serves as a placeholder for future Javascript code shared between Uniwiki extensions"
1514 );
1615
17 -
1816 $wgHooks['BeforePageDisplay'][] = "UW_Javascript_addJS";
1917 function UW_Javascript_addJS($out) {
2018 global $wgScriptPath;
@@ -21,4 +19,3 @@
2220 $out->addScript ("<script type='text/javascript' src='$src'></script>");
2321 return true;
2422 }
25 -
Property changes on: trunk/extensions/uniwiki/Javascript/Javascript.php
___________________________________________________________________
Added: svn:eol-style
2623 + native
Index: trunk/extensions/uniwiki/MooTools12core/MooTools12core.php
@@ -6,7 +6,6 @@
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 $wgExtensionCredits['other'][] = array(
1211 'name' => "MooTools12core",
1312 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)",
@@ -21,4 +20,3 @@
2221 $out->addScript("<script type='text/javascript' src='$src'></script>");
2322 return true;
2423 }
25 -
Property changes on: trunk/extensions/uniwiki/MooTools12core/MooTools12core.php
___________________________________________________________________
Added: svn:eol-style
2624 + native
Index: trunk/extensions/uniwiki/MooTools12core/mootools-1.2-core-yc.js
@@ -1,5 +1,4 @@
22 //MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2008 Valerio Proietti, <http://mad4milk.net>, MIT Style License.
3 -
43 var MooTools={version:"1.2.0",build:""};var Native=function(J){J=J||{};var F=J.afterImplement||function(){};var G=J.generics;G=(G!==false);var H=J.legacy;
54 var E=J.initialize;var B=J.protect;var A=J.name;var C=E||H;C.constructor=Native;C.$family={name:"native"};if(H&&E){C.prototype=H.prototype;}C.prototype.constructor=C;
65 if(A){var D=A.toLowerCase();C.prototype.$family={name:D};Native.typize(C,D);}var I=function(M,K,N,L){if(!B||L||!M.prototype[K]){M.prototype[K]=N;}if(G){Native.genericize(M,K,B);
Property changes on: trunk/extensions/uniwiki/MooTools12core/mootools-1.2-core-yc.js
___________________________________________________________________
Added: svn:eol-style
76 + native
Index: trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php
@@ -6,7 +6,6 @@
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
1211
1312 $wgExtensionCredits['other'][] = array(
@@ -15,7 +14,6 @@
1615 'description' => "Adds a category box to the top right of articles"
1716 );
1817
19 -
2018 /* ---- HOOKS ---- */
2119
2220 $wgHooks['BeforePageDisplay'][] = "UW_CatBoxAtTop_CSS";
@@ -27,23 +25,24 @@
2826 }
2927
3028 $wgHooks['OutputPageBeforeHTML'][] = "UW_CatBoxAtTop_Rejig";
31 -function UW_CatBoxAtTop_Rejig (&$out, &$text) {
 29+function UW_CatBoxAtTop_Rejig (&$out, &$text) {
3230 global $wgVersion;
3331
34 - // no categories = no box
 32+ // no categories = no box
3533 if (!$out->mCategoryLinks)
3634 return true;
37 -
38 - /* add a category box to the top of the output,
 35+
 36+ /* add a category box to the top of the output,
3937 * to be dropped into the top right via CSS */
4038 $catbox = "<div id=\"catbox\"><div>\n";
4139 $catbox .= "<h5>Categories</h5><ul>\n";
42 - $catlinks = array();
43 - if ($wgVersion == '1.13.0') {
44 - $catlinks = $out->mCategoryLinks['normal'];
45 - } else {
46 - $catlinks = $out->mCategoryLinks;
47 - }
 40+ $catlinks = array();
 41+ if ($wgVersion == '1.13.0') {
 42+ $catlinks = $out->mCategoryLinks['normal'];
 43+ } else {
 44+ $catlinks = $out->mCategoryLinks;
 45+ }
 46+
4847 foreach ($catlinks as $cat)
4948 $catbox .= "<li>$cat</li>\n";
5049 $catbox .= "</ul></div></div>\n";
@@ -51,4 +50,3 @@
5251 $text = $catbox.$text;
5352 return true;
5453 }
55 -
Property changes on: trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php
___________________________________________________________________
Added: svn:eol-style
5654 + native
Index: trunk/extensions/uniwiki/CatBoxAtTop/style.css
@@ -2,7 +2,6 @@
33 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Category_Box_at_Top
44 * http://www.gnu.org/licenses/gpl-3.0.txt */
55
6 -
76 /* hide the table of contents
87 * THIS IS A TEMPORARY HACK! */
98 #bodyContent #toc {
@@ -19,34 +18,33 @@
2019 border-left: 1em solid #fff;
2120 }
2221
23 - #catbox div {
24 - border: 1px solid #aaa;
25 - background: #fff;
26 - }
 22+#catbox div {
 23+ border: 1px solid #aaa;
 24+ background: #fff;
 25+}
2726
28 - #catbox h5 {
29 - text-align: center;
30 - padding: 0.25em 1em;
31 - border-bottom: 1px solid #aaa;
32 - background: #eee;
33 - margin-bottom: 0;
34 - }
35 -
36 - #catbox ul {
37 - margin: 0;
38 - padding: 0.25em 0.5em;
39 - }
 27+#catbox h5 {
 28+ text-align: center;
 29+ padding: 0.25em 1em;
 30+ border-bottom: 1px solid #aaa;
 31+ background: #eee;
 32+ margin-bottom: 0;
 33+}
4034
41 - #catbox li {
42 - margin: 0;
43 - display: block;
44 - line-height: 1.8;
45 - list-style-image: none;
46 - }
 35+#catbox ul {
 36+ margin: 0;
 37+ padding: 0.25em 0.5em;
 38+}
4739
48 - /*#catbox li a {
49 - display: block;
50 - padding: 0.25em 0.5em;
51 - border-bottom: 1px solid #eee;
52 - }*/
 40+#catbox li {
 41+ margin: 0;
 42+ display: block;
 43+ line-height: 1.8;
 44+ list-style-image: none;
 45+}
5346
 47+/*#catbox li a {
 48+ display: block;
 49+ padding: 0.25em 0.5em;
 50+ border-bottom: 1px solid #eee;
 51+}*/
Property changes on: trunk/extensions/uniwiki/CatBoxAtTop/style.css
___________________________________________________________________
Added: svn:eol-style
5452 + native
Index: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.i18n.php
@@ -6,7 +6,6 @@
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 $wgAutoCreateCategoryPagesMessages = array();
1211 $wgAutoCreateCategoryPagesMessages['en'] = array(
1312 'accp_stub' => "This is a category page. It lists all of the pages in category \"$1\" as well as all subcategories of category \"$1\" if any exist.",
@@ -27,4 +26,3 @@
2827 'accp_stub' => "Esta é uma página de categoria. Ela lista todas as páginas da categoria \"$1\", bem como todas as subcategorias da categoria \"$1\", se existirem.",
2928 'accp_createdby' => "Gerada automaticamente pela extensão AutoCreateCategoryPag."
3029 );
31 -
Property changes on: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.i18n.php
___________________________________________________________________
Added: svn:eol-style
3230 + native
Index: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.php
@@ -2,20 +2,17 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_Auto_Create_Category_Pages
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined('MEDIAWIKI'))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
12 -
1311 $wgExtensionCredits['other'][] = array(
1412 'name' => "AutoCreateCategoryPages",
1513 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)",
1614 'description' => "Create stub Category pages automatically"
1715 );
1816
19 -
2017 /* ---- INTERNATIONALIZATION ---- */
2118
2219 require_once ("AutoCreateCategoryPages.i18n.php");
@@ -28,51 +25,49 @@
2926 $wgMessageCache->addMessages ($messages, $lang);
3027 }
3128
32 -
3329 /* ---- HOOKS ---- */
34 -
3530 $wgHooks['ArticleSaveComplete'][] = "UW_AutoCreateCategoryPages_Save";
3631 function UW_AutoCreateCategoryPages_Save (&$article, &$user, &$text, &$summary, &$minoredit,
37 - &$watchthis, &$sectionanchor, &$flags, $revision) {
 32+ &$watchthis, &$sectionanchor, &$flags, $revision) {
3833 global $wgDBprefix;
39 -
 34+
4035 /* after the page is saved, get all the categories
4136 * and see if they exists as "proper" pages; if not
4237 * then create a simple page for them automatically */
43 -
 38+
4439 // extract the categories on this page
4540 $regex = "/\[\[category:(.+?)(?:\|.*)?\]\]/i";
4641 preg_match_all ($regex, $text, $matches);
47 -
 42+
4843 // array of the categories on the page (in db form)
4944 $on_page = array();
5045 foreach ($matches[1] as $cat)
5146 $on_page[] = Title::newFromText ($cat)->getDBkey();
52 -
 47+
5348 // array of the categories in the db
5449 $db = wfGetDB (DB_MASTER);
5550 $results = $db->resultObject ($db->query(
5651 "select distinct page_title from {$wgDBprefix}page " .
5752 "where page_namespace = '".NS_CATEGORY."'"));
58 -
 53+
5954 $in_db = array();
6055 while ($r = $results->next())
6156 $in_db[] = $r->page_title;
62 -
 57+
6358 /* loop through the categories in the page and
6459 * see if they already exist as a category page */
6560 foreach ($on_page as $db_key) {
6661 if (!in_array( $db_key, $in_db)) {
67 -
 62+
6863 // if it doesn't exist, then create it here
6964 $page_title = Title::newFromDBkey ($db_key)->getText();
7065 $stub = wfMsg ("accp_stub", $page_title);
7166 $summary = wfMsg ("accp_createdby");
7267 $article = new Article (Title::newFromDBkey("Category:$db_key"));
73 -
 68+
7469 try {
7570 $article->doEdit ($stub, $summary, EDIT_NEW & EDIT_SUPPRESS_RC);
76 -
 71+
7772 } catch (MWException $e) {
7873 /* fail silently...
7974 * todo: what can go wrong here? */
@@ -82,4 +77,3 @@
8378
8479 return true;
8580 }
86 -
Property changes on: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.php
___________________________________________________________________
Added: svn:eol-style
8781 + native
Index: trunk/extensions/uniwiki/.uniwiki.settings
@@ -13,4 +13,3 @@
1414 require_once(\"\$uw/Authors/Authors.php\");
1515 require_once(\"\$uw/CustomToolbar/CustomToolbar.php\");
1616 require_once(\"\$uw/CreatePage/CreatePage.php\");
17 -
Property changes on: trunk/extensions/uniwiki/.uniwiki.settings
___________________________________________________________________
Added: svn:eol-style
1817 + native
Index: trunk/extensions/uniwiki/CssHooks/CssHooks.php
@@ -2,11 +2,10 @@
33 /* vim: noet ts=4 sw=4
44 * http://www.mediawiki.org/wiki/Extension:Uniwiki_CSS_Hooks
55 * http://www.gnu.org/licenses/gpl-3.0.txt */
6 -
 6+
77 if (!defined("MEDIAWIKI"))
88 die();
99
10 -
1110 /* ---- CREDITS ---- */
1211
1312 $wgExtensionCredits['other'][] = array(
@@ -15,7 +14,6 @@
1615 'description' => "Add some CSS hooks to the HTML output of articles, for better styling"
1716 );
1817
19 -
2018 /* ---- HOOKS ---- */
2119
2220 $wgHooks['OutputPageBeforeHTML'][] = 'UW_CssHooks_AddHooks';
@@ -24,7 +22,7 @@
2523
2624 // break the page into sections via their <h2>s
2725 $sections = preg_split ("/(<a name=\".+?\"><\/a><h2>.+?<\/h2>)/",
28 - $text, -1, PREG_SPLIT_DELIM_CAPTURE);
 26+ $text, -1, PREG_SPLIT_DELIM_CAPTURE);
2927
3028 // remove the first empty section
3129 if ($sections[0] == "")
@@ -34,7 +32,7 @@
3533 $output = '';
3634 $div_open = false;
3735 for ($i=0; $i<count ($sections); $i++) {
38 -
 36+
3937 /* is this block of text a header? (check for mw-headline
4038 * to only include actual section headers, and dodge toc) */
4139 if (substr ($sections[$i], 0, 7) == "<a name") {
@@ -48,7 +46,7 @@
4947 $div_open = true;
5048 }
5149 }
52 -
 50+
5351 // re-add the original text
5452 $output .= $sections[$i];
5553
@@ -56,8 +54,7 @@
5755 if (($i==count ($sections)-1) && $div_open)
5856 $output .= "</div>";
5957 }
60 -
 58+
6159 $text = $output;
6260 return true;
6361 }
64 -
Property changes on: trunk/extensions/uniwiki/CssHooks/CssHooks.php
___________________________________________________________________
Added: svn:eol-style
6562 + native
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.i18n.php
@@ -27,7 +27,7 @@
2828
2929 'ct_image_tip' => "Insert an image",
3030 'ct_image_caption' => "Add Image",
31 -
 31+
3232 'ct_attachment_tip' => "Insert an attachment",
3333 'ct_attachment_caption' => "Add Attachment",
3434
@@ -35,12 +35,12 @@
3636 'ct_math_tip_ins' => "Insert mathematical formula (LaTeX)",
3737 'ct_math_tip_wrap' => "Make this text a mathematical formula (LaTeX)",
3838 'ct_math_caption' => "Formula",
39 -
 39+
4040 'ct_nowiki_sample' => "Insert non-formatted text here",
4141 'ct_nowiki_tip_ins' => "Ignore wiki formatting",
4242 'ct_nowiki_tip_wrap' => "Ignore wiki formattting for this text",
4343 'ct_nowiki_caption' => "No Wiki",
44 -
 44+
4545 'ct_horizontal_tip' => "Insert a horizontal line (use sparingly)",
4646 'ct_horizontal_caption' => "Horizontal Line",
4747
@@ -53,60 +53,60 @@
5454 'ct_success' => "File upload successful!",
5555 'ct_popupblocked' => "The upload popup was prevented from opening. Please check your popup blocker.",
5656
57 - 'ct_user_user' => "User",
58 - 'ct_user_tip' => "Insert a link to a user page",
59 - 'ct_user_caption' => "User Link",
60 - 'ct_user_sample' => "Username"
 57+ 'ct_user_user' => "User",
 58+ 'ct_user_tip' => "Insert a link to a user page",
 59+ 'ct_user_caption' => "User Link",
 60+ 'ct_user_sample' => "Username"
6161 );
6262
6363 $wgCustomToolbarMessages['es'] = array(
64 - 'ct_bold_sample' => "Texto en negrita",
65 - 'ct_bold_tip_ins' => "Insertar texto en negrita",
66 - 'ct_bold_tip_wrap' => "Convertir este texto en negrita ",
67 - 'ct_bold_caption' => "Negrita",
 64+ 'ct_bold_sample' => "Texto en negrita",
 65+ 'ct_bold_tip_ins' => "Insertar texto en negrita",
 66+ 'ct_bold_tip_wrap' => "Convertir este texto en negrita ",
 67+ 'ct_bold_caption' => "Negrita",
6868
69 - 'ct_italic_sample' => "Texto en cursiva",
70 - 'ct_italic_tip_ins' => "Insertar texto en cursiva",
71 - 'ct_italic_tip_wrap' => "Convertir este texto en cursiva ",
72 - 'ct_italic_caption' => "Cursiva",
 69+ 'ct_italic_sample' => "Texto en cursiva",
 70+ 'ct_italic_tip_ins' => "Insertar texto en cursiva",
 71+ 'ct_italic_tip_wrap' => "Convertir este texto en cursiva ",
 72+ 'ct_italic_caption' => "Cursiva",
7373
74 - 'ct_internal_sample' => "Título del enlace",
75 - 'ct_internal_tip_ins' => "Insertar un enlace interno",
76 - 'ct_internal_tip_wrap' => "Convertir este texto en un enlace interno",
77 - 'ct_internal_caption' => "Enlace interno",
 74+ 'ct_internal_sample' => "Título del enlace",
 75+ 'ct_internal_tip_ins' => "Insertar un enlace interno",
 76+ 'ct_internal_tip_wrap' => "Convertir este texto en un enlace interno",
 77+ 'ct_internal_caption' => "Enlace interno",
7878
79 - 'ct_external_sample' => "http://ejemplo.com",
80 - 'ct_external_tip_ins' => "Insertar un enlace externo",
81 - 'ct_external_tip_wrap' => "Convertir este texto en un enlace externo",
82 - 'ct_external_caption' => "Enlace externo",
 79+ 'ct_external_sample' => "http://ejemplo.com",
 80+ 'ct_external_tip_ins' => "Insertar un enlace externo",
 81+ 'ct_external_tip_wrap' => "Convertir este texto en un enlace externo",
 82+ 'ct_external_caption' => "Enlace externo",
8383
84 - 'ct_image_tip' => "Insertar una imagen",
85 - 'ct_image_caption' => "Agregar imagen",
86 -
87 - 'ct_attachment_tip' => "Insertar un archivo adjunto",
88 - 'ct_attachment_caption' => "Agregar archivo adjunto",
 84+ 'ct_image_tip' => "Insertar una imagen",
 85+ 'ct_image_caption' => "Agregar imagen",
8986
90 - 'ct_math_sample' => "Insertar la fórmula LaTeX aquí",
91 - 'ct_math_tip_ins' => "Insertar la fórmula matemática (LaTeX)",
92 - 'ct_math_tip_wrap' => "Convertir este texto en una fórmula matemática (LaTeX)",
93 - 'ct_math_caption' => "Fórmula",
94 -
95 - 'ct_nowiki_sample' => "Insertar aquí el texto no formateado",
96 - 'ct_nowiki_tip_ins' => "Ignorar el formato wiki",
97 - 'ct_nowiki_tip_wrap' => "Ignorar el formato wiki para este texto",
98 - 'ct_nowiki_caption' => "Sin Wiki",
99 -
100 - 'ct_horizontal_tip' => "Insertar una línea horizontal (utilizar con moderación)",
101 - 'ct_horizontal_caption' => "Línea Horizontal",
 87+ 'ct_attachment_tip' => "Insertar un archivo adjunto",
 88+ 'ct_attachment_caption' => "Agregar archivo adjunto",
10289
103 - 'ct_upload' => "Subir $1",
104 - 'ct_select' => "Seleccionar $1 para subirlo",
105 - 'ct_caption' => "Agregar un subtítulo (opcional)",
106 - 'ct_link' => "Agregar el nombre del enlace (opcional)",
107 - 'ct_submit' => "¡Ir!",
108 - 'ct_close' => "Cerrar la ventana ",
109 - 'ct_success' => "¡El archivo se subió con éxito!",
110 - 'ct_popupblocked' => "No se pudo abrir la ventana para subir el archivo. Revise su bloqueador de ventanas emergentes."
 90+ 'ct_math_sample' => "Insertar la fórmula LaTeX aquí",
 91+ 'ct_math_tip_ins' => "Insertar la fórmula matemática (LaTeX)",
 92+ 'ct_math_tip_wrap' => "Convertir este texto en una fórmula matemática (LaTeX)",
 93+ 'ct_math_caption' => "Fórmula",
 94+
 95+ 'ct_nowiki_sample' => "Insertar aquí el texto no formateado",
 96+ 'ct_nowiki_tip_ins' => "Ignorar el formato wiki",
 97+ 'ct_nowiki_tip_wrap' => "Ignorar el formato wiki para este texto",
 98+ 'ct_nowiki_caption' => "Sin Wiki",
 99+
 100+ 'ct_horizontal_tip' => "Insertar una línea horizontal (utilizar con moderación)",
 101+ 'ct_horizontal_caption' => "Línea Horizontal",
 102+
 103+ 'ct_upload' => "Subir $1",
 104+ 'ct_select' => "Seleccionar $1 para subirlo",
 105+ 'ct_caption' => "Agregar un subtítulo (opcional)",
 106+ 'ct_link' => "Agregar el nombre del enlace (opcional)",
 107+ 'ct_submit' => "¡Ir!",
 108+ 'ct_close' => "Cerrar la ventana ",
 109+ 'ct_success' => "¡El archivo se subió con éxito!",
 110+ 'ct_popupblocked' => "No se pudo abrir la ventana para subir el archivo. Revise su bloqueador de ventanas emergentes."
111111 );
112112
113113 $wgCustomToolbarMessages['de'] = array(
@@ -132,7 +132,7 @@
133133
134134 'ct_image_tip' => "Ein Bild einfügen",
135135 'ct_image_caption' => "Bild einfügen",
136 -
 136+
137137 'ct_attachment_tip' => "Eine Anlage einfuegen",
138138 'ct_attachment_caption' => "Eine Anlage anfuegen",
139139
@@ -140,12 +140,12 @@
141141 'ct_math_tip_ins' => "Hier mathematische Formel einfügen (LaTeX)",
142142 'ct_math_tip_wrap' => "Diesen Text in eine mathematische Formel umwandeln (LaTeX)",
143143 'ct_math_caption' => "Formel",
144 -
 144+
145145 'ct_nowiki_sample' => "Hier unformatierten Text eingeben",
146146 'ct_nowiki_tip_ins' => "Ignoriere wiki Formatierung",
147147 'ct_nowiki_tip_wrap' => "Ignoriere wiki Formatierung für diesen Text",
148148 'ct_nowiki_caption' => "Keine Wiki",
149 -
 149+
150150 'ct_horizontal_tip' => "Eine waagrechte Linie einfügen (nicht alzu oft verwenden)",
151151 'ct_horizontal_caption' => "Waagrechte Linie",
152152
@@ -158,59 +158,58 @@
159159 'ct_success' => "Datei erfolgreich hochgeladen!",
160160 'ct_popupblocked' => "Das Hochladen-Popup wurde am Öffnen gehindert. Bitte überprüfe Deinen Popup-Blocker.",
161161
162 - 'ct_user_user' => "Benutzer",
163 - 'ct_user_tip' => "Einen Link zu der Seite eines Freundes einfügen",
164 - 'ct_user_caption' => "Einen Link zu einem Freund einfügen",
165 - 'ct_user_sample' => "Benutzername"
 162+ 'ct_user_user' => "Benutzer",
 163+ 'ct_user_tip' => "Einen Link zu der Seite eines Freundes einfügen",
 164+ 'ct_user_caption' => "Einen Link zu einem Freund einfügen",
 165+ 'ct_user_sample' => "Benutzername"
166166 );
167167
168168 $wgCustomToolbarMessages['pt-br'] = array(
169 - 'ct_bold_sample' => "Texto em negrito",
170 - 'ct_bold_tip_ins' => "Digitar texto em negrito",
171 - 'ct_bold_tip_wrap' => "Colocar este texto em negrito",
172 - 'ct_bold_caption' => "Negrito",
 169+ 'ct_bold_sample' => "Texto em negrito",
 170+ 'ct_bold_tip_ins' => "Digitar texto em negrito",
 171+ 'ct_bold_tip_wrap' => "Colocar este texto em negrito",
 172+ 'ct_bold_caption' => "Negrito",
173173
174 - 'ct_italic_sample' => "Texto em itálico",
175 - 'ct_italic_tip_ins' => "Digitar texto em itálico",
176 - 'ct_italic_tip_wrap' => "Colocar este texto em itálico",
177 - 'ct_italic_caption' => "Itálico",
 174+ 'ct_italic_sample' => "Texto em itálico",
 175+ 'ct_italic_tip_ins' => "Digitar texto em itálico",
 176+ 'ct_italic_tip_wrap' => "Colocar este texto em itálico",
 177+ 'ct_italic_caption' => "Itálico",
178178
179 - 'ct_internal_sample' => "Título do link",
180 - 'ct_internal_tip_ins' => "Inserir um link interno",
181 - 'ct_internal_tip_wrap' => "Transformar este texto em link interno",
182 - 'ct_internal_caption' => "Link Interno",
 179+ 'ct_internal_sample' => "Título do link",
 180+ 'ct_internal_tip_ins' => "Inserir um link interno",
 181+ 'ct_internal_tip_wrap' => "Transformar este texto em link interno",
 182+ 'ct_internal_caption' => "Link Interno",
183183
184 - 'ct_external_sample' => "http://exemplo.com",
185 - 'ct_external_tip_ins' => "Incluir um link externo",
186 - 'ct_external_tip_wrap' => "Transformar este texto em link externo",
187 - 'ct_external_caption' => "Link Externo",
 184+ 'ct_external_sample' => "http://exemplo.com",
 185+ 'ct_external_tip_ins' => "Incluir um link externo",
 186+ 'ct_external_tip_wrap' => "Transformar este texto em link externo",
 187+ 'ct_external_caption' => "Link Externo",
188188
189 - 'ct_image_tip' => "Carregar uma imagem",
190 - 'ct_image_caption' => "Adicionar uma Imagem",
191 -
192 - 'ct_attachment_tip' => "Incluir um anexo",
193 - 'ct_attachment_caption' => "Adicionar um Anexo",
 189+ 'ct_image_tip' => "Carregar uma imagem",
 190+ 'ct_image_caption' => "Adicionar uma Imagem",
194191
195 - 'ct_math_sample' => "Incluir fórmula LaTeX aqui",
196 - 'ct_math_tip_ins' => "Incluir fórmula matemática (LaTeX)",
197 - 'ct_math_tip_wrap' => "Transformar este texto em fórmula matemática (LaTeX)",
198 - 'ct_math_caption' => "Fórmula",
199 -
200 - 'ct_nowiki_sample' => "Inserir aqui o texto não formatado",
201 - 'ct_nowiki_tip_ins' => "Ignorar a formatação wiki",
202 - 'ct_nowiki_tip_wrap' => "Ignorar a formatação wiki neste texto",
203 - 'ct_nowiki_caption' => "Sem wiki",
204 -
205 - 'ct_horizontal_tip' => "Incluir uma linha horizontal (use com moderação)",
206 - 'ct_horizontal_caption' => "Linha Horizontal",
 192+ 'ct_attachment_tip' => "Incluir um anexo",
 193+ 'ct_attachment_caption' => "Adicionar um Anexo",
207194
208 - 'ct_upload' => "Carregar $1",
209 - 'ct_select' => "Selecionar $1 para carregar o arquivo",
210 - 'ct_caption' => "Incluir uma explicação (opcional)",
211 - 'ct_link' => "Incluir um nome para o link (opcional)",
212 - 'ct_submit' => "Salvar",
213 - 'ct_close' => "Fechar a janela",
214 - 'ct_success' => "O arquivo foi carregado com sucesso!",
215 - 'ct_popupblocked' => "O pop-up para carregar o arquivo foi bloqueado. Verifique o seu bloqueador de pop-ups."
216 -);
 195+ 'ct_math_sample' => "Incluir fórmula LaTeX aqui",
 196+ 'ct_math_tip_ins' => "Incluir fórmula matemática (LaTeX)",
 197+ 'ct_math_tip_wrap' => "Transformar este texto em fórmula matemática (LaTeX)",
 198+ 'ct_math_caption' => "Fórmula",
217199
 200+ 'ct_nowiki_sample' => "Inserir aqui o texto não formatado",
 201+ 'ct_nowiki_tip_ins' => "Ignorar a formatação wiki",
 202+ 'ct_nowiki_tip_wrap' => "Ignorar a formatação wiki neste texto",
 203+ 'ct_nowiki_caption' => "Sem wiki",
 204+
 205+ 'ct_horizontal_tip' => "Incluir uma linha horizontal (use com moderação)",
 206+ 'ct_horizontal_caption' => "Linha Horizontal",
 207+
 208+ 'ct_upload' => "Carregar $1",
 209+ 'ct_select' => "Selecionar $1 para carregar o arquivo",
 210+ 'ct_caption' => "Incluir uma explicação (opcional)",
 211+ 'ct_link' => "Incluir um nome para o link (opcional)",
 212+ 'ct_submit' => "Salvar",
 213+ 'ct_close' => "Fechar a janela",
 214+ 'ct_success' => "O arquivo foi carregado com sucesso!",
 215+ 'ct_popupblocked' => "O pop-up para carregar o arquivo foi bloqueado. Verifique o seu bloqueador de pop-ups."
 216+);
Property changes on: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.i18n.php
___________________________________________________________________
Added: svn:eol-style
218217 + native
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.php
@@ -1,22 +1,22 @@
22 <?php
33 # Copyright (C) 2008 Mark Johnston and Adam Mckaig
4 -#
 4+#
55 # This program is free software; you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License as published by
7 -# the Free Software Foundation; either version 3 of the License, or
 7+# the Free Software Foundation; either version 3 of the License, or
88 # (at your option) any later version.
9 -#
 9+#
1010 # This program is distributed in the hope that it will be useful,
1111 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1212 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1313 # GNU General Public License for more details.
14 -#
 14+#
1515 # You should have received a copy of the GNU General Public License along
1616 # with this program; if not, write to the Free Software Foundation, Inc.,
1717 # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1818 #
1919 # http://www.gnu.org/licenses/gpl-3.0.html
20 -
 20+
2121 if (!defined('MEDIAWIKI'))
2222 die();
2323
@@ -88,7 +88,7 @@
8989 $out->addScript("<script type='text/javascript' src='$path/CustomToolbar.js'></script>\n");
9090 $out->addScript("<style type='text/css'>@import '$path/style.css';</style>\n");
9191 return true;
92 -
 92+
9393 }
9494
9595 $wgExtensionFunctions[] = 'wfCustomToolbarUploadForm';
@@ -114,7 +114,7 @@
115115 require_once('includes/SpecialUpload.php');
116116 }
117117 class CustomToolbarUploadForm extends UploadForm {
118 - /* Some code poached from Travis Derouin's <travis@wikihow.com>
 118+ /* Some code poached from Travis Derouin's <travis@wikihow.com>
119119 * UploadPopup extension
120120 */
121121 var $mType, $mSection, $mCaption;
@@ -125,14 +125,14 @@
126126 $this->mSection = $request->getVal('section');
127127 UploadForm::UploadForm(&$request);
128128 }
129 -
 129+
130130 function execute() {
131131 // override MW's UploadForm with only the bits we want
132132 global $wgOut, $wgStylePath;
133133 $wgOut->setArticleBodyOnly(true);
134 - $wgOut->addHTML("
 134+ $wgOut->addHTML("
135135 <html>
136 - <head>
 136+ <head>
137137 <title>". wfMsg('ct_upload', $this->mType) . " </title>
138138 </head>
139139 <body>");
@@ -142,7 +142,7 @@
143143 </body>
144144 </html>");
145145 }
146 -
 146+
147147 function mainUploadForm( $msg = '') {
148148 global $wgOut, $wgScriptPath, $wgStylePath;
149149 if ( '' != $msg ) {
@@ -164,7 +164,7 @@
165165 $action = $titleObj->escapeLocalURL();
166166
167167 $encDestFile = htmlspecialchars( $this->mDestFile );
168 -
 168+
169169 $icon_path = "{$wgScriptPath}/extensions/uniwiki/CustomToolbar/images/numbers/";
170170 /* The following form contains a strange hack for passing the section index id
171171 * through the upload function so we know where to insert the file tag.
@@ -180,7 +180,7 @@
181181 <td align='left'><img src='{$icon_path}1.png' alt='1.' />
182182 <label for='wpUploadFile'>{$source_filename}:</label></td>
183183 <td align='left'>
184 - <input type='file' name='wpUploadFile' id='wpUploadFile' "
 184+ <input type='file' name='wpUploadFile' id='wpUploadFile' "
185185 . ($this->mDestFile?"":"onchange=\"opener.Uniwiki.CustomToolbar.fillDestFilename(document.getElementById('wpUploadFile').value, document.getElementById('wpDestFile') )\" ") . "size='40' />
186186 </td>
187187 </tr>
@@ -207,10 +207,10 @@
208208 </form>
209209 ");
210210 }
211 -
 211+
212212 function showSuccess(&$file) {
213213 global $wgOut, $ct_uploadable_images, $ct_uploadable_attachments;
214 -
 214+
215215 //styles copied from monobook/main.css
216216 //modified to not float the whole preview to the right
217217 $wgOut->addHTML("
@@ -265,9 +265,9 @@
266266 }
267267 </style>
268268 ");
269 - $wgOut->redirect('');
 269+ $wgOut->redirect('');
270270 $wgOut->addHTML("<h2>" . wfMsg('ct_success') . "</h2>");
271 -
 271+
272272 //make wiki markup for the file
273273 $ext = explode('.', $file->mDestName );
274274 $extension = $ext[count( $ext ) - 1];
@@ -277,7 +277,7 @@
278278 elseif (in_array($extension, $ct_uploadable_attachments )){
279279 $file_link = '[[' . 'Media:' . $file->mDestName . '|' . $file->mCaption . ']]';
280280 }
281 -
 281+
282282 $titleObj = Title::makeTitle( NS_SPECIAL, 'CustomToolbarUpload' );
283283 //insert the wiki markup in the appropriate section
284284 //or the classic-mode textarea if we are in classic-mode
@@ -294,7 +294,7 @@
295295 {$insertion};
296296 </script>
297297 ");
298 -
 298+
299299 //show a thumbnail of the image as it will appear on the page
300300 $wgOut->addWikiText($file_link);
301301 $wgOut->addHTML("
@@ -302,14 +302,14 @@
303303 </div>
304304 ");
305305 /* The UploadComplete hook is placed before the usual MW redirection
306 - * that follows a successful upload, so in order to show our success
 306+ * that follows a successful upload, so in order to show our success
307307 * page and insert the markup, we dump this output and kill the process
308308 * to avoid redirection to the file's page.
309309 */
310310 print($wgOut->output());
311311 exit;
312312 }
313 -
 313+
314314 //XX TODO make a prettier error page
315315 //function showError() {
316316 //}
Property changes on: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.php
___________________________________________________________________
Added: svn:eol-style
317317 + native
Index: trunk/extensions/uniwiki/CustomToolbar/style.css
@@ -1,56 +1,55 @@
22 .editor-wrap {
3 - /* make the editor wrapper look like a regular
4 - * text area, to make the toolbar look as if
5 - * if is nested within it */
6 - border: 2px inset buttonface;
7 - zoom: 1;
 3+ /* make the editor wrapper look like a regular
 4+ * text area, to make the toolbar look as if
 5+ * if is nested within it */
 6+ border: 2px inset buttonface;
 7+ zoom: 1;
88 }
99
10 - .editor-wrap .toolbar {
11 - background: #F4F4F4;
12 - color: #888;
13 - padding: 1px;
14 - overflow: auto;
 10+.editor-wrap .toolbar {
 11+ background: #F4F4F4;
 12+ color: #888;
 13+ padding: 1px;
 14+ overflow: auto;
1515 display: inline-block;
16 - margin-bottom: 0.5em;
17 - border-bottom: 1px solid #CCC;
 16+ margin-bottom: 0.5em;
 17+ border-bottom: 1px solid #CCC;
1818 width: 100%;
19 - }
 19+}
2020
21 - .editor-wrap .toolbar .button {
22 - cursor: pointer;
23 - float: left;
24 - line-height: 16px;
25 - padding: 4px 6px 2px 24px;
26 - font-size: 8pt;
27 - border: 1px solid #f4f4f4;
28 - background: url("images/16/default.png") no-repeat 4px 50%;
29 - }
 21+.editor-wrap .toolbar .button {
 22+ cursor: pointer;
 23+ float: left;
 24+ line-height: 16px;
 25+ padding: 4px 6px 2px 24px;
 26+ font-size: 8pt;
 27+ border: 1px solid #f4f4f4;
 28+ background: url("images/16/default.png") no-repeat 4px 50%;
 29+}
3030
31 - .editor-wrap .toolbar .button:hover,
32 - .editor-wrap .toolbar .button.hover {
33 - background-color: white;
34 - border: 1px solid #aaa;
35 - color: #000;
36 - }
 31+.editor-wrap .toolbar .button:hover,
 32+.editor-wrap .toolbar .button.hover {
 33+ background-color: white;
 34+ border: 1px solid #aaa;
 35+ color: #000;
 36+}
3737
38 - .editor-wrap .toolbar .but-bold { background-image: url("images/16/bold.png"); }
39 - .editor-wrap .toolbar .but-italic { background-image: url("images/16/italic.png"); }
40 - .editor-wrap .toolbar .but-internal { background-image: url("images/16/internal.png"); }
41 - .editor-wrap .toolbar .but-external { background-image: url("images/16/external.png"); }
42 - .editor-wrap .toolbar .but-image { background-image: url("images/16/image.png"); }
43 - .editor-wrap .toolbar .but-attachment { background-image: url("images/16/attachment.png"); }
44 - .editor-wrap .toolbar .but-horizontal-line { background-image: url("images/16/horizontal-line.png"); }
45 - .editor-wrap .toolbar .but-nowiki { background-image: url("images/16/nowiki.png"); }
46 - .editor-wrap .toolbar .but-math { background-image: url("images/16/math.png"); }
47 - .editor-wrap .toolbar .but-user { background-image: url("images/16/user.png"); }
 38+.editor-wrap .toolbar .but-bold { background-image: url("images/16/bold.png"); }
 39+.editor-wrap .toolbar .but-italic { background-image: url("images/16/italic.png"); }
 40+.editor-wrap .toolbar .but-internal { background-image: url("images/16/internal.png"); }
 41+.editor-wrap .toolbar .but-external { background-image: url("images/16/external.png"); }
 42+.editor-wrap .toolbar .but-image { background-image: url("images/16/image.png"); }
 43+.editor-wrap .toolbar .but-attachment { background-image: url("images/16/attachment.png"); }
 44+.editor-wrap .toolbar .but-horizontal-line { background-image: url("images/16/horizontal-line.png"); }
 45+.editor-wrap .toolbar .but-nowiki { background-image: url("images/16/nowiki.png"); }
 46+.editor-wrap .toolbar .but-math { background-image: url("images/16/math.png"); }
 47+.editor-wrap .toolbar .but-user { background-image: url("images/16/user.png"); }
4848
49 - .editor-wrap textarea {
50 - padding: 0;
51 - width: 100%;
52 - border: 0;
53 - }
54 -
 49+.editor-wrap textarea {
 50+ padding: 0;
 51+ width: 100%;
 52+ border: 0;
 53+}
 54+
5555 .edit-generic .editor-wrap { display: none; }
5656 .edit-generic .generic-editor .editor-wrap { display: block; }
57 -
Property changes on: trunk/extensions/uniwiki/CustomToolbar/style.css
___________________________________________________________________
Added: svn:eol-style
5857 + native
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.js
@@ -1,5 +1,5 @@
22 Uniwiki.CustomToolbar = {
3 -
 3+
44 /* other plugins may add more buttons here,
55 * which will automatically be included */
66 Buttons: {
@@ -46,9 +46,9 @@
4747 * where to add the image back into the page
4848 * (the name of the textarea will always match
4949 * the id of the section) */
50 - if (textarea.name == "wpTextbox1") var section = textarea.name;
51 - else var section = textarea.name.replace(/\D/g, '');
52 -
 50+ if (textarea.name == "wpTextbox1") var section = textarea.name;
 51+ else var section = textarea.name.replace(/\D/g, '');
 52+
5353 /* open the upload form in a popup window
5454 * (this shold be moved to an iframe) */
5555 popup = open(
@@ -74,9 +74,9 @@
7575 * where to add the image back into the page
7676 * (the name of the textarea will always match
7777 * the id of the section) */
78 - if (textarea.name == "wpTextbox1") var section = textarea.name;
79 - else var section = textarea.name.replace(/\D/g, '');
80 -
 78+ if (textarea.name == "wpTextbox1") var section = textarea.name;
 79+ else var section = textarea.name.replace(/\D/g, '');
 80+
8181 /* open the upload form in a popup window
8282 * (this shold be moved to an iframe) */
8383 popup = open(
@@ -112,7 +112,7 @@
113113 'key': "n",
114114 'open': "<nowiki>",
115115 'close': "</nowiki>",
116 - 'sample': wfMsg('ct_nowiki_sample'),
 116+ 'sample': wfMsg('ct_nowiki_sample'),
117117 'tip': [wfMsg('ct_nowiki_tip_ins'), wfMsg('ct_nowiki_tip_wrap')],
118118 'caption': wfMsg('ct_nowiki_caption'),
119119 'advanced': true
@@ -121,7 +121,7 @@
122122 'key': "-",
123123 'open': "\n----\n",
124124 'close': "",
125 - 'sample': "",
 125+ 'sample': "",
126126 'tip': wfMsg('ct_horizontal_tip'),
127127 'caption': wfMsg('ct_horizontal_caption'),
128128 'advanced': true
@@ -141,7 +141,7 @@
142142 elements.each (function (txta) {
143143 var wrapper = new Element ("div", { 'class': "editor-wrap" });
144144 var toolbar = new Element ("div", { 'class': "toolbar" });
145 -
 145+
146146 // create and append the buttons
147147 buttons.each (function (button,name) {
148148
@@ -191,17 +191,17 @@
192192 });
193193 } else if(button.tip)
194194 div.title = button.tip + suffix;
195 -
 195+
196196 /* if this button has a hotkey, then store it in the div,
197197 * so we can iterate them later on, in txta.keypress */
198198 if (button.key) div.store('key', button.key);
199199 }
200200 });
201 -
 201+
202202 wrapper.inject(txta, "before");
203203 toolbar.inject(wrapper);
204204 txta.inject(wrapper);
205 -
 205+
206206 /* when a key is pressed, check the hotkeys of
207207 * each button, and trigger one if relevent
208208 * (eg, ctrl+b = bold) */
@@ -268,4 +268,3 @@
269269 Uniwiki.CustomToolbar.attach($$(".generic-editor textarea.editor"));
270270 Uniwiki.CustomToolbar.attach($$("#wpTextbox1"), true);
271271 });
272 -
Property changes on: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.js
___________________________________________________________________
Added: svn:eol-style
273272 + native
Index: trunk/extensions/uniwiki/CustomToolbar/Element.Forms.js
@@ -7,7 +7,7 @@
88 */
99 Element.implement({
1010 tidy: function(){
11 - try {
 11+ try {
1212 this.set('value', this.get('value').tidy());
1313 }catch(e){dbug.log('element.tidy error: %o', e);}
1414 },
@@ -97,15 +97,14 @@
9898 var selStart = start + options.before.length;
9999 if($pick(select, true)) this.selectRange(selStart, selStart + text.length);
100100 else this.setCaretPosition(selStart + text.length);
101 - }
 101+ }
102102 return this;
103103 }
104104 });
105105
106 -
107106 Element.Properties.inputValue = {
108 -
109 - get: function(){
 107+
 108+ get: function(){
110109 switch(this.get('tag')) {
111110 case 'select':
112111 vals = this.getSelected().map(function(op){ return $pick(op.get('value'),op.get('text')) });
@@ -116,9 +115,9 @@
117116 default:
118117 return this.get('value');
119118 }
120 - },
121 -
122 - set: function(value){
 119+ },
 120+
 121+ set: function(value){
123122 switch(this.get('tag')){
124123 case 'select':
125124 this.getElements('option').each(function(op){
@@ -134,8 +133,8 @@
135134 this.set('value', value);
136135 }
137136 return this;
138 - },
139 -
 137+ },
 138+
140139 erase: function() {
141140 switch(this.get('tag')) {
142141 case 'select':
@@ -153,5 +152,4 @@
154153 }
155154 return this;
156155 }
157 -
158156 };
Property changes on: trunk/extensions/uniwiki/CustomToolbar/Element.Forms.js
___________________________________________________________________
Added: svn:eol-style
159157 + native
Index: trunk/extensions/uniwiki/FormatSearch/FormatSearch.php
@@ -5,7 +5,6 @@
66 if (!defined("MEDIAWIKI"))
77 die();
88
9 -
109 /* ---- CREDITS ---- */
1110
1211 $wgExtensionCredits['other'][] = array(
@@ -14,7 +13,6 @@
1514 'description' => "Minor changes to clean up the search results page"
1615 );
1716
18 -
1917 /* ---- HOOKS ---- */
2018
2119 $wgHooks['BeforePageDisplay'][] = "UW_FormatSearch_CSS";
Property changes on: trunk/extensions/uniwiki/FormatSearch/FormatSearch.php
___________________________________________________________________
Added: svn:eol-style
2220 + native
Index: trunk/extensions/uniwiki/FormatSearch/style.css
@@ -3,7 +3,7 @@
44
55 /* hide the extra search result data */
66 .mw-search-result-data {
7 - display: none;
 7+ display: none;
88 }
99
1010 /* hide the advanced search form */
Property changes on: trunk/extensions/uniwiki/FormatSearch/style.css
___________________________________________________________________
Added: svn:eol-style
1111 + native