Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.i18n.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | $wgGenericEditPageMessages = array(); |
12 | 11 | $wgGenericEditPageMessages['en'] = array( |
13 | 12 | 'gep_emailsubject' => "[$1] Category suggestion: $2", |
— | — | @@ -87,4 +86,3 @@ |
88 | 87 | 'gep_nosectioninstructions' => "Não há seções nesta página. Use as ferramentas à direita para incluir algumas seções.", |
89 | 88 | 'gep_nocategories' => "Selecione, no mínimo, uma categoria antes de salvar" |
90 | 89 | ); |
91 | | - |
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
92 | 90 | + native |
Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php |
— | — | @@ -2,11 +2,10 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | 11 | |
13 | 12 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -15,7 +14,6 @@ |
16 | 15 | 'description' => "Suppliments the edit page with something more usable" |
17 | 16 | ); |
18 | 17 | |
19 | | - |
20 | 18 | /* ---- CONFIGURABLE OPTIONS ---- */ |
21 | 19 | |
22 | 20 | $wgSectionBox = true; |
— | — | @@ -63,15 +61,15 @@ |
64 | 62 | function UW_GenericEditPage_emailSuggestion ($category) { |
65 | 63 | global $wgSuggestCategoryRecipient, $wgEmergencyContact, $wgSitename, $wgUser; |
66 | 64 | require_once ("UserMailer.php"); |
67 | | - |
| 65 | + |
68 | 66 | $from = new MailAddress ($wgEmergencyContact); |
69 | 67 | $to = new MailAddress ($wgSuggestCategoryRecipient); |
70 | 68 | $subj = wfMsg ("gep_emailsubject", $wgSitename, $category); |
71 | 69 | $body = wfMsg ("gep_emailbody", $wgUser->getName(), $category, $wgSitename); |
72 | | - |
| 70 | + |
73 | 71 | // attempt to send the notification |
74 | 72 | $result = userMailer ($to, $from, $subj, $body); |
75 | | - |
| 73 | + |
76 | 74 | /* send a message back to the client, to let them |
77 | 75 | * know if the suggestion was successfully sent (or not) */ |
78 | 76 | return WikiError::isError ($result) |
— | — | @@ -86,10 +84,10 @@ |
87 | 85 | $re = "/\n*<layout\s+name=\"(.+)\"\s+\/>/"; |
88 | 86 | preg_match_all ($re, $text, $matches); |
89 | 87 | $text = preg_replace ($re, "", $text); |
90 | | - |
| 88 | + |
91 | 89 | /* if no layout tag was found, this |
92 | 90 | * function does nothing useful */ |
93 | | - if (!$matches[1][0]) return array(); |
| 91 | + if (!$matches[1][0]) return array(); |
94 | 92 | |
95 | 93 | /* get the wiki markup (containing the |
96 | 94 | * directives) from this page's layout */ |
— | — | @@ -102,7 +100,7 @@ |
103 | 101 | // and the second for the untitled first section |
104 | 102 | $layout[] = array ("name" => $matches[1][0]); |
105 | 103 | $layout[] = array(); |
106 | | - |
| 104 | + |
107 | 105 | // ignore (delete) the categories on the layout |
108 | 106 | $layout_text = preg_replace ("/\[\[category:(.+?)\]\]/i", "", $layout_text); |
109 | 107 | |
— | — | @@ -112,7 +110,7 @@ |
113 | 111 | // build an array with the layout section attributes |
114 | 112 | for ($i= 0; $i < count ($nodes); $i++) { |
115 | 113 | $value = trim ($nodes[$i]); |
116 | | - |
| 114 | + |
117 | 115 | /* is this block of text a header? |
118 | 116 | * update the 'current section' flag ($title), so |
119 | 117 | * all following directives are dropped in to it */ |
— | — | @@ -131,7 +129,7 @@ |
132 | 130 | preg_match_all ($re, $value, $matches); |
133 | 131 | foreach ($matches[1] as $attribute) |
134 | 132 | $layout[$section_num][$attribute] = true; |
135 | | - |
| 133 | + |
136 | 134 | // add the remaining stuff as text |
137 | 135 | $value = preg_replace ($re, "", $value); |
138 | 136 | $layout[$section_num]['text'] = trim($value); |
— | — | @@ -145,40 +143,40 @@ |
146 | 144 | global $wgDBprefix, $wgAddCategory, $wgSuggestCategory, $wgRequest, |
147 | 145 | $wgEmergencyContact, $wgUseCategoryPage, $wgCategoryPage; |
148 | 146 | $out = ""; |
149 | | - |
| 147 | + |
150 | 148 | /* build an array of the categories, either from a page |
151 | 149 | * or from all available categories in the wiki */ |
152 | 150 | $categories = array(); |
153 | 151 | if ($wgUseCategoryPage) { |
154 | | - |
| 152 | + |
155 | 153 | // from the specified page |
156 | 154 | $revision = Revision::newFromTitle (Title::newFromDBKey ($wgCategoryPage)); |
157 | 155 | $results = $revision ? split ("\n", $revision->getText()) : array(); |
158 | 156 | 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(); |
161 | 159 | } |
162 | 160 | } else { |
163 | | - |
| 161 | + |
164 | 162 | // all the categories |
165 | 163 | $db = wfGetDB (DB_MASTER); |
166 | 164 | $results = $db->resultObject ($db->query( |
167 | 165 | "select distinct cl_to from {$wgDBprefix}categorylinks order by cl_to")); |
168 | | - |
| 166 | + |
169 | 167 | while ($result = $results->next()) |
170 | 168 | $categories[] = $result->cl_to; |
171 | 169 | } |
172 | | - |
| 170 | + |
173 | 171 | // extract the categories on this page |
174 | 172 | $regex = "/\[\[category:(.+?)(?:\|.*)?\]\]/i"; |
175 | 173 | preg_match_all ($regex, strtolower($text), $matches); |
176 | 174 | $text = preg_replace ($regex, "", $text); |
177 | | - |
| 175 | + |
178 | 176 | // an array of the categories on the page (in db form) |
179 | 177 | $on_page = array(); |
180 | 178 | foreach ($matches[1] as $cat) |
181 | 179 | $on_page[] = strtolower (Title::newFromText ($cat)->getDBkey()); |
182 | | - |
| 180 | + |
183 | 181 | /* add any categories that may have been passed with the |
184 | 182 | * GET request as if they started out on the page */ |
185 | 183 | $data = $wgRequest->data; |
— | — | @@ -186,20 +184,20 @@ |
187 | 185 | if ($key == 'category') { |
188 | 186 | $category = substr ($value, 9); // value = category-categoryname |
189 | 187 | $on_page[] = strtolower ($category); |
190 | | - if (!in_array ($category, $categories)) |
| 188 | + if (!in_array ($category, $categories)) |
191 | 189 | $categories[] = $category; |
192 | 190 | } |
193 | 191 | } |
194 | 192 | |
195 | | - /* add checkboxes for the categories, |
| 193 | + /* add checkboxes for the categories, |
196 | 194 | * with ones from the page already checked */ |
197 | 195 | $out .= "<div id='category-box'><h3>".wfMsg ('gep_categories')."</h3>"; |
198 | 196 | foreach ($categories as $category) { |
199 | 197 | $fm_id = "category-$category"; |
200 | 198 | $caption = Title::newFromDBkey ($category)->getText(); |
201 | | - $checked = in_array (strtolower ($category), $on_page) |
| 199 | + $checked = in_array (strtolower ($category), $on_page) |
202 | 200 | ? "checked='checked'" : ''; |
203 | | - |
| 201 | + |
204 | 202 | $out .= " |
205 | 203 | <div> |
206 | 204 | <input type='checkbox' name='$fm_id' id='$fm_id' $checked/> |
— | — | @@ -207,7 +205,7 @@ |
208 | 206 | </div> |
209 | 207 | "; |
210 | 208 | } |
211 | | - |
| 209 | + |
212 | 210 | // add a text field to add new categories |
213 | 211 | if ($wgAddCategory) { |
214 | 212 | $out .= " |
— | — | @@ -222,8 +220,8 @@ |
223 | 221 | </script> |
224 | 222 | "; |
225 | 223 | } |
226 | | - |
227 | | - /* add a text field to suggest a category |
| 224 | + |
| 225 | + /* add a text field to suggest a category |
228 | 226 | * as email to $wgEmergencyContact */ |
229 | 227 | if ($wgSuggestCategory) { |
230 | 228 | $out .= " |
— | — | @@ -241,7 +239,7 @@ |
242 | 240 | var cat_name = field.value.trim(); |
243 | 241 | if (cat_name != '') { |
244 | 242 | sajax_do_call ('emailSuggestion', [cat_name], function (msg) { |
245 | | - |
| 243 | + |
246 | 244 | /* got response from the server, append it after the |
247 | 245 | * suggest form (so subsequent suggestions are injected |
248 | 246 | * ABOVE existing suggetions before they're removed) */ |
— | — | @@ -249,7 +247,7 @@ |
250 | 248 | .injectAfter ('fm-suggest-cat-button', 'after') |
251 | 249 | .appendText (msg.responseText) |
252 | 250 | .highlight(); |
253 | | - |
| 251 | + |
254 | 252 | /* fade out and destroy the notification within |
255 | 253 | * a timely manner, to keep the DOM tidy */ |
256 | 254 | (function() { n.fade() }).delay(6000); |
— | — | @@ -314,7 +312,7 @@ |
315 | 313 | $out .= " |
316 | 314 | </div> |
317 | 315 | "; |
318 | | - |
| 316 | + |
319 | 317 | if ($wgAddSection) { |
320 | 318 | $out .= " |
321 | 319 | <div class='add'> |
— | — | @@ -328,7 +326,7 @@ |
329 | 327 | </script> |
330 | 328 | "; |
331 | 329 | } |
332 | | - |
| 330 | + |
333 | 331 | $out .= " |
334 | 332 | </div> |
335 | 333 | <script type='text/javascript'> |
— | — | @@ -344,17 +342,17 @@ |
345 | 343 | function UW_GenericEditPage_displayEditPage ($editor, $out) { |
346 | 344 | global $wgHooks, $wgParser, $wgTitle, $wgRequest, $wgUser, $wgCategoryBox, $wgSectionBox, $wgRequireCategory; |
347 | 345 | global $wgGenericEditPageClass, $wgSwitchMode, $wgGenericEditPageWhiteList; |
348 | | - |
| 346 | + |
349 | 347 | // disable this whole thing on conflict and comment pages |
350 | 348 | if ($editor->section == "new" || $editor->isConflict) |
351 | 349 | return true; |
352 | | - |
| 350 | + |
353 | 351 | // get the article text (as wiki markup) |
354 | 352 | $text = trim ($editor->safeUnicodeOutput ($editor->textbox1)); |
355 | | - |
| 353 | + |
356 | 354 | // see if we have a link to a layout |
357 | 355 | $layout = UW_GenericEditPage_extractLayout ($text); |
358 | | - |
| 356 | + |
359 | 357 | /* remove the categories, to be added as |
360 | 358 | * checkboxes later (after the edit form) */ |
361 | 359 | if ($wgCategoryBox) { |
— | — | @@ -369,14 +367,14 @@ |
370 | 368 | // add css hooks only to the edit page |
371 | 369 | $wgHooks['SkinTemplateSetupPageCss'][] = 'UW_GenericEditPage_editPageCss'; |
372 | 370 | $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'UW_GenericEditPage_addCssHookGenEd'; |
373 | | - |
374 | 371 | |
| 372 | + |
375 | 373 | /* the current contents of the page we are |
376 | 374 | * editing will be broken up into $page(and |
377 | 375 | * combined with $layout, later on) */ |
378 | 376 | $page = array(); |
379 | 377 | $title = ""; |
380 | | - |
| 378 | + |
381 | 379 | /* always create a space for the first un-named |
382 | 380 | * section, even if it is not used */ |
383 | 381 | $page[] = array(); |
— | — | @@ -384,14 +382,14 @@ |
385 | 383 | for ($i = 0; $i < count ($nodes); $i++) { |
386 | 384 | $value = trim ($nodes[$i]); |
387 | 385 | $this_section = count ($page) - 1; |
388 | | - |
| 386 | + |
389 | 387 | // is this block of text a header? |
390 | 388 | $node_is_title = preg_match ('/^(==?)\s*(.+?)\s*\\1$/i', $value, $matches); |
391 | 389 | |
392 | 390 | /* for titles, create a new element in the |
393 | 391 | * page array, to store the title and text */ |
394 | 392 | if ($node_is_title) { |
395 | | - |
| 393 | + |
396 | 394 | // extract header level and title |
397 | 395 | $level = strlen ($matches[1]); |
398 | 396 | $title = htmlspecialchars ($matches[2]); |
— | — | @@ -402,30 +400,30 @@ |
403 | 401 | 'level' => $level, |
404 | 402 | 'in-use' => true |
405 | 403 | ); |
406 | | - |
| 404 | + |
407 | 405 | /* not header -> plain text (store in |
408 | 406 | / * the previous section, with title) */ |
409 | 407 | } else { |
410 | 408 | $page[$this_section]['text'] = $value; |
411 | 409 | } |
412 | | - |
| 410 | + |
413 | 411 | /* fetch the meta-data for new sections, or |
414 | 412 | * the un-named first section. this is done |
415 | 413 | * here (not when merging) because meta-data |
416 | 414 | * can ONLY come from the layout (not the page) */ |
417 | 415 | if ($node_is_title or $i==0) { |
418 | | - |
| 416 | + |
419 | 417 | /* now check if any meta-data exists for this |
420 | 418 | * section in the layout for this page |
421 | 419 | * (ignore the first two sections) |
422 | 420 | * j = 0: page meta-data |
423 | 421 | * j = 1: special first section */ |
424 | | - for ($j = 1; $j < count ($layout); $j++) { |
| 422 | + for ($j = 1; $j < count ($layout); $j++) { |
425 | 423 | if ($layout[$j]['title'] == $title) { |
426 | 424 | // we found a corresponding section in the layout |
427 | 425 | // so we copy all the associated meta-data |
428 | 426 | foreach ($layout[$j] as $k => $v) { |
429 | | - |
| 427 | + |
430 | 428 | // don't overwrite the page text! |
431 | 429 | if ($k != "text") $page[count ($page)-1][$k] = $v; |
432 | 430 | } |
— | — | @@ -433,11 +431,11 @@ |
434 | 432 | } |
435 | 433 | } |
436 | 434 | } |
437 | | - |
| 435 | + |
438 | 436 | /* the results of the |
439 | 437 | * layout + page merge */ |
440 | 438 | $result = array(); |
441 | | - |
| 439 | + |
442 | 440 | /* special case: if the first (un-named) section has text in the layout, |
443 | 441 | * but not in the page, copy it. otherwise, use the page text (even if empty) */ |
444 | 442 | $result[] = ($layout[0]['text'] && !$page[0]['text']) ? $layout[0] : $page[0]; |
— | — | @@ -461,10 +459,10 @@ |
462 | 460 | $result[] = $page[$found_at]; |
463 | 461 | } |
464 | 462 | } |
465 | | - |
| 463 | + |
466 | 464 | // now put in the stuff that is not in the layout, but IS in the page |
467 | 465 | for ($i = 1; $i < count ($page); $i++) { |
468 | | - |
| 466 | + |
469 | 467 | // if this section is already in the result, |
470 | 468 | // then skip to the next page section |
471 | 469 | for ($j=0; $j<count ($result); $j++) { |
— | — | @@ -477,14 +475,14 @@ |
478 | 476 | * of the section BEFORE this section, which |
479 | 477 | * we will insert after */ |
480 | 478 | $insert_at = null; |
481 | | - |
| 479 | + |
482 | 480 | for ($j=0; $j<count ($result); $j++) { |
483 | 481 | if ($result[$j]['title'] == $page[$i-1]['title']) { |
484 | 482 | $insert_at = $j+1; |
485 | 483 | break; |
486 | 484 | } |
487 | 485 | } |
488 | | - |
| 486 | + |
489 | 487 | if ($insert_at===null) $result[] = $page[$i]; |
490 | 488 | else array_splice ($result, $insert_at, 0, array($page[$i])); |
491 | 489 | } |
— | — | @@ -498,7 +496,7 @@ |
499 | 497 | break; |
500 | 498 | } |
501 | 499 | } |
502 | | - |
| 500 | + |
503 | 501 | // use the default (untitled) section if there is nothing else |
504 | 502 | if (!$any_in_use) { |
505 | 503 | $result[0]['in-use'] = true; |
— | — | @@ -532,7 +530,7 @@ |
533 | 531 | value: '".wfMsg ('gep_genericmode')."' |
534 | 532 | }).inject($('content')); |
535 | 533 | "); |
536 | | - |
| 534 | + |
537 | 535 | /* only enforce the categorization of pages in the |
538 | 536 | * main namespace, using the generic edit page */ |
539 | 537 | if ($wgRequireCategory && ($wgTitle->getNamespace() == NS_MAIN)) { |
— | — | @@ -540,11 +538,11 @@ |
541 | 539 | /* when the form is submitted, check that one or |
542 | 540 | * more categories were selected, or alert */ |
543 | 541 | $('editform').addEvent ('submit', function (e) { |
544 | | - |
| 542 | + |
545 | 543 | // only enforce when in generic mode |
546 | 544 | if (!document.body.hasClass ('edit-generic')) |
547 | 545 | return true; |
548 | | - |
| 546 | + |
549 | 547 | /* iterate the category checkboxes, and count |
550 | 548 | * how many of them are 'ticked' */ |
551 | 549 | var checked = 0; |
— | — | @@ -603,7 +601,7 @@ |
604 | 602 | * not it is currently in use. titles |
605 | 603 | * without text are kind of useless */ |
606 | 604 | if ($result[$i]['lock-text']) { |
607 | | - |
| 605 | + |
608 | 606 | /* render the wiki markup into HTML, the old-school |
609 | 607 | * way which actually works, unlike recursiveTagParse() */ |
610 | 608 | $text = $wgParser->parse ($result[$i]['text'], $wgTitle, new ParserOptions)->getText(); |
— | — | @@ -681,7 +679,7 @@ |
682 | 680 | } |
683 | 681 | |
684 | 682 | |
685 | | - // also attach our generic editor stylesheet |
| 683 | + // also attach our generic editor stylesheet |
686 | 684 | function UW_GenericEditPage_editPageCss (&$out) { |
687 | 685 | global $wgScriptPath; |
688 | 686 | $out .= "@import '$wgScriptPath/extensions/uniwiki/GenericEditPage/style.css';\n"; |
— | — | @@ -694,7 +692,7 @@ |
695 | 693 | function UW_GenericEditPage_combineBeforeSave (&$editpage_Obj) { |
696 | 694 | global $wgRequest, $wgSwitchMode; |
697 | 695 | $data = $wgRequest->data; |
698 | | - |
| 696 | + |
699 | 697 | /* if this request was triggered by the user |
700 | 698 | * pressing the "switch mode" button, then |
701 | 699 | * set a global to do some jiggery-pokery |
— | — | @@ -706,7 +704,7 @@ |
707 | 705 | * then this function does nothing! */ |
708 | 706 | if ($data['edit-mode'] != "generic") |
709 | 707 | return true; |
710 | | - |
| 708 | + |
711 | 709 | /* otherwise, clear the textbox and rebuild it |
712 | 710 | * from the generic input POST data */ |
713 | 711 | $editpage_Obj->textbox1 = ''; |
— | — | @@ -715,14 +713,14 @@ |
716 | 714 | $directives = array(); |
717 | 715 | foreach ($data as $key => $value) { |
718 | 716 | if (trim ($value) != '') { |
719 | | - |
| 717 | + |
720 | 718 | if (substr($key, 0, 6) == 'title-') { |
721 | 719 | $index = intval (substr($key, 6)); |
722 | | - |
| 720 | + |
723 | 721 | /* only add this section if it is enabled, |
724 | 722 | * by checking the associated checkbox */ |
725 | 723 | if (isset ($data["enable-$index"])) { |
726 | | - |
| 724 | + |
727 | 725 | /* got a title -> add it back as a header, |
728 | 726 | * by fetching the level from field "level-N" */ |
729 | 727 | $level = isset ($data["level-$index"]) ? $data["level-$index"] : 2; |
— | — | @@ -746,14 +744,14 @@ |
747 | 745 | } |
748 | 746 | } |
749 | 747 | } |
750 | | - |
| 748 | + |
751 | 749 | /* put the section titles and text |
752 | 750 | * back into the default textbox */ |
753 | 751 | foreach (array_keys ($nodes) as $k) { |
754 | 752 | if ($nodes[$k]['title']) $editpage_Obj->textbox1 .= $nodes[$k]['title']; |
755 | 753 | if ($nodes[$k]['text']) $editpage_Obj->textbox1 .= $nodes[$k]['text']; |
756 | 754 | } |
757 | | - |
| 755 | + |
758 | 756 | // then add back the categories |
759 | 757 | if (count ($categories) != 0) { |
760 | 758 | sort ($categories); |
— | — | @@ -769,4 +767,3 @@ |
770 | 768 | |
771 | 769 | return true; |
772 | 770 | } |
773 | | - |
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.php |
___________________________________________________________________ |
Added: svn:eol-style |
774 | 771 | + native |
Index: trunk/extensions/uniwiki/GenericEditPage/global.css |
— | — | @@ -3,5 +3,5 @@ |
4 | 4 | |
5 | 5 | /* hide the [edit] section links */ |
6 | 6 | .editsection { |
7 | | - display: none; |
| 7 | + display: none; |
8 | 8 | } |
Property changes on: trunk/extensions/uniwiki/GenericEditPage/global.css |
___________________________________________________________________ |
Added: svn:eol-style |
9 | 9 | + native |
Index: trunk/extensions/uniwiki/GenericEditPage/style.css |
— | — | @@ -2,54 +2,53 @@ |
3 | 3 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page |
4 | 4 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
5 | 5 | |
6 | | - |
7 | 6 | #editform { |
8 | 7 | position: relative; |
9 | | - |
| 8 | + |
10 | 9 | /* mootools sortables requires relative elements to |
11 | 10 | * have "layout", to correctly calculate dimensions |
12 | 11 | * see: http://dev.mootools.net/changeset/1499 */ |
13 | 12 | zoom: 1; |
14 | 13 | } |
15 | 14 | |
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 | +} |
24 | 23 | |
25 | | - .generic-editor.show-instructions .instructions { |
26 | | - display: block; } |
| 24 | +.generic-editor.show-instructions .instructions { |
| 25 | + display: block; } |
27 | 26 | |
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 | +} |
33 | 32 | |
34 | | - .generic-editor .in-use { |
35 | | - padding-bottom: 2em; |
36 | | - } |
| 33 | +.generic-editor .in-use { |
| 34 | + padding-bottom: 2em; |
| 35 | +} |
37 | 36 | |
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 | +} |
43 | 42 | |
44 | | - .generic-editor .not-in-use { |
45 | | - display: none; |
46 | | - } |
| 43 | +.generic-editor .not-in-use { |
| 44 | + display: none; |
| 45 | +} |
47 | 46 | |
48 | | - .generic-editor textarea { |
49 | | - height: 12em; |
50 | | - } |
| 47 | +.generic-editor textarea { |
| 48 | + height: 12em; |
| 49 | +} |
51 | 50 | |
52 | | - .generic-editor .locked-text { |
53 | | - } |
| 51 | +.generic-editor .locked-text { |
| 52 | +} |
54 | 53 | |
55 | 54 | /* hide a lot of mediawiki junk at the |
56 | 55 | * top of the edit form when it generic mode */ |
— | — | @@ -84,85 +83,85 @@ |
85 | 84 | body.edit-generic.with-sidebar #editform { |
86 | 85 | padding-right: 17em; } |
87 | 86 | |
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 | +} |
107 | 96 | |
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; } |
112 | 100 | |
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 | +} |
123 | 106 | |
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; } |
132 | 111 | |
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 | +} |
166 | 116 | |
| 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 | + |
167 | 166 | .edit-classic .generic-editor, |
168 | 167 | .edit-generic #toolbar, |
169 | 168 | .edit-generic #wpTextbox1 { |
— | — | @@ -190,4 +189,3 @@ |
191 | 190 | body.switching-mode #catlinks { |
192 | 191 | display: none; |
193 | 192 | } |
194 | | - |
Property changes on: trunk/extensions/uniwiki/GenericEditPage/style.css |
___________________________________________________________________ |
Added: svn:eol-style |
195 | 193 | + native |
Index: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.js |
— | — | @@ -2,7 +2,6 @@ |
3 | 3 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page |
4 | 4 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
5 | 5 | |
6 | | - |
7 | 6 | Uniwiki.GenericEditPage = { |
8 | 7 | |
9 | 8 | /* store the instance of the Mootools sortable |
— | — | @@ -15,7 +14,7 @@ |
16 | 15 | * sliding around */ |
17 | 16 | sections_sorting: true, |
18 | 17 | |
19 | | - |
| 18 | + |
20 | 19 | /* to switch between modes (generic and classic), |
21 | 20 | * we must (effectively) click preview (to re- |
22 | 21 | * combine the wiki markup server-side), and |
— | — | @@ -24,7 +23,7 @@ |
25 | 24 | /* picked up by the combineBeforeSave hook |
26 | 25 | * in GenericEditor.php to set the new mode */ |
27 | 26 | $("switch-mode").value = 1; |
28 | | - |
| 27 | + |
29 | 28 | /* simulate a click on "preview" by setting |
30 | 29 | * a faux input field with the same name */ |
31 | 30 | $("wpFakePreview").name = "wpPreview"; |
— | — | @@ -38,7 +37,7 @@ |
39 | 38 | editor: function () { |
40 | 39 | return $$(".generic-editor")[0]; |
41 | 40 | }, |
42 | | - |
| 41 | + |
43 | 42 | /* util function to trigger a click event |
44 | 43 | * upon receiving an [ENTER] key press (for |
45 | 44 | * the add [cat | section] boxes, initially */ |
— | — | @@ -79,7 +78,7 @@ |
80 | 79 | |
81 | 80 | |
82 | 81 | Events: { |
83 | | - |
| 82 | + |
84 | 83 | // == SYNCHRONISE SIDEBAR WITH EDITABLE TITLES == |
85 | 84 | section_title_change: function() { |
86 | 85 | $$(".generic-editor input.section-title"). |
— | — | @@ -101,7 +100,7 @@ |
102 | 101 | * have to do insert any wiki markup, because the combine- |
103 | 102 | * BeforeSave function in GenericEditPage.php will do it */ |
104 | 103 | acat_btn.addEvent( "click", function(e) { |
105 | | - |
| 104 | + |
106 | 105 | // abort if no category name was entered |
107 | 106 | var cat_name = acat_fld.value.trim(); |
108 | 107 | if (cat_name == "") return true; |
— | — | @@ -111,7 +110,7 @@ |
112 | 111 | var already_exists = false; |
113 | 112 | $$("#category-box input[type=checkbox]").each (function(obj) { |
114 | 113 | if (obj.name == "category-" + cat_name) { |
115 | | - |
| 114 | + |
116 | 115 | /* ensure that the category is checked, |
117 | 116 | * and highlight it to notify the user */ |
118 | 117 | already_exists = true; |
— | — | @@ -123,13 +122,13 @@ |
124 | 123 | |
125 | 124 | // abort if the new cat name already exists |
126 | 125 | if (already_exists) return true; |
127 | | - |
| 126 | + |
128 | 127 | /* if no category by this name already exists, |
129 | 128 | * then we will add a new checkbox (to be found |
130 | 129 | * by the server-side combineBeforeSave function) */ |
131 | 130 | var f_id = "category-" + cat_name; |
132 | 131 | var div = new Element ("div").appendText(" "); |
133 | | - |
| 132 | + |
134 | 133 | // create the new checkbox |
135 | 134 | var input = new Element ("input", { |
136 | 135 | 'id': f_id, |
— | — | @@ -137,20 +136,20 @@ |
138 | 137 | 'type': "checkbox", |
139 | 138 | 'checked': "checked" |
140 | 139 | }).inject(div); |
141 | | - |
| 140 | + |
142 | 141 | // create the label |
143 | 142 | var label = new Element ("label", { 'for': f_id }) |
144 | 143 | .appendText (cat_name).inject (div); |
145 | | - |
| 144 | + |
146 | 145 | /* insert the new category before the add |
147 | 146 | * form and flash it, to notify the user */ |
148 | 147 | div.inject (acat_btn.getParent(), "before"); |
149 | 148 | div.highlight(); |
150 | | - |
| 149 | + |
151 | 150 | /* clear the new category name field */ |
152 | 151 | acat_fld.value = ""; |
153 | 152 | }); |
154 | | - |
| 153 | + |
155 | 154 | /* catch the ENTER key in the category name box, |
156 | 155 | * to prevent the entire edit form from submitting |
157 | 156 | * (redirect it to the click event, above) */ |
— | — | @@ -173,7 +172,7 @@ |
174 | 173 | |
175 | 174 | var already_exists = false; |
176 | 175 | $$("#section-box input[type=checkbox]").each (function(obj) { |
177 | | - |
| 176 | + |
178 | 177 | /* fetch the NAME of this checkbox, via its label |
179 | 178 | * (section checkboxes are only identified by index) */ |
180 | 179 | var labels = obj.getParent().getElements('label'); |
— | — | @@ -196,14 +195,14 @@ |
197 | 196 | if (already_exists) return true; |
198 | 197 | |
199 | 198 | /* we're creating a new section; index |
200 | | - * it one higher than the current maximum */ |
| 199 | + * it one higher than the current maximum */ |
201 | 200 | sect_index++; |
202 | | - |
| 201 | + |
203 | 202 | var div = new Element ("div", { |
204 | 203 | 'id': "sect-" + sect_index, |
205 | 204 | 'class': "section-box" |
206 | 205 | }); |
207 | | - |
| 206 | + |
208 | 207 | // create the checkbox |
209 | 208 | var f_name = "enable-" + sect_index; |
210 | 209 | var f_id = "fm-" + f_name; |
— | — | @@ -217,11 +216,11 @@ |
218 | 217 | /* add a single space between the checkbox |
219 | 218 | * and label, to match existing sections */ |
220 | 219 | div.appendText(" "); |
221 | | - |
| 220 | + |
222 | 221 | // create the label |
223 | 222 | var label = new Element ("label", { 'for': f_id }) |
224 | 223 | .appendText (sect_name).inject (div); |
225 | | - |
| 224 | + |
226 | 225 | /* insert the new section div (in sidebar) into the |
227 | 226 | * sortables container, and hook up the event handlers |
228 | 227 | * to make it play nice with the other sections */ |
— | — | @@ -229,7 +228,7 @@ |
230 | 229 | var sortables = Uniwiki.GenericEditPage.sections_sortables; |
231 | 230 | if (sortables) sortables.addItems (div); |
232 | 231 | div.highlight(); |
233 | | - |
| 232 | + |
234 | 233 | // create and inject the real section into the editor |
235 | 234 | var klass = "section sect-" + (sect_index+1) + " in-use"; |
236 | 235 | var div = new Element ("div", { 'id': "section-" + sect_index, 'class': klass }); |
— | — | @@ -244,15 +243,15 @@ |
245 | 244 | * this section */ |
246 | 245 | if (Uniwiki.CustomToolbar) |
247 | 246 | Uniwiki.CustomToolbar.attach (txta); |
248 | | - |
| 247 | + |
249 | 248 | /* hide the instructions box, now that we |
250 | 249 | * have at least one section in the editor */ |
251 | 250 | Uniwiki.GenericEditPage.update_instructions_box(); |
252 | | - |
| 251 | + |
253 | 252 | // clear the "new section name" field |
254 | 253 | asect_fld.value = ""; |
255 | 254 | }); |
256 | | - |
| 255 | + |
257 | 256 | Uniwiki.GenericEditPage.bind_enter_to_click (asect_fld, asect_btn); |
258 | 257 | }, |
259 | 258 | |
— | — | @@ -264,7 +263,7 @@ |
265 | 264 | // == HANDLE SECTION-IN-USE CHECKBOXES == |
266 | 265 | var evt_type = Browser.Engine.trident ? 'click' : 'change'; |
267 | 266 | sortables.addEvent(evt_type, function(e) { |
268 | | - |
| 267 | + |
269 | 268 | // don't mess with things that aren't checkboxes |
270 | 269 | if ($(e.target).get('tag') != 'input') return true; |
271 | 270 | |
— | — | @@ -288,7 +287,7 @@ |
289 | 288 | |
290 | 289 | // we will need this all over the place |
291 | 290 | var editor = Uniwiki.GenericEditPage.editor(); |
292 | | - |
| 291 | + |
293 | 292 | // check that this document has a sortable sections box |
294 | 293 | var sortables = $$("#section-box .sortables")[0]; |
295 | 294 | if (!sortables) return true; |
— | — | @@ -300,14 +299,14 @@ |
301 | 300 | * because mootools waits for mousedown THEN mousemove to trigger; which |
302 | 301 | * is quite confusing for end-users */ |
303 | 302 | sortables.addEvent ("mousedown", function(e) { |
304 | | - |
| 303 | + |
305 | 304 | // don't highlight anything if sorting is suspended |
306 | 305 | if (!Uniwiki.GenericEditPage.sections_sorting) |
307 | 306 | return false; |
308 | 307 | |
309 | 308 | var t = $(e.target); |
310 | 309 | var tag = t.get("tag"); |
311 | | - |
| 310 | + |
312 | 311 | /* do nothing for input (checkbox), as not to interfere |
313 | 312 | * with their normal behaviour. otherwise, highlight |
314 | 313 | * the section box (entire row) */ |
— | — | @@ -324,12 +323,12 @@ |
325 | 324 | dragger.retrieve ("tween").cancel(); |
326 | 325 | dragger.store ("tween", null); |
327 | 326 | } |
328 | | - |
| 327 | + |
329 | 328 | // set css hooks to make dragging visible |
330 | 329 | dragger.setStyle ("background-color", "#ff8"); |
331 | 330 | dragger.getParent().addClass ("dragging"); |
332 | 331 | dragger.addClass ("dragging"); |
333 | | - |
| 332 | + |
334 | 333 | /* watch the whole document for mouseup, because the |
335 | 334 | * cursor may no longer be in the sortables box */ |
336 | 335 | var evt = function() { |
— | — | @@ -363,7 +362,7 @@ |
364 | 363 | Uniwiki.GenericEditPage.sections_sortables = |
365 | 364 | new Sortables(sortables, { |
366 | 365 | onComplete: function(obj) { |
367 | | - |
| 366 | + |
368 | 367 | // fetch the section we are moving |
369 | 368 | var sect_id = obj.id.replace(/\D/g, ""); |
370 | 369 | var section = $("section-" + sect_id); |
— | — | @@ -377,7 +376,7 @@ |
378 | 377 | // skip this whole thing is the position has not changed |
379 | 378 | if (!section || (newIndex == oldIndex)) |
380 | 379 | return true; |
381 | | - |
| 380 | + |
382 | 381 | /* disable sorting and sizing until all of the |
383 | 382 | * re-ordering and sliding around is done */ |
384 | 383 | Uniwiki.GenericEditPage.sections_sortables.detach(); |
— | — | @@ -387,7 +386,7 @@ |
388 | 387 | var stage = 1; |
389 | 388 | var slider = new Fx.Slide (section, { |
390 | 389 | onComplete: function() { |
391 | | - |
| 390 | + |
392 | 391 | // 1 = SLIDE OUT EVENT |
393 | 392 | if (stage==1) { |
394 | 393 | stage = 2; |
— | — | @@ -397,7 +396,7 @@ |
398 | 397 | /* the div that is actually moving is |
399 | 398 | * intermediate (inserted by MooTools) */ |
400 | 399 | var moving = section.getParent(); |
401 | | - |
| 400 | + |
402 | 401 | /* newIndex offset is always +2, to skip the first (anonymous) |
403 | 402 | * introduction section and the instruction box. both are inside |
404 | 403 | * the generic editor (even if they shouldn't be) */ |
— | — | @@ -430,10 +429,10 @@ |
431 | 430 | * condition in IE6, which i don't have time to debug */ |
432 | 431 | moving.inject(anchor, rel); |
433 | 432 | (function () { slider.slideIn(); }).delay(100); |
434 | | - |
| 433 | + |
435 | 434 | // 2 = SLIDE IN EVENT |
436 | 435 | } else if (stage==2) { |
437 | | - |
| 436 | + |
438 | 437 | /* get rid of intermediate element, |
439 | 438 | * and don't re-call this event. this |
440 | 439 | * breaks encapsulation, and is a hack :( */ |
— | — | @@ -499,4 +498,3 @@ |
500 | 499 | } |
501 | 500 | } // Events |
502 | 501 | }; |
503 | | - |
Property changes on: trunk/extensions/uniwiki/GenericEditPage/GenericEditPage.js |
___________________________________________________________________ |
Added: svn:eol-style |
504 | 502 | + native |
Index: trunk/extensions/uniwiki/CreatePage/CreatePage.i18n.php |
— | — | @@ -47,4 +47,3 @@ |
48 | 48 | 'createpage_tryagain' => "Não - Eu quero criar uma nova página com outro título.", |
49 | 49 | 'createpage_editexisting' => "Sim - Eu quero editar a página existente." |
50 | 50 | ); |
51 | | - |
Property changes on: trunk/extensions/uniwiki/CreatePage/CreatePage.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
52 | 51 | + native |
Index: trunk/extensions/uniwiki/CreatePage/CreatePage.php |
— | — | @@ -2,17 +2,16 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Generic_Edit_Page |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | 11 | |
13 | 12 | /* This code was adapted from CreatePage.php from: |
14 | 13 | * Travis Derouin <travis@wikihow.com> |
15 | 14 | * |
16 | | - * originally licensed as: |
| 15 | + * originally licensed as: |
17 | 16 | * GNU GPL v2.0 or later */ |
18 | 17 | |
19 | 18 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -56,63 +55,62 @@ |
57 | 56 | $skin = $wgUser->getSkin(); |
58 | 57 | $thisPage = Title::newFromText ("CreatePage", NS_SPECIAL); |
59 | 58 | $target = $wgRequest->getVal ("target", null); |
60 | | - |
| 59 | + |
61 | 60 | // check to see if we are trying to create a page |
62 | 61 | if ($target != null) { |
63 | 62 | $title = Title::newFromText ($target); |
64 | | - |
| 63 | + |
65 | 64 | if ($title->getArticleID() > 0) { |
66 | | - |
| 65 | + |
67 | 66 | // if the title exists then let the user know and give other options |
68 | 67 | $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/>" |
70 | 69 | .$skin->makeLinkObj ($thisPage, wfMsg ("createpage_tryagain")) |
71 | 70 | ); |
72 | 71 | } else { |
73 | 72 | /* TODO - may want to search for closely named pages and give |
74 | 73 | * other options here... */ |
75 | | - |
| 74 | + |
76 | 75 | // otherwise, redirect them to the edit page for their title |
77 | 76 | $wgOut->redirect ($title->getEditURL()); |
78 | 77 | } |
79 | | - |
| 78 | + |
80 | 79 | return; |
81 | 80 | } |
82 | | - |
| 81 | + |
83 | 82 | // if this is just a normal GET, then output the form |
84 | | - |
| 83 | + |
85 | 84 | // prefill the input with the title, if it was passed along |
86 | 85 | $newTitle = $wgRequest->getVal("newtitle", null); |
87 | 86 | if ($newTitle != null) $newTitle = str_replace("_", " ", $newTitle); |
88 | | - |
| 87 | + |
89 | 88 | // add some instructions |
90 | 89 | $wgOut->addHTML(wfMsg('createpage_instructions')); |
91 | | - |
| 90 | + |
92 | 91 | // js for checking the form |
93 | 92 | $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 | + } |
102 | 101 | // everything is OK, return true |
103 | | - return true; |
104 | | - } |
105 | | - </script> |
| 102 | + return true; |
| 103 | + } |
| 104 | + </script> |
106 | 105 | "); |
107 | | - |
| 106 | + |
108 | 107 | // output the form |
109 | 108 | $wgOut->addHTML(" |
110 | 109 | <form method=POST onsubmit='return checkForm()' name='createpageform'> |
111 | 110 | <input type=text name=target size=50 value='$newTitle'><br/><br/> |
112 | 111 | "); |
113 | | - |
| 112 | + |
114 | 113 | $wgOut->addHTML(" |
115 | 114 | <input type=submit value='".wfMsg('createpage_submitbutton')."'> |
116 | 115 | </form> |
117 | 116 | "); |
118 | 117 | } |
119 | | - |
Property changes on: trunk/extensions/uniwiki/CreatePage/CreatePage.php |
___________________________________________________________________ |
Added: svn:eol-style |
120 | 118 | + native |
Index: trunk/extensions/uniwiki/CreatePage/style.css |
— | — | @@ -18,14 +18,14 @@ |
19 | 19 | border: 0; |
20 | 20 | } |
21 | 21 | |
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 |
33 | 33 | + native |
Index: trunk/extensions/uniwiki/Layouts/Layouts.i18n.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | $wgLayoutsMessages = array(); |
12 | 11 | $wgLayoutsMessages['en'] = array( |
13 | 12 | 'layouts_title' => "Create a page", |
— | — | @@ -47,4 +46,3 @@ |
48 | 47 | 'layouts_unknown' => "DESCONHECIDO", |
49 | 48 | 'layouts_tagline' => "Esta página foi gerada pelo layout <strong>$1</strong>." |
50 | 49 | ); |
51 | | - |
Property changes on: trunk/extensions/uniwiki/Layouts/Layouts.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
52 | 50 | + native |
Index: trunk/extensions/uniwiki/Layouts/Layouts.php |
— | — | @@ -2,11 +2,10 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Layouts |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | 11 | |
13 | 12 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -83,32 +82,32 @@ |
84 | 83 | * in the middle of switching modes */ |
85 | 84 | if ($wgRequest->data['switch-mode']) |
86 | 85 | return true; |
87 | | - |
| 86 | + |
88 | 87 | /* if this page is new, |
89 | 88 | * no layout variable is in the query string, |
90 | 89 | * and the page is in a namespace that is using the extension |
91 | 90 | * 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) |
94 | 93 | && in_array ($article->mTitle->getNamespace(), $wgLayoutWhiteList) |
95 | 94 | && ($wgRequest->getVal("action") != "submit")) |
96 | 95 | |
97 | 96 | // redirect to the "pick a layout" page! |
98 | 97 | $wgOut->redirect($article->mTitle->getInternalUrl ("action=layout")); |
99 | | - |
| 98 | + |
100 | 99 | return true; |
101 | 100 | } |
102 | 101 | |
103 | 102 | $wgHooks['UnknownAction'][] = "UW_Layouts_checkActionIsLayout"; |
104 | 103 | function UW_Layouts_checkActionIsLayout($action, $article) { |
105 | | - global $wgOut, $wgDBprefix, $wgLayoutCategories, $wgLayoutUseCategoryPage, |
| 104 | + global $wgOut, $wgDBprefix, $wgLayoutCategories, $wgLayoutUseCategoryPage, |
106 | 105 | $wgNoLayoutOption, $wgLayoutCategoryPage, $wgContLang, |
107 | 106 | $wgLayoutCategoryNSWhiteList; |
108 | | - |
| 107 | + |
109 | 108 | // not layout = do nothing |
110 | 109 | if ($action!="layout") |
111 | 110 | return true; |
112 | | - |
| 111 | + |
113 | 112 | /* if this page already exists, or |
114 | 113 | * is a discussion page, redirect |
115 | 114 | * to the regular edit page */ |
— | — | @@ -117,7 +116,7 @@ |
118 | 117 | $wgOut->redirect($article->mTitle->getInternalUrl ("action=edit")); |
119 | 118 | return false; |
120 | 119 | } |
121 | | - |
| 120 | + |
122 | 121 | // pluck out the bits that we need from mTitle |
123 | 122 | $title = $article->mTitle->getPrefixedText(); |
124 | 123 | $url = $article->mTitle->getInternalUrl(); |
— | — | @@ -125,13 +124,13 @@ |
126 | 125 | $namespace = $article->mTitle->getNamespace(); |
127 | 126 | |
128 | 127 | $wgOut->setPageTitle (wfMsg ("layouts_title")); |
129 | | - |
| 128 | + |
130 | 129 | /* fetch all articles/pages in the NS_LAYOUT namespace |
131 | 130 | * by directly querying the database. mediawiki doesn't |
132 | 131 | * provide any OO way of doing this :( */ |
133 | 132 | $db = wfGetDB(DB_MASTER); |
134 | 133 | $layouts = $db->resultObject ($db->query ("select * from {$wgDBprefix}page where page_namespace=".NS_LAYOUT." order by page_title")); |
135 | | - |
| 134 | + |
136 | 135 | $wgOut->addHTML (wfMsg ("layouts_chooselayout", $title)." |
137 | 136 | <form action='$url' method='get'> |
138 | 137 | <input type='hidden' name='title' value='$name' /> |
— | — | @@ -150,17 +149,17 @@ |
151 | 150 | $text = $revision->getText(); |
152 | 151 | $lines = explode ("\n", $text); |
153 | 152 | $namespaces = array(); |
154 | | - |
| 153 | + |
155 | 154 | // add this layout to the choices by default |
156 | 155 | $add = true; |
157 | | - |
| 156 | + |
158 | 157 | /* go through the layout text and see if it has an @namespace |
159 | 158 | * restriction, if so only add the layout as a choice if we find |
160 | 159 | * the namespace of this page in the layout text */ |
161 | 160 | foreach ($lines as $line) { |
162 | 161 | if (preg_match ("/^@namespace(.+?)$/m", $line, $matches)) { |
163 | 162 | $namespaces = explode (" ", trim($matches[1])); |
164 | | - $add = in_array ($wgContLang->getNsText ($namespace), $namespaces) || |
| 163 | + $add = in_array ($wgContLang->getNsText ($namespace), $namespaces) || |
165 | 164 | $namespace == NS_MAIN && in_array ("Main", $namespaces); |
166 | 165 | } |
167 | 166 | } |
— | — | @@ -189,32 +188,32 @@ |
190 | 189 | "); |
191 | 190 | } |
192 | 191 | $wgOut->addHTML("<br/>"); |
193 | | - |
| 192 | + |
194 | 193 | /* check to see if we are allowing categories on the layout page |
195 | 194 | * and if so then, either grab all the categories, or get them from |
196 | 195 | * the designated page (do this for pages in the whitelisted namespaces) */ |
197 | 196 | if ($wgLayoutCategories && in_array($namespace, $wgLayoutCategoryNSWhiteList)) { |
198 | 197 | $categories = array(); |
199 | | - |
| 198 | + |
200 | 199 | /* get the categories from the page if desired, |
201 | 200 | * otherwise grab them from the db */ |
202 | 201 | if ($wgLayoutUseCategoryPage) { |
203 | 202 | $revision = Revision::newFromTitle(Title::newFromDBKey($wgLayoutCategoryPage)); |
204 | 203 | $results = $revision ? split("\n", $revision->getText()) : array(); |
205 | 204 | 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(); |
208 | 207 | } |
209 | 208 | } else { |
210 | 209 | // todo: implement this later... |
211 | 210 | } |
212 | | - |
| 211 | + |
213 | 212 | // add radio buttons for the categories |
214 | 213 | $default = true; |
215 | 214 | $title = $article->mTitle->getPrefixedText(); |
216 | 215 | $wgOut->addHTML("<div id='category-box'>".wfMsg ("layouts_choosecategory", $title)); |
217 | 216 | foreach ($categories as $category) { |
218 | | - $checked = $default ? "checked='checked'" : ""; |
| 217 | + $checked = $default ? "checked='checked'" : ""; |
219 | 218 | $default = false; |
220 | 219 | $fm_id = "category-$category"; |
221 | 220 | $caption = Title::newFromDBkey ($category)->getText(); |
— | — | @@ -227,10 +226,10 @@ |
228 | 227 | } |
229 | 228 | $wgOut->addHTML ("</div><br/>"); |
230 | 229 | } |
231 | | - |
| 230 | + |
232 | 231 | $wgOut->addHTML ("<input type='submit' value='".wfMsg('layouts_continue')."' />"); |
233 | 232 | $wgOut->addHTML ("</form>"); |
234 | | - |
| 233 | + |
235 | 234 | return false; |
236 | 235 | } |
237 | 236 | |
— | — | @@ -244,31 +243,31 @@ |
245 | 244 | $wgHooks['EditFormPreloadText'][] = "UW_Layouts_preFillTextBox"; |
246 | 245 | function UW_Layouts_preFillTextBox (&$text, $title) { |
247 | 246 | global $wgRequest, $wgAddLayoutLink; |
248 | | - |
| 247 | + |
249 | 248 | /* fetch the layout from the query string, |
250 | 249 | * or abort this hook if it is missing */ |
251 | 250 | $layout_slug = $wgRequest->getVal ("layout"); |
252 | 251 | if ($layout_slug === NULL) |
253 | 252 | return true; |
254 | | - |
| 253 | + |
255 | 254 | // fetch the layout object |
256 | 255 | $layout_title = Title::newFromURL ("Layout:".$layout_slug); |
257 | 256 | $layout_article = new Article ($layout_title); |
258 | | - |
| 257 | + |
259 | 258 | /* if the layout article exists, pre-fill the textarea with its |
260 | 259 | * wiki text. if it doesn't exist, do nothing (no error) */ |
261 | 260 | if (($layout_text = $layout_article->fetchContent()) !== false) { |
262 | | - |
| 261 | + |
263 | 262 | /* break the layout text into sections by splitting |
264 | 263 | * at header level =one= or ==two==, and iterate */ |
265 | 264 | $nodes = preg_split ("/^(==?[^=].*)$/mi", $layout_text, -1, PREG_SPLIT_DELIM_CAPTURE); |
266 | 265 | for ($i=0; $i<count($nodes); $i++) { |
267 | | - |
| 266 | + |
268 | 267 | /* if the next node is OPTIONAL, then skip over it |
269 | 268 | * (it will be included if using GenericEditor) */ |
270 | 269 | if (preg_match ("/^@optional$/m", $nodes[$i+1])) { |
271 | 270 | $i++; |
272 | | - |
| 271 | + |
273 | 272 | /* not an optional section, or |
274 | 273 | * text that hasn't been skipped */ |
275 | 274 | } else { |
— | — | @@ -281,7 +280,6 @@ |
282 | 281 | |
283 | 282 | if ($wgAddLayoutLink && $layout_slug != 'none') |
284 | 283 | $text .= "\n\n<layout name=\"$layout_slug\" />"; |
285 | | - |
| 284 | + |
286 | 285 | return true; |
287 | 286 | } |
288 | | - |
Property changes on: trunk/extensions/uniwiki/Layouts/Layouts.php |
___________________________________________________________________ |
Added: svn:eol-style |
289 | 287 | + native |
Index: trunk/extensions/uniwiki/Layouts/style.css |
— | — | @@ -17,16 +17,15 @@ |
18 | 18 | padding: 0pt 0.8em 0.3em 0.5em; |
19 | 19 | } |
20 | 20 | |
21 | | - #p-search form { |
22 | | - padding: 5px; |
23 | | - } |
| 21 | +#p-search form { |
| 22 | + padding: 5px; |
| 23 | +} |
24 | 24 | |
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 | +} |
33 | 29 | |
| 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 |
34 | 33 | + native |
Index: trunk/extensions/uniwiki/FormatChanges/FormatChanges.i18n.php |
— | — | @@ -10,5 +10,5 @@ |
11 | 11 | $wgFormatChangesMessages['en'] = array( |
12 | 12 | 'fc_anonymous' => "Anonymous", |
13 | 13 | 'fc_createdby' => "created by", |
14 | | - 'fc_editedby' => "edited by" |
| 14 | + 'fc_editedby' => "edited by", |
15 | 15 | ); |
Property changes on: trunk/extensions/uniwiki/FormatChanges/FormatChanges.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
16 | 16 | + native |
Index: trunk/extensions/uniwiki/FormatChanges/FormatChanges.php |
— | — | @@ -1,11 +1,10 @@ |
2 | 2 | <?php |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
5 | | - |
| 5 | + |
6 | 6 | if (!defined("MEDIAWIKI")) |
7 | 7 | die(); |
8 | 8 | |
9 | | - |
10 | 9 | /* ---- CREDITS ---- */ |
11 | 10 | |
12 | 11 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -30,11 +29,11 @@ |
31 | 30 | |
32 | 31 | $wgHooks['FetchChangesList'][] = "UW_FormatChanges"; |
33 | 32 | function UW_FormatChanges($user, $skin, $list) { |
34 | | - $list = new UniwikiChangesList($skin); |
| 33 | + $list = new UniwikiChangesList($skin); |
35 | 34 | return false; |
36 | 35 | } |
37 | 36 | |
38 | | -class UniwikiChangesList extends ChangesList { |
| 37 | +class UniwikiChangesList extends ChangesList { |
39 | 38 | |
40 | 39 | public function recentChangesLine(&$rc, $watched=false) { |
41 | 40 | global $wgLang; |
— | — | @@ -47,18 +46,18 @@ |
48 | 47 | /* NOTE: the following logic is reproduced from |
49 | 48 | * the old version of the recent changes |
50 | 49 | * 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)... |
53 | 52 | */ |
54 | 53 | |
55 | 54 | // moved pages |
56 | 55 | if ($rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT) { |
57 | 56 | // handle these? |
58 | | - } |
| 57 | + } |
59 | 58 | // log entries(old) and special pages |
60 | 59 | else if ($rc_namespace == NS_SPECIAL) { |
61 | 60 | // handle these? |
62 | | - } |
| 61 | + } |
63 | 62 | // new unpatrolled pages |
64 | 63 | else if ($rc->unpatrolled && $rc_type == RC_NEW) { |
65 | 64 | // handle these? |
— | — | @@ -77,12 +76,11 @@ |
78 | 77 | $user_link = ($rc_user > 0) ? $this->skin->userLink($rc_user, $rc_user_text) : wfMsg('fc_anonymous'); |
79 | 78 | } |
80 | 79 | $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'); |
82 | 81 | $line .= $page_link . " - " . $action . " " . $user_link . " (" . $timestamp . ")"; |
83 | 82 | $line .= "</li>"; |
84 | 83 | } |
85 | 84 | |
86 | 85 | return $line; |
87 | 86 | } |
88 | | - |
89 | 87 | } |
Property changes on: trunk/extensions/uniwiki/FormatChanges/FormatChanges.php |
___________________________________________________________________ |
Added: svn:eol-style |
90 | 88 | + native |
Index: trunk/extensions/uniwiki/Authors/Authors.i18n.php |
— | — | @@ -9,5 +9,5 @@ |
10 | 10 | |
11 | 11 | $wgAuthorsMessages['en'] = array( |
12 | 12 | 'authors_authors' => "Authors", |
13 | | - 'authors_anonymous' => "Anonymous" |
| 13 | + 'authors_anonymous' => "Anonymous", |
14 | 14 | ); |
Property changes on: trunk/extensions/uniwiki/Authors/Authors.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
15 | 15 | + native |
Index: trunk/extensions/uniwiki/Authors/Authors.php |
— | — | @@ -2,13 +2,11 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Authors |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | | - |
13 | 11 | $wgExtensionCredits['other'][] = array( |
14 | 12 | 'name' => "Authors", |
15 | 13 | 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)", |
— | — | @@ -16,7 +14,6 @@ |
17 | 15 | ); |
18 | 16 | |
19 | 17 | /* ---- INTERNATIONALIZATION ---- */ |
20 | | - |
21 | 18 | require_once ("Authors.i18n.php"); |
22 | 19 | $wgExtensionFunctions[] = "UW_Authors_i18n"; |
23 | 20 | |
— | — | @@ -28,26 +25,23 @@ |
29 | 26 | } |
30 | 27 | |
31 | 28 | /* ---- CONFIGURABLE OPTIONS ---- */ |
32 | | - |
33 | 29 | $wgShowAuthorsNamespaces = array (NS_MAIN); |
34 | 30 | $wgShowAuthors = true; |
35 | 31 | |
36 | | - |
37 | 32 | /* ---- HOOKS ---- */ |
38 | | - |
39 | 33 | $wgHooks['OutputPageBeforeHTML'][] = "UW_Authors_List"; |
40 | 34 | function UW_Authors_List (&$out, &$text) { |
41 | 35 | global $wgTitle, $wgRequest, $wgShowAuthorsNamespaces, $wgShowAuthors; |
42 | | - |
| 36 | + |
43 | 37 | /* do nothing if the option is disabled |
44 | 38 | * (but why would the extension be enabled?) */ |
45 | 39 | if (!wgShowAuthors) |
46 | 40 | return true; |
47 | | - |
| 41 | + |
48 | 42 | // only build authors on namespaces in $wgShowAuthorsNamespaces |
49 | 43 | if (!in_array ($wgTitle->getNamespace(), $wgShowAuthorsNamespaces)) |
50 | 44 | return true; |
51 | | - |
| 45 | + |
52 | 46 | /* get the contribs from the database (don't use the default |
53 | 47 | * MediaWiki one since it ignores the current user) */ |
54 | 48 | $article = new Article ($wgTitle); |
— | — | @@ -61,23 +55,23 @@ |
62 | 56 | WHERE rev_page = {$article->getID()} |
63 | 57 | GROUP BY rev_user, rev_user_text, user_real_name |
64 | 58 | ORDER BY timestamp DESC"; |
65 | | - |
| 59 | + |
66 | 60 | $results = $db->query ($sql, __METHOD__); |
67 | 61 | while ($line = $db->fetchObject ($results)) { |
68 | 62 | $contribs[] = array( |
69 | | - $line->rev_user, |
70 | | - $line->rev_user_text, |
| 63 | + $line->rev_user, |
| 64 | + $line->rev_user_text, |
71 | 65 | $line->user_real_name |
72 | 66 | ); |
73 | 67 | } |
74 | 68 | |
75 | 69 | $db->freeResult ($results); |
76 | | - |
77 | | - |
| 70 | + |
| 71 | + |
78 | 72 | // return if there are no authors |
79 | 73 | if (sizeof ($results) <= 0) |
80 | 74 | return true; |
81 | | - |
| 75 | + |
82 | 76 | // now build a sensible authors display in HTML |
83 | 77 | require_once ("includes/Credits.php"); |
84 | 78 | $authors = "\n<div class='authors'>". |
— | — | @@ -88,10 +82,10 @@ |
89 | 83 | $id = $author[0]; |
90 | 84 | $username = $author[1]; |
91 | 85 | $realname = $author[2]; |
92 | | - |
| 86 | + |
93 | 87 | if ($id != "0") { // user with an id |
94 | 88 | $author_link = $realname |
95 | | - ? creditLink($username, $realname) |
| 89 | + ? creditLink($username, $realname) |
96 | 90 | : creditLink($username); |
97 | 91 | $authors .= "<li>$author_link</li>"; |
98 | 92 | } else { // anonymous |
— | — | @@ -102,8 +96,7 @@ |
103 | 97 | if ($anons > 0) |
104 | 98 | $authors .= "<li>" . wfMsg('authors_anonymous') . "</li>"; |
105 | 99 | $authors .= "</ul></div>"; |
106 | | - |
| 100 | + |
107 | 101 | $text .= $authors; |
108 | 102 | return true; |
109 | 103 | } |
110 | | - |
Property changes on: trunk/extensions/uniwiki/Authors/Authors.php |
___________________________________________________________________ |
Added: svn:eol-style |
111 | 104 | + native |
Index: trunk/extensions/uniwiki/Javascript/uniwiki.js |
— | — | @@ -2,11 +2,10 @@ |
3 | 3 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Javascript |
4 | 4 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
5 | 5 | |
6 | | - |
7 | 6 | // global uniwiki stuff |
8 | 7 | var Uniwiki = { |
9 | 8 | i18n: { |
10 | | - |
| 9 | + |
11 | 10 | /* other extensions should use this function |
12 | 11 | * to make their i18n strings accessible to JS */ |
13 | 12 | add: function(obj) { |
— | — | @@ -22,4 +21,3 @@ |
23 | 22 | function wfMsg (key) { |
24 | 23 | return Uniwiki.i18n[key]; |
25 | 24 | } |
26 | | - |
Property changes on: trunk/extensions/uniwiki/Javascript/uniwiki.js |
___________________________________________________________________ |
Added: svn:eol-style |
27 | 25 | + native |
Index: trunk/extensions/uniwiki/Javascript/Javascript.php |
— | — | @@ -6,14 +6,12 @@ |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | $wgExtensionCredits['other'][] = array( |
12 | 11 | 'name' => "Uniwiki Javascript", |
13 | 12 | 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)", |
14 | 13 | '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" |
15 | 14 | ); |
16 | 15 | |
17 | | - |
18 | 16 | $wgHooks['BeforePageDisplay'][] = "UW_Javascript_addJS"; |
19 | 17 | function UW_Javascript_addJS($out) { |
20 | 18 | global $wgScriptPath; |
— | — | @@ -21,4 +19,3 @@ |
22 | 20 | $out->addScript ("<script type='text/javascript' src='$src'></script>"); |
23 | 21 | return true; |
24 | 22 | } |
25 | | - |
Property changes on: trunk/extensions/uniwiki/Javascript/Javascript.php |
___________________________________________________________________ |
Added: svn:eol-style |
26 | 23 | + native |
Index: trunk/extensions/uniwiki/MooTools12core/MooTools12core.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | $wgExtensionCredits['other'][] = array( |
12 | 11 | 'name' => "MooTools12core", |
13 | 12 | 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)", |
— | — | @@ -21,4 +20,3 @@ |
22 | 21 | $out->addScript("<script type='text/javascript' src='$src'></script>"); |
23 | 22 | return true; |
24 | 23 | } |
25 | | - |
Property changes on: trunk/extensions/uniwiki/MooTools12core/MooTools12core.php |
___________________________________________________________________ |
Added: svn:eol-style |
26 | 24 | + native |
Index: trunk/extensions/uniwiki/MooTools12core/mootools-1.2-core-yc.js |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | //MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2008 Valerio Proietti, <http://mad4milk.net>, MIT Style License. |
3 | | - |
4 | 3 | 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; |
5 | 4 | 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; |
6 | 5 | 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 |
7 | 6 | + native |
Index: trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | 11 | |
13 | 12 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -15,7 +14,6 @@ |
16 | 15 | 'description' => "Adds a category box to the top right of articles" |
17 | 16 | ); |
18 | 17 | |
19 | | - |
20 | 18 | /* ---- HOOKS ---- */ |
21 | 19 | |
22 | 20 | $wgHooks['BeforePageDisplay'][] = "UW_CatBoxAtTop_CSS"; |
— | — | @@ -27,23 +25,24 @@ |
28 | 26 | } |
29 | 27 | |
30 | 28 | $wgHooks['OutputPageBeforeHTML'][] = "UW_CatBoxAtTop_Rejig"; |
31 | | -function UW_CatBoxAtTop_Rejig (&$out, &$text) { |
| 29 | +function UW_CatBoxAtTop_Rejig (&$out, &$text) { |
32 | 30 | global $wgVersion; |
33 | 31 | |
34 | | - // no categories = no box |
| 32 | + // no categories = no box |
35 | 33 | if (!$out->mCategoryLinks) |
36 | 34 | 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, |
39 | 37 | * to be dropped into the top right via CSS */ |
40 | 38 | $catbox = "<div id=\"catbox\"><div>\n"; |
41 | 39 | $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 | + |
48 | 47 | foreach ($catlinks as $cat) |
49 | 48 | $catbox .= "<li>$cat</li>\n"; |
50 | 49 | $catbox .= "</ul></div></div>\n"; |
— | — | @@ -51,4 +50,3 @@ |
52 | 51 | $text = $catbox.$text; |
53 | 52 | return true; |
54 | 53 | } |
55 | | - |
Property changes on: trunk/extensions/uniwiki/CatBoxAtTop/CatBoxAtTop.php |
___________________________________________________________________ |
Added: svn:eol-style |
56 | 54 | + native |
Index: trunk/extensions/uniwiki/CatBoxAtTop/style.css |
— | — | @@ -2,7 +2,6 @@ |
3 | 3 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Category_Box_at_Top |
4 | 4 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
5 | 5 | |
6 | | - |
7 | 6 | /* hide the table of contents |
8 | 7 | * THIS IS A TEMPORARY HACK! */ |
9 | 8 | #bodyContent #toc { |
— | — | @@ -19,34 +18,33 @@ |
20 | 19 | border-left: 1em solid #fff; |
21 | 20 | } |
22 | 21 | |
23 | | - #catbox div { |
24 | | - border: 1px solid #aaa; |
25 | | - background: #fff; |
26 | | - } |
| 22 | +#catbox div { |
| 23 | + border: 1px solid #aaa; |
| 24 | + background: #fff; |
| 25 | +} |
27 | 26 | |
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 | +} |
40 | 34 | |
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 | +} |
47 | 39 | |
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 | +} |
53 | 46 | |
| 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 |
54 | 52 | + native |
Index: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.i18n.php |
— | — | @@ -6,7 +6,6 @@ |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | $wgAutoCreateCategoryPagesMessages = array(); |
12 | 11 | $wgAutoCreateCategoryPagesMessages['en'] = array( |
13 | 12 | '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 @@ |
28 | 27 | '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.", |
29 | 28 | 'accp_createdby' => "Gerada automaticamente pela extensão AutoCreateCategoryPag." |
30 | 29 | ); |
31 | | - |
Property changes on: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
32 | 30 | + native |
Index: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.php |
— | — | @@ -2,20 +2,17 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_Auto_Create_Category_Pages |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined('MEDIAWIKI')) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | | - |
13 | 11 | $wgExtensionCredits['other'][] = array( |
14 | 12 | 'name' => "AutoCreateCategoryPages", |
15 | 13 | 'author' => "Merrick Schaefer, Mark Johnston, Evan Wheeler and Adam Mckaig (at UNICEF)", |
16 | 14 | 'description' => "Create stub Category pages automatically" |
17 | 15 | ); |
18 | 16 | |
19 | | - |
20 | 17 | /* ---- INTERNATIONALIZATION ---- */ |
21 | 18 | |
22 | 19 | require_once ("AutoCreateCategoryPages.i18n.php"); |
— | — | @@ -28,51 +25,49 @@ |
29 | 26 | $wgMessageCache->addMessages ($messages, $lang); |
30 | 27 | } |
31 | 28 | |
32 | | - |
33 | 29 | /* ---- HOOKS ---- */ |
34 | | - |
35 | 30 | $wgHooks['ArticleSaveComplete'][] = "UW_AutoCreateCategoryPages_Save"; |
36 | 31 | function UW_AutoCreateCategoryPages_Save (&$article, &$user, &$text, &$summary, &$minoredit, |
37 | | - &$watchthis, &$sectionanchor, &$flags, $revision) { |
| 32 | + &$watchthis, &$sectionanchor, &$flags, $revision) { |
38 | 33 | global $wgDBprefix; |
39 | | - |
| 34 | + |
40 | 35 | /* after the page is saved, get all the categories |
41 | 36 | * and see if they exists as "proper" pages; if not |
42 | 37 | * then create a simple page for them automatically */ |
43 | | - |
| 38 | + |
44 | 39 | // extract the categories on this page |
45 | 40 | $regex = "/\[\[category:(.+?)(?:\|.*)?\]\]/i"; |
46 | 41 | preg_match_all ($regex, $text, $matches); |
47 | | - |
| 42 | + |
48 | 43 | // array of the categories on the page (in db form) |
49 | 44 | $on_page = array(); |
50 | 45 | foreach ($matches[1] as $cat) |
51 | 46 | $on_page[] = Title::newFromText ($cat)->getDBkey(); |
52 | | - |
| 47 | + |
53 | 48 | // array of the categories in the db |
54 | 49 | $db = wfGetDB (DB_MASTER); |
55 | 50 | $results = $db->resultObject ($db->query( |
56 | 51 | "select distinct page_title from {$wgDBprefix}page " . |
57 | 52 | "where page_namespace = '".NS_CATEGORY."'")); |
58 | | - |
| 53 | + |
59 | 54 | $in_db = array(); |
60 | 55 | while ($r = $results->next()) |
61 | 56 | $in_db[] = $r->page_title; |
62 | | - |
| 57 | + |
63 | 58 | /* loop through the categories in the page and |
64 | 59 | * see if they already exist as a category page */ |
65 | 60 | foreach ($on_page as $db_key) { |
66 | 61 | if (!in_array( $db_key, $in_db)) { |
67 | | - |
| 62 | + |
68 | 63 | // if it doesn't exist, then create it here |
69 | 64 | $page_title = Title::newFromDBkey ($db_key)->getText(); |
70 | 65 | $stub = wfMsg ("accp_stub", $page_title); |
71 | 66 | $summary = wfMsg ("accp_createdby"); |
72 | 67 | $article = new Article (Title::newFromDBkey("Category:$db_key")); |
73 | | - |
| 68 | + |
74 | 69 | try { |
75 | 70 | $article->doEdit ($stub, $summary, EDIT_NEW & EDIT_SUPPRESS_RC); |
76 | | - |
| 71 | + |
77 | 72 | } catch (MWException $e) { |
78 | 73 | /* fail silently... |
79 | 74 | * todo: what can go wrong here? */ |
— | — | @@ -82,4 +77,3 @@ |
83 | 78 | |
84 | 79 | return true; |
85 | 80 | } |
86 | | - |
Property changes on: trunk/extensions/uniwiki/AutoCreateCategoryPages/AutoCreateCategoryPages.php |
___________________________________________________________________ |
Added: svn:eol-style |
87 | 81 | + native |
Index: trunk/extensions/uniwiki/.uniwiki.settings |
— | — | @@ -13,4 +13,3 @@ |
14 | 14 | require_once(\"\$uw/Authors/Authors.php\"); |
15 | 15 | require_once(\"\$uw/CustomToolbar/CustomToolbar.php\"); |
16 | 16 | require_once(\"\$uw/CreatePage/CreatePage.php\"); |
17 | | - |
Property changes on: trunk/extensions/uniwiki/.uniwiki.settings |
___________________________________________________________________ |
Added: svn:eol-style |
18 | 17 | + native |
Index: trunk/extensions/uniwiki/CssHooks/CssHooks.php |
— | — | @@ -2,11 +2,10 @@ |
3 | 3 | /* vim: noet ts=4 sw=4 |
4 | 4 | * http://www.mediawiki.org/wiki/Extension:Uniwiki_CSS_Hooks |
5 | 5 | * http://www.gnu.org/licenses/gpl-3.0.txt */ |
6 | | - |
| 6 | + |
7 | 7 | if (!defined("MEDIAWIKI")) |
8 | 8 | die(); |
9 | 9 | |
10 | | - |
11 | 10 | /* ---- CREDITS ---- */ |
12 | 11 | |
13 | 12 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -15,7 +14,6 @@ |
16 | 15 | 'description' => "Add some CSS hooks to the HTML output of articles, for better styling" |
17 | 16 | ); |
18 | 17 | |
19 | | - |
20 | 18 | /* ---- HOOKS ---- */ |
21 | 19 | |
22 | 20 | $wgHooks['OutputPageBeforeHTML'][] = 'UW_CssHooks_AddHooks'; |
— | — | @@ -24,7 +22,7 @@ |
25 | 23 | |
26 | 24 | // break the page into sections via their <h2>s |
27 | 25 | $sections = preg_split ("/(<a name=\".+?\"><\/a><h2>.+?<\/h2>)/", |
28 | | - $text, -1, PREG_SPLIT_DELIM_CAPTURE); |
| 26 | + $text, -1, PREG_SPLIT_DELIM_CAPTURE); |
29 | 27 | |
30 | 28 | // remove the first empty section |
31 | 29 | if ($sections[0] == "") |
— | — | @@ -34,7 +32,7 @@ |
35 | 33 | $output = ''; |
36 | 34 | $div_open = false; |
37 | 35 | for ($i=0; $i<count ($sections); $i++) { |
38 | | - |
| 36 | + |
39 | 37 | /* is this block of text a header? (check for mw-headline |
40 | 38 | * to only include actual section headers, and dodge toc) */ |
41 | 39 | if (substr ($sections[$i], 0, 7) == "<a name") { |
— | — | @@ -48,7 +46,7 @@ |
49 | 47 | $div_open = true; |
50 | 48 | } |
51 | 49 | } |
52 | | - |
| 50 | + |
53 | 51 | // re-add the original text |
54 | 52 | $output .= $sections[$i]; |
55 | 53 | |
— | — | @@ -56,8 +54,7 @@ |
57 | 55 | if (($i==count ($sections)-1) && $div_open) |
58 | 56 | $output .= "</div>"; |
59 | 57 | } |
60 | | - |
| 58 | + |
61 | 59 | $text = $output; |
62 | 60 | return true; |
63 | 61 | } |
64 | | - |
Property changes on: trunk/extensions/uniwiki/CssHooks/CssHooks.php |
___________________________________________________________________ |
Added: svn:eol-style |
65 | 62 | + native |
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.i18n.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | |
29 | 29 | 'ct_image_tip' => "Insert an image", |
30 | 30 | 'ct_image_caption' => "Add Image", |
31 | | - |
| 31 | + |
32 | 32 | 'ct_attachment_tip' => "Insert an attachment", |
33 | 33 | 'ct_attachment_caption' => "Add Attachment", |
34 | 34 | |
— | — | @@ -35,12 +35,12 @@ |
36 | 36 | 'ct_math_tip_ins' => "Insert mathematical formula (LaTeX)", |
37 | 37 | 'ct_math_tip_wrap' => "Make this text a mathematical formula (LaTeX)", |
38 | 38 | 'ct_math_caption' => "Formula", |
39 | | - |
| 39 | + |
40 | 40 | 'ct_nowiki_sample' => "Insert non-formatted text here", |
41 | 41 | 'ct_nowiki_tip_ins' => "Ignore wiki formatting", |
42 | 42 | 'ct_nowiki_tip_wrap' => "Ignore wiki formattting for this text", |
43 | 43 | 'ct_nowiki_caption' => "No Wiki", |
44 | | - |
| 44 | + |
45 | 45 | 'ct_horizontal_tip' => "Insert a horizontal line (use sparingly)", |
46 | 46 | 'ct_horizontal_caption' => "Horizontal Line", |
47 | 47 | |
— | — | @@ -53,60 +53,60 @@ |
54 | 54 | 'ct_success' => "File upload successful!", |
55 | 55 | 'ct_popupblocked' => "The upload popup was prevented from opening. Please check your popup blocker.", |
56 | 56 | |
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" |
61 | 61 | ); |
62 | 62 | |
63 | 63 | $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", |
68 | 68 | |
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", |
73 | 73 | |
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", |
78 | 78 | |
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", |
83 | 83 | |
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", |
89 | 86 | |
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", |
102 | 89 | |
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." |
111 | 111 | ); |
112 | 112 | |
113 | 113 | $wgCustomToolbarMessages['de'] = array( |
— | — | @@ -132,7 +132,7 @@ |
133 | 133 | |
134 | 134 | 'ct_image_tip' => "Ein Bild einfügen", |
135 | 135 | 'ct_image_caption' => "Bild einfügen", |
136 | | - |
| 136 | + |
137 | 137 | 'ct_attachment_tip' => "Eine Anlage einfuegen", |
138 | 138 | 'ct_attachment_caption' => "Eine Anlage anfuegen", |
139 | 139 | |
— | — | @@ -140,12 +140,12 @@ |
141 | 141 | 'ct_math_tip_ins' => "Hier mathematische Formel einfügen (LaTeX)", |
142 | 142 | 'ct_math_tip_wrap' => "Diesen Text in eine mathematische Formel umwandeln (LaTeX)", |
143 | 143 | 'ct_math_caption' => "Formel", |
144 | | - |
| 144 | + |
145 | 145 | 'ct_nowiki_sample' => "Hier unformatierten Text eingeben", |
146 | 146 | 'ct_nowiki_tip_ins' => "Ignoriere wiki Formatierung", |
147 | 147 | 'ct_nowiki_tip_wrap' => "Ignoriere wiki Formatierung für diesen Text", |
148 | 148 | 'ct_nowiki_caption' => "Keine Wiki", |
149 | | - |
| 149 | + |
150 | 150 | 'ct_horizontal_tip' => "Eine waagrechte Linie einfügen (nicht alzu oft verwenden)", |
151 | 151 | 'ct_horizontal_caption' => "Waagrechte Linie", |
152 | 152 | |
— | — | @@ -158,59 +158,58 @@ |
159 | 159 | 'ct_success' => "Datei erfolgreich hochgeladen!", |
160 | 160 | 'ct_popupblocked' => "Das Hochladen-Popup wurde am Öffnen gehindert. Bitte überprüfe Deinen Popup-Blocker.", |
161 | 161 | |
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" |
166 | 166 | ); |
167 | 167 | |
168 | 168 | $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", |
173 | 173 | |
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", |
178 | 178 | |
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", |
183 | 183 | |
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", |
188 | 188 | |
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", |
194 | 191 | |
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", |
207 | 194 | |
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", |
217 | 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", |
| 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 |
218 | 217 | + native |
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.php |
— | — | @@ -1,22 +1,22 @@ |
2 | 2 | <?php |
3 | 3 | # Copyright (C) 2008 Mark Johnston and Adam Mckaig |
4 | | -# |
| 4 | +# |
5 | 5 | # This program is free software; you can redistribute it and/or modify |
6 | 6 | # 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 |
8 | 8 | # (at your option) any later version. |
9 | | -# |
| 9 | +# |
10 | 10 | # This program is distributed in the hope that it will be useful, |
11 | 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | 13 | # GNU General Public License for more details. |
14 | | -# |
| 14 | +# |
15 | 15 | # You should have received a copy of the GNU General Public License along |
16 | 16 | # with this program; if not, write to the Free Software Foundation, Inc., |
17 | 17 | # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | # |
19 | 19 | # http://www.gnu.org/licenses/gpl-3.0.html |
20 | | - |
| 20 | + |
21 | 21 | if (!defined('MEDIAWIKI')) |
22 | 22 | die(); |
23 | 23 | |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | $out->addScript("<script type='text/javascript' src='$path/CustomToolbar.js'></script>\n"); |
90 | 90 | $out->addScript("<style type='text/css'>@import '$path/style.css';</style>\n"); |
91 | 91 | return true; |
92 | | - |
| 92 | + |
93 | 93 | } |
94 | 94 | |
95 | 95 | $wgExtensionFunctions[] = 'wfCustomToolbarUploadForm'; |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | require_once('includes/SpecialUpload.php'); |
116 | 116 | } |
117 | 117 | 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> |
119 | 119 | * UploadPopup extension |
120 | 120 | */ |
121 | 121 | var $mType, $mSection, $mCaption; |
— | — | @@ -125,14 +125,14 @@ |
126 | 126 | $this->mSection = $request->getVal('section'); |
127 | 127 | UploadForm::UploadForm(&$request); |
128 | 128 | } |
129 | | - |
| 129 | + |
130 | 130 | function execute() { |
131 | 131 | // override MW's UploadForm with only the bits we want |
132 | 132 | global $wgOut, $wgStylePath; |
133 | 133 | $wgOut->setArticleBodyOnly(true); |
134 | | - $wgOut->addHTML(" |
| 134 | + $wgOut->addHTML(" |
135 | 135 | <html> |
136 | | - <head> |
| 136 | + <head> |
137 | 137 | <title>". wfMsg('ct_upload', $this->mType) . " </title> |
138 | 138 | </head> |
139 | 139 | <body>"); |
— | — | @@ -142,7 +142,7 @@ |
143 | 143 | </body> |
144 | 144 | </html>"); |
145 | 145 | } |
146 | | - |
| 146 | + |
147 | 147 | function mainUploadForm( $msg = '') { |
148 | 148 | global $wgOut, $wgScriptPath, $wgStylePath; |
149 | 149 | if ( '' != $msg ) { |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | $action = $titleObj->escapeLocalURL(); |
166 | 166 | |
167 | 167 | $encDestFile = htmlspecialchars( $this->mDestFile ); |
168 | | - |
| 168 | + |
169 | 169 | $icon_path = "{$wgScriptPath}/extensions/uniwiki/CustomToolbar/images/numbers/"; |
170 | 170 | /* The following form contains a strange hack for passing the section index id |
171 | 171 | * through the upload function so we know where to insert the file tag. |
— | — | @@ -180,7 +180,7 @@ |
181 | 181 | <td align='left'><img src='{$icon_path}1.png' alt='1.' /> |
182 | 182 | <label for='wpUploadFile'>{$source_filename}:</label></td> |
183 | 183 | <td align='left'> |
184 | | - <input type='file' name='wpUploadFile' id='wpUploadFile' " |
| 184 | + <input type='file' name='wpUploadFile' id='wpUploadFile' " |
185 | 185 | . ($this->mDestFile?"":"onchange=\"opener.Uniwiki.CustomToolbar.fillDestFilename(document.getElementById('wpUploadFile').value, document.getElementById('wpDestFile') )\" ") . "size='40' /> |
186 | 186 | </td> |
187 | 187 | </tr> |
— | — | @@ -207,10 +207,10 @@ |
208 | 208 | </form> |
209 | 209 | "); |
210 | 210 | } |
211 | | - |
| 211 | + |
212 | 212 | function showSuccess(&$file) { |
213 | 213 | global $wgOut, $ct_uploadable_images, $ct_uploadable_attachments; |
214 | | - |
| 214 | + |
215 | 215 | //styles copied from monobook/main.css |
216 | 216 | //modified to not float the whole preview to the right |
217 | 217 | $wgOut->addHTML(" |
— | — | @@ -265,9 +265,9 @@ |
266 | 266 | } |
267 | 267 | </style> |
268 | 268 | "); |
269 | | - $wgOut->redirect(''); |
| 269 | + $wgOut->redirect(''); |
270 | 270 | $wgOut->addHTML("<h2>" . wfMsg('ct_success') . "</h2>"); |
271 | | - |
| 271 | + |
272 | 272 | //make wiki markup for the file |
273 | 273 | $ext = explode('.', $file->mDestName ); |
274 | 274 | $extension = $ext[count( $ext ) - 1]; |
— | — | @@ -277,7 +277,7 @@ |
278 | 278 | elseif (in_array($extension, $ct_uploadable_attachments )){ |
279 | 279 | $file_link = '[[' . 'Media:' . $file->mDestName . '|' . $file->mCaption . ']]'; |
280 | 280 | } |
281 | | - |
| 281 | + |
282 | 282 | $titleObj = Title::makeTitle( NS_SPECIAL, 'CustomToolbarUpload' ); |
283 | 283 | //insert the wiki markup in the appropriate section |
284 | 284 | //or the classic-mode textarea if we are in classic-mode |
— | — | @@ -294,7 +294,7 @@ |
295 | 295 | {$insertion}; |
296 | 296 | </script> |
297 | 297 | "); |
298 | | - |
| 298 | + |
299 | 299 | //show a thumbnail of the image as it will appear on the page |
300 | 300 | $wgOut->addWikiText($file_link); |
301 | 301 | $wgOut->addHTML(" |
— | — | @@ -302,14 +302,14 @@ |
303 | 303 | </div> |
304 | 304 | "); |
305 | 305 | /* 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 |
307 | 307 | * page and insert the markup, we dump this output and kill the process |
308 | 308 | * to avoid redirection to the file's page. |
309 | 309 | */ |
310 | 310 | print($wgOut->output()); |
311 | 311 | exit; |
312 | 312 | } |
313 | | - |
| 313 | + |
314 | 314 | //XX TODO make a prettier error page |
315 | 315 | //function showError() { |
316 | 316 | //} |
Property changes on: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.php |
___________________________________________________________________ |
Added: svn:eol-style |
317 | 317 | + native |
Index: trunk/extensions/uniwiki/CustomToolbar/style.css |
— | — | @@ -1,56 +1,55 @@ |
2 | 2 | .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; |
8 | 8 | } |
9 | 9 | |
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; |
15 | 15 | 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; |
18 | 18 | width: 100%; |
19 | | - } |
| 19 | +} |
20 | 20 | |
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 | +} |
30 | 30 | |
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 | +} |
37 | 37 | |
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"); } |
48 | 48 | |
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 | + |
55 | 55 | .edit-generic .editor-wrap { display: none; } |
56 | 56 | .edit-generic .generic-editor .editor-wrap { display: block; } |
57 | | - |
Property changes on: trunk/extensions/uniwiki/CustomToolbar/style.css |
___________________________________________________________________ |
Added: svn:eol-style |
58 | 57 | + native |
Index: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.js |
— | — | @@ -1,5 +1,5 @@ |
2 | 2 | Uniwiki.CustomToolbar = { |
3 | | - |
| 3 | + |
4 | 4 | /* other plugins may add more buttons here, |
5 | 5 | * which will automatically be included */ |
6 | 6 | Buttons: { |
— | — | @@ -46,9 +46,9 @@ |
47 | 47 | * where to add the image back into the page |
48 | 48 | * (the name of the textarea will always match |
49 | 49 | * 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 | + |
53 | 53 | /* open the upload form in a popup window |
54 | 54 | * (this shold be moved to an iframe) */ |
55 | 55 | popup = open( |
— | — | @@ -74,9 +74,9 @@ |
75 | 75 | * where to add the image back into the page |
76 | 76 | * (the name of the textarea will always match |
77 | 77 | * 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 | + |
81 | 81 | /* open the upload form in a popup window |
82 | 82 | * (this shold be moved to an iframe) */ |
83 | 83 | popup = open( |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | 'key': "n", |
114 | 114 | 'open': "<nowiki>", |
115 | 115 | 'close': "</nowiki>", |
116 | | - 'sample': wfMsg('ct_nowiki_sample'), |
| 116 | + 'sample': wfMsg('ct_nowiki_sample'), |
117 | 117 | 'tip': [wfMsg('ct_nowiki_tip_ins'), wfMsg('ct_nowiki_tip_wrap')], |
118 | 118 | 'caption': wfMsg('ct_nowiki_caption'), |
119 | 119 | 'advanced': true |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | 'key': "-", |
123 | 123 | 'open': "\n----\n", |
124 | 124 | 'close': "", |
125 | | - 'sample': "", |
| 125 | + 'sample': "", |
126 | 126 | 'tip': wfMsg('ct_horizontal_tip'), |
127 | 127 | 'caption': wfMsg('ct_horizontal_caption'), |
128 | 128 | 'advanced': true |
— | — | @@ -141,7 +141,7 @@ |
142 | 142 | elements.each (function (txta) { |
143 | 143 | var wrapper = new Element ("div", { 'class': "editor-wrap" }); |
144 | 144 | var toolbar = new Element ("div", { 'class': "toolbar" }); |
145 | | - |
| 145 | + |
146 | 146 | // create and append the buttons |
147 | 147 | buttons.each (function (button,name) { |
148 | 148 | |
— | — | @@ -191,17 +191,17 @@ |
192 | 192 | }); |
193 | 193 | } else if(button.tip) |
194 | 194 | div.title = button.tip + suffix; |
195 | | - |
| 195 | + |
196 | 196 | /* if this button has a hotkey, then store it in the div, |
197 | 197 | * so we can iterate them later on, in txta.keypress */ |
198 | 198 | if (button.key) div.store('key', button.key); |
199 | 199 | } |
200 | 200 | }); |
201 | | - |
| 201 | + |
202 | 202 | wrapper.inject(txta, "before"); |
203 | 203 | toolbar.inject(wrapper); |
204 | 204 | txta.inject(wrapper); |
205 | | - |
| 205 | + |
206 | 206 | /* when a key is pressed, check the hotkeys of |
207 | 207 | * each button, and trigger one if relevent |
208 | 208 | * (eg, ctrl+b = bold) */ |
— | — | @@ -268,4 +268,3 @@ |
269 | 269 | Uniwiki.CustomToolbar.attach($$(".generic-editor textarea.editor")); |
270 | 270 | Uniwiki.CustomToolbar.attach($$("#wpTextbox1"), true); |
271 | 271 | }); |
272 | | - |
Property changes on: trunk/extensions/uniwiki/CustomToolbar/CustomToolbar.js |
___________________________________________________________________ |
Added: svn:eol-style |
273 | 272 | + native |
Index: trunk/extensions/uniwiki/CustomToolbar/Element.Forms.js |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | */ |
9 | 9 | Element.implement({ |
10 | 10 | tidy: function(){ |
11 | | - try { |
| 11 | + try { |
12 | 12 | this.set('value', this.get('value').tidy()); |
13 | 13 | }catch(e){dbug.log('element.tidy error: %o', e);} |
14 | 14 | }, |
— | — | @@ -97,15 +97,14 @@ |
98 | 98 | var selStart = start + options.before.length; |
99 | 99 | if($pick(select, true)) this.selectRange(selStart, selStart + text.length); |
100 | 100 | else this.setCaretPosition(selStart + text.length); |
101 | | - } |
| 101 | + } |
102 | 102 | return this; |
103 | 103 | } |
104 | 104 | }); |
105 | 105 | |
106 | | - |
107 | 106 | Element.Properties.inputValue = { |
108 | | - |
109 | | - get: function(){ |
| 107 | + |
| 108 | + get: function(){ |
110 | 109 | switch(this.get('tag')) { |
111 | 110 | case 'select': |
112 | 111 | vals = this.getSelected().map(function(op){ return $pick(op.get('value'),op.get('text')) }); |
— | — | @@ -116,9 +115,9 @@ |
117 | 116 | default: |
118 | 117 | return this.get('value'); |
119 | 118 | } |
120 | | - }, |
121 | | - |
122 | | - set: function(value){ |
| 119 | + }, |
| 120 | + |
| 121 | + set: function(value){ |
123 | 122 | switch(this.get('tag')){ |
124 | 123 | case 'select': |
125 | 124 | this.getElements('option').each(function(op){ |
— | — | @@ -134,8 +133,8 @@ |
135 | 134 | this.set('value', value); |
136 | 135 | } |
137 | 136 | return this; |
138 | | - }, |
139 | | - |
| 137 | + }, |
| 138 | + |
140 | 139 | erase: function() { |
141 | 140 | switch(this.get('tag')) { |
142 | 141 | case 'select': |
— | — | @@ -153,5 +152,4 @@ |
154 | 153 | } |
155 | 154 | return this; |
156 | 155 | } |
157 | | - |
158 | 156 | }; |
Property changes on: trunk/extensions/uniwiki/CustomToolbar/Element.Forms.js |
___________________________________________________________________ |
Added: svn:eol-style |
159 | 157 | + native |
Index: trunk/extensions/uniwiki/FormatSearch/FormatSearch.php |
— | — | @@ -5,7 +5,6 @@ |
6 | 6 | if (!defined("MEDIAWIKI")) |
7 | 7 | die(); |
8 | 8 | |
9 | | - |
10 | 9 | /* ---- CREDITS ---- */ |
11 | 10 | |
12 | 11 | $wgExtensionCredits['other'][] = array( |
— | — | @@ -14,7 +13,6 @@ |
15 | 14 | 'description' => "Minor changes to clean up the search results page" |
16 | 15 | ); |
17 | 16 | |
18 | | - |
19 | 17 | /* ---- HOOKS ---- */ |
20 | 18 | |
21 | 19 | $wgHooks['BeforePageDisplay'][] = "UW_FormatSearch_CSS"; |
Property changes on: trunk/extensions/uniwiki/FormatSearch/FormatSearch.php |
___________________________________________________________________ |
Added: svn:eol-style |
22 | 20 | + native |
Index: trunk/extensions/uniwiki/FormatSearch/style.css |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | |
5 | 5 | /* hide the extra search result data */ |
6 | 6 | .mw-search-result-data { |
7 | | - display: none; |
| 7 | + display: none; |
8 | 8 | } |
9 | 9 | |
10 | 10 | /* hide the advanced search form */ |
Property changes on: trunk/extensions/uniwiki/FormatSearch/style.css |
___________________________________________________________________ |
Added: svn:eol-style |
11 | 11 | + native |