r70378 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70377‎ | r70378 | r70379 >
Date:04:57, 3 August 2010
Author:werdna
Status:deferred
Tags:
Comment:
Update LiquidThreads alpha to trunk state, with r70100 and r70106 unmerged due to external change dependencies and review status.
Modified paths:
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes/NewMessagesController.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/compat/Lqt-compat.i18n.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/i18n/Lqt.i18n.php (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/lqt.css (modified) (history)
  • /branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/lqt.js (modified) (history)

Diff [purge]

Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/i18n/Lqt.i18n.php
@@ -81,9 +81,8 @@
8282 'lqt_protectedfromreply_link' => 'protected',
8383 'lqt_subject' => 'Subject:',
8484 'lqt_noreason' => 'No reason given.',
85 - 'lqt_move_placeholder' => 'This thread is a placeholder indicating that a thread, $1, was moved from this page.
86 -This move was made by $2 on $3 at $4.
87 -The thread is now located at $5.',
 85+ 'lqt_move_placeholder' => 'A thread, $1, was moved from here to $5.
 86+This move was made by $2 on $3 at $4.',
8887 'lqt_thread_deleted_for_sysops' => 'This thread has been \'\'\'deleted\'\'\' and is only visible to administrators.',
8988 'lqt_thread_deleted' => 'This thread has been deleted.',
9089 'lqt_summary_notice' => 'There have been no changes to this discussion for at least $2 {{PLURAL:$2|day|days}}.
@@ -229,8 +228,11 @@
230229 This is a notification from {{SITENAME}} that a new reply to '$2' on $5,
231230 was created on $3 at $4.
232231
233 -You can see it at <$6>",
 232+You can see it at <$6>
234233
 234+The text of the reply is:
 235+$7",
 236+
235237 // Quoting functionality
236238 'lqt-quote-intro' => 'On $2 at $3, [[User:$1|$1]] wrote:',
237239 'lqt-quote' => 'Quote',
@@ -3134,6 +3136,7 @@
31353137 'lqt-drag-setsortkey' => 'Změna pozice příspěvku na stránce',
31363138 'lqt-drag-bump' => 'Přesunutí příspěvku navrch diskusní stránky',
31373139 'lqt-drag-save' => 'Potvrdit',
 3140+ 'lqt-drag-title' => 'Potvrdit přetažení',
31383141 'lqt-drag-reason' => 'Důvod:',
31393142 'lqt-drag-subject' => 'Předmět nového vlákna:',
31403143 'lqt-edit-signature' => '(upravit podpis)',
@@ -6599,6 +6602,7 @@
66006603 'lqt-drag-setsortkey' => 'Dr Platz vum Byytrag uf dr Syte aapasse',
66016604 'lqt-drag-bump' => 'Byytrag an dr Aafang vu dr Diskussionssyte setze',
66026605 'lqt-drag-save' => 'Bstetige',
 6606+ 'lqt-drag-title' => 'Zie bstetige',
66036607 'lqt-drag-reason' => 'Grund:',
66046608 'lqt-drag-subject' => 'Thema vum neje Diskussionsstrang:',
66056609 'lqt-edit-signature' => '(Unterschrift bearbeite)',
@@ -6939,6 +6943,7 @@
69406944 'lqt-drag-setsortkey' => 'הגדרת מיקום ההודעה בדף',
69416945 'lqt-drag-bump' => 'העברה לראש דף הדיון',
69426946 'lqt-drag-save' => 'אישור',
 6947+ 'lqt-drag-title' => 'אישור גרירה',
69436948 'lqt-drag-reason' => 'סיבה:',
69446949 'lqt-drag-subject' => 'כותרת לשרשור חדש:',
69456950 'lqt-edit-signature' => '(עריכת החתימה)',
@@ -8186,6 +8191,7 @@
81878192 'lqt-drag-setsortkey' => 'Sesuaikan posisi kiriman pada halaman',
81888193 'lqt-drag-bump' => 'Pindahkan kiriman ke atas halaman diskusi',
81898194 'lqt-drag-save' => 'Konfirmasikan',
 8195+ 'lqt-drag-title' => 'Konfirmasi pemindahan',
81908196 'lqt-drag-reason' => 'Alasan:',
81918197 'lqt-drag-subject' => 'Subjek utas baru:',
81928198 'lqt-edit-signature' => '(sunting tanda tangan)',
@@ -8225,7 +8231,7 @@
82268232 'lqt_youhavenewmessages' => 'I nwere [[$1|ozi ohúrù]].',
82278233 'lqt-read-message-tooltip' => 'Wéfu ahiri nka na ozi ohúrù.
82288234 Madu nwere I ki hü ya na ihü akíkó nke sinambu.',
8229 - 'lqt-menu-trigger' => 'Dikarírí',
 8235+ 'lqt-menu-trigger' => 'Nà nké ozór',
82308236 'lqt-search-button' => 'Chöwá',
82318237 'lqt-save-subject' => 'Donyéré',
82328238 'lqt-cancel-subject-edit' => 'Emekwàlà',
@@ -8851,6 +8857,7 @@
88528858 'lqt-drag-setsortkey' => '投稿のページ上の位置を修正',
88538859 'lqt-drag-bump' => '投稿を議論ページの先頭に移動',
88548860 'lqt-drag-save' => '確定',
 8861+ 'lqt-drag-title' => 'ドラッグを確認',
88558862 'lqt-drag-reason' => '理由:',
88568863 'lqt-drag-subject' => '新しいスレッドの表題:',
88578864 'lqt-edit-signature' => '(署名の編集)',
@@ -9269,8 +9276,8 @@
92709277 * @author Ryuch
92719278 */
92729279 $messages['ko'] = array(
9273 - 'lqt-desc' => '토론 문서에서 스레드를 이용하는 토론을 이용',
9274 - 'lqt_movethread' => '스레드를 다른 페이지로 이동',
 9280+ 'lqt-desc' => '토론 문서의 스레드 토론 확장기능을 추가',
 9281+ 'lqt_movethread' => '스레드를 다른 문서로 이동',
92759282 'lqt_deletethread' => '스레드 삭제/복구',
92769283 'lqt_contents_title' => '목차',
92779284 'lqt_toc_thread_title' => '스레드 제목',
@@ -9279,14 +9286,14 @@
92809287 'lqt_toc_thread_modified' => '마지막으로 수정된 시각',
92819288 'lqt_add_header' => '머리말 추가',
92829289 'lqt_new_thread' => '새 토론 시작하기',
9283 - 'lqt_invalid_subject' => '당신이 입력한 주제가 잘못되었습니다.
9284 -* 주제가 너무 길거나
9285 -* 인터위키나 이름공간 이름의 충돌로 문제가 발생할 수 있습니다.',
 9290+ 'lqt_invalid_subject' => '주제가 잘못되었습니다.
 9291+* 주제가 너무 길거나,
 9292+* 인터위키나 다른 네임스페이스와의 충돌이 발생했을 수 있습니다.',
92869293 'lqt_empty_subject' => '주제를 반드시 입력해야 합니다.',
92879294 'lqt_reply' => '답변',
92889295 'lqt-parent' => '상위 스레드',
92899296 'lqt_delete' => '삭제',
9290 - 'lqt_undelete' => '되살리기',
 9297+ 'lqt_undelete' => '복구',
92919298 'lqt_permalink' => '링크',
92929299 'lqt_fragment' => '$2 문서에서의 $1의 일부',
92939300 'lqt_discussion_link' => '토론',
@@ -9397,7 +9404,7 @@
93989405 'lqt-email-undo' => '취소',
93999406 'lqt-messages-sent' => '당신에게 직접 전달된 메시지:',
94009407 'lqt-other-messages' => '다른 토론 문서의 메시지:',
9401 - 'lqt-no-new-messages' => '당신에게 남겨진 메시지가 없습니다.',
 9408+ 'lqt-no-new-messages' => '새로운 메시지가 없습니다.',
94029409 'lqt-new-messages' => '✒ 당신에게 새 메시지가 도착했습니다.',
94039410 'lqt-email-info-undo' => '당신이 방금 없앤 스레드를 복구합니다.',
94049411 'lqt-date-info' => '당신이 모든 날짜에 대해 스레드를 보고 있기 때문에 이 링크가 비활성화되었습니다.',
@@ -9502,6 +9509,7 @@
95039510 'lqt-drag-setsortkey' => '이 문서에서 글의 위치를 조정하기',
95049511 'lqt-drag-bump' => '토론 문서의 맨 위로 옮기기',
95059512 'lqt-drag-save' => '확인',
 9513+ 'lqt-drag-title' => '드래그 확인',
95069514 'lqt-drag-reason' => '이유:',
95079515 'lqt-drag-subject' => '새 스레드의 주제:',
95089516 'lqt-edit-signature' => '(서명 편집하기)',
@@ -10272,7 +10280,7 @@
1027310281 Наместо ова, можете да $2.',
1027410282 'lqt_header_warning_bold' => 'наслов на страницата за разговор',
1027510283 'lqt_header_warning_new_discussion' => 'започнете нов разговор',
10276 - 'lqt_sorting_order' => 'Редослед на сортирање:',
 10284+ 'lqt_sorting_order' => 'Редослед на подредување:',
1027710285 'lqt_sort_newest_changes' => 'прво најскоро променети',
1027810286 'lqt_sort_newest_threads' => 'прво најнови нишки',
1027910287 'lqt_sort_oldest_threads' => 'прво најстари нишки',
@@ -10348,7 +10356,7 @@
1034910357 'lqt-log-action-merge-across' => 'преместена [[$1]] од под [[$2]]. Сега е под [[$3]].',
1035010358 'lqt-log-action-merge-down' => '[[$1]] ставена (споена) под [[$3]]',
1035110359 'lqt-log-action-subjectedit' => 'изменет насловот на [[$1]] од „$2“ на „$3“',
10352 - 'lqt-log-action-resort' => 'изменет редоследот на сортирање на [[$1]]. Клучот за сортирање изменет од $2 на $3.',
 10360+ 'lqt-log-action-resort' => 'изменет редоследот на подредување на [[$1]]. Клучот за подредување изменет од $2 на $3.',
1035310361 'lqt-preference-notify-talk' => 'Испрати ми е-пошта кога некој ќе одговори на нишка што ја набљудувам',
1035410362 'lqt-preference-watch-threads' => 'Набљудувај ги нишките кои ги создавам или на кои одговарам',
1035510363 'prefs-lqt' => 'Нанижан разговор',
@@ -10508,9 +10516,9 @@
1050910517 'lqt_thread_deleted' => 'ഈ ചരട് ഒഴിവാക്കി.',
1051010518 'lqt_summary_notice' => 'ഈ ചർച്ചയിൽ കഴിഞ്ഞ {{PLURAL:$2|ദിവസം|$2 ദിവസങ്ങളിൽ}} യാതൊരു മാറ്റവും ഉണ്ടായിട്ടില്ല.
1051110519 അത് പരിസമാപ്തിയിലെത്തിയെങ്കിൽ, താങ്കൾക്ക് $1 ഉപയോഗിക്കാവുന്നതാണ്.',
10512 - 'lqt_summary_notice_link' => 'സംഗ്രഹം എഴുതുക',
10513 - 'lqt_summary_label' => 'ചരടിന്റെ സംഗ്രഹം:',
10514 - 'lqt_summary_subtitle' => '"$1" എന്നതിന്റെ സംഗ്രഹം.',
 10520+ 'lqt_summary_notice_link' => 'ചുരുക്കം എഴുതുക',
 10521+ 'lqt_summary_label' => 'ചരടിന്റെ ചുരുക്കം:',
 10522+ 'lqt_summary_subtitle' => '"$1" എന്നതിന്റെ ചുരുക്കം.',
1051510523 'lqt_nosuchrevision' => 'ഈ ചരടിനു അങ്ങനെയൊരു പതിപ്പില്ല.',
1051610524 'lqt_nosuchthread' => 'താങ്കൾ ആവശ്യപ്പെട്ട ചരട് നിലവിലില്ല.',
1051710525 'lqt_nosuchthread_title' => 'അങ്ങനെ ചരടില്ല',
@@ -10580,7 +10588,7 @@
1058110589 'lqt-thread-edited-others' => '{{PLURAL:$2|മറ്റൊരുപയോക്താവ്|മറ്റ് $2 ഉപയോക്താക്കൾ}} തിരുത്തിയിരിക്കുന്നു.<br />
1058210590 അവസാന തിരുത്തൽ: $1',
1058310591 'lqt-header-actions' => 'പ്രവർത്തനങ്ങൾ',
10584 - 'lqt_summarize_link' => 'സംഗ്രഹിക്കുക',
 10592+ 'lqt_summarize_link' => 'ചുരുക്കിക്കുക',
1058510593 'lqt-summarize-intro' => 'ചരടിനു താഴെ തിരുത്തുവാനുള്ള പെട്ടിയിൽ ദയവായി ചുരുക്കരൂപം നൽകുക.
1058610594 താങ്കൾ നൽകുന്ന ചുരുക്കത്തിൽ വിക്കിഎഴുത്തുകൾ ഉപയോഗിക്കാവുന്നതാണ്.
1058710595 പൂർണ്ണമായാൽ, "{{int:savearticle}}" ഞെക്കുക.',
@@ -12211,6 +12219,7 @@
1221212220 'lqt-drag-setsortkey' => 'Zmień kolejność wiadomości na stronie',
1221312221 'lqt-drag-bump' => 'Przenieś wiadomość na samą górę strony dyskusji',
1221412222 'lqt-drag-save' => 'Potwierdź',
 12223+ 'lqt-drag-title' => 'Zatwierdzenie przeciągnięcia',
1221512224 'lqt-drag-reason' => 'Powód',
1221612225 'lqt-drag-subject' => 'Temat nowego wątku',
1221712226 'lqt-edit-signature' => '(edytuj podpis)',
@@ -12483,7 +12492,7 @@
1248412493 'lqt-drag-setsortkey' => 'Rangé la posission dël mëssagi ant la pàgina',
1248512494 'lqt-drag-bump' => 'Tramudé ël mëssagi an cò dla pàgina ëd discussion',
1248612495 'lqt-drag-save' => 'Conferma',
12487 - 'lqt-drag-title' => 'Conferma la còpia',
 12496+ 'lqt-drag-title' => 'Confermé ël rabasté',
1248812497 'lqt-drag-reason' => 'Rason:',
1248912498 'lqt-drag-subject' => 'Soget ëd la neuva discussion:',
1249012499 'lqt-edit-signature' => '(modifiché la firma)',
@@ -13199,7 +13208,7 @@
1320013209 'lqt_thread_deleted_for_sysops' => "Acest thread a fost '''șters''' și este vizibil doar administratorilor.",
1320113210 'lqt_thread_deleted' => 'Acest thread a fost șters.',
1320213211 'lqt_summary_notice_link' => 'scrieți un rezumat',
13203 - 'lqt_summary_label' => 'Acest thread a fost rezumat ca următoarele:',
 13212+ 'lqt_summary_label' => 'Rezumatul discuției:',
1320413213 'lqt_summary_subtitle' => 'Rezumatul lui „$1”',
1320513214 'lqt_nosuchrevision' => 'Nu există nicio astfel de revizie a acestui thread.',
1320613215 'lqt_threadrequired' => 'Trebuie să specificați un thread în URL.',
@@ -16337,16 +16346,26 @@
1633816347
1633916348 /** Tatar (Cyrillic) (Татарча/Tatarça (Cyrillic))
1634016349 * @author Ерней
 16350+ * @author Ильнар
1634116351 */
1634216352 $messages['tt-cyrl'] = array(
1634316353 'lqt_subject' => 'Тема:',
1634416354 'lqt_delete_return' => '$1 битенә кайтырга.',
 16355+ 'lqt_newmessages-title' => 'Яңа хатлар',
 16356+ 'lqt-newpost-summary' => 'Яңа элемтә: $1',
 16357+ 'lqt-reply-summary' => '[[$2|$1]]гә җавап',
 16358+ 'lqt-talkpage-history-title' => 'Аралашу битенең тарихы',
 16359+ 'lqt-talkpage-history-subtitle' => '$1 өчен',
 16360+ 'lqt-talkpage-history-tab' => 'Баш өлеш',
 16361+ 'restriction-reply' => 'җавап бирергә',
 16362+ 'restriction-newthread' => 'яңа элемтәләр ясау',
1634516363 );
1634616364
1634716365 /** Ukrainian (Українська)
1634816366 * @author AS
1634916367 * @author NickK
1635016368 * @author Prima klasy4na
 16369+ * @author Тест
1635116370 */
1635216371 $messages['uk'] = array(
1635316372 'lqt-desc' => 'Додає на сторінки обговорень гілки обговорень',
@@ -16582,6 +16601,7 @@
1658316602 'lqt-drag-setsortkey' => 'Змінити позицію розташування запису на сторінці',
1658416603 'lqt-drag-bump' => 'Перемістити запис на початок сторінки обговорення',
1658516604 'lqt-drag-save' => 'Підтвердити',
 16605+ 'lqt-drag-title' => 'Підтвердити перенос',
1658616606 'lqt-drag-reason' => 'Причина:',
1658716607 'lqt-drag-subject' => 'Тема для нової гілки:',
1658816608 'lqt-edit-signature' => '(редагувати підпис)',
@@ -16920,6 +16940,7 @@
1692116941
1692216942 /** Vietnamese (Tiếng Việt)
1692316943 * @author Minh Nguyen
 16944+ * @author Trần Nguyễn Minh Huy
1692416945 * @author Vinhtantran
1692516946 */
1692616947 $messages['vi'] = array(
@@ -17027,7 +17048,7 @@
1702817049 'lqt_header_warning_after_big' => 'Đầu đề dùng để thông báo và mở đầu.
1702917050 Thay vào đó bạn có thể muốn $2.',
1703017051 'lqt_header_warning_bold' => 'tiêu đề trang thảo luận',
17031 - 'lqt_header_warning_new_discussion' => 'bắ đầu cuộc thảo luận mới',
 17052+ 'lqt_header_warning_new_discussion' => 'bắt đầu cuộc thảo luận mới',
1703217053 'lqt_sorting_order' => 'Thứ tự xếp:',
1703317054 'lqt_sort_newest_changes' => 'xem lần cuối sửa đổi trước',
1703417055 'lqt_sort_newest_threads' => 'xem các luồng mới nhất trước',
@@ -17541,6 +17562,7 @@
1754217563 'lqt-drag-setsortkey' => '调整发言在页面中的位置',
1754317564 'lqt-drag-bump' => '将发言移动到讨论页的顶部',
1754417565 'lqt-drag-save' => '确认',
 17566+ 'lqt-drag-title' => '确认',
1754517567 'lqt-drag-reason' => '原因:',
1754617568 'lqt-drag-subject' => '新话题的主题:',
1754717569 'lqt-edit-signature' => '(编辑签名)',
@@ -17807,6 +17829,7 @@
1780817830 'lqt-drag-setsortkey' => '調整髮言在頁面中的位置',
1780917831 'lqt-drag-bump' => '將發言移動到討論頁的頂部',
1781017832 'lqt-drag-save' => '確認',
 17833+ 'lqt-drag-title' => '確認',
1781117834 'lqt-drag-reason' => '原因:',
1781217835 'lqt-drag-subject' => '新話題的主題:',
1781317836 'lqt-edit-signature' => '(編輯簽名檔)',
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/compat/Lqt-compat.i18n.php
@@ -90,7 +90,7 @@
9191 'htmlform-selectorother-other' => 'Altres',
9292 'htmlform-invalid-input' => 'Hi ha problemes amb alguna de les seves entrades',
9393 ),
94 - 'ckb-arab' =>
 94+ 'ckb' =>
9595 array (
9696 'htmlform-reset' => 'گەڕانەوەی گۆڕانکاری',
9797 ),
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/lqt.css
@@ -485,6 +485,10 @@
486486 .TalkpagePager_nav {
487487 margin: 30px auto 10px;
488488 }
 489+
 490+.lqt-drag-confirm label {
 491+ margin-right: 20px;
 492+}
489493 /* Float Clearing - If you confused, http://www.positioniseverything.net/easyclearing.html */
490494 .lqt_thread_heading:after
491495 {
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/classes/NewMessagesController.php
@@ -123,7 +123,7 @@
124124 $fields = array( 'wl_user', 'ums_user', 'ums_read_timestamp' );
125125
126126 global $wgVersion;
127 - if ( version_compare( $wgVersion, '1.15.999', '<=' ) ) {
 127+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
128128 $oldPrefCompat = true;
129129
130130 $tables[] = 'user';
@@ -175,7 +175,7 @@
176176
177177 global $wgVersion;
178178
179 - if ( version_compare( $wgVersion, '1.15.999', '<=' ) ) {
 179+ if ( version_compare( $wgVersion, '1.16', '<' ) ) {
180180 $decodedOptions = self::decodeUserOptions( $row->user_options );
181181
182182 $wantsTalkNotification = !isset( $decodedOptions['lqtnotifytalk'] );
@@ -340,7 +340,9 @@
341341 $time = $lang->time( $adjustedTimestamp );
342342
343343 $params = array( $u->getName(), $t->subjectWithoutIncrement(),
344 - $date, $time, $talkPage, $permalink );
 344+ $date, $time, $talkPage,
 345+ $permalink,
 346+ $t->root()->getContent() );
345347
346348 // Get message in user's own language, bug 20645
347349 $msg = wfMsgReal( $msgName, $params, true /* use DB */, $langCode,
@@ -392,8 +394,9 @@
393395
394396 $cval = $wgMemc->get( wfMemcKey( 'lqt-new-messages-count', $user->getId() ) );
395397
396 - if ( $cval )
 398+ if ( $cval ) {
397399 return $cval;
 400+ }
398401
399402 $dbr = wfGetDB( DB_SLAVE );
400403
Index: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha/lqt.js
@@ -1099,103 +1099,91 @@
11001100 },
11011101
11021102 'activateDragDrop' : function(e) {
 1103+ // FIX ME: Need a cancel drop action
11031104 e.preventDefault();
11041105
11051106 // Set up draggability.
1106 - var thread = $j(this).closest('.lqt_thread');
1107 - var threadID = thread.find('.lqt-post-wrapper').data('thread-id');
 1107+ var $thread = $j( this ).closest( '.lqt_thread' );
 1108+ var threadID = $thread.find( '.lqt-post-wrapper' ).data( 'thread-id' );
11081109 var scrollOffset;
1109 -
1110 - $j('html,body').each(
 1110+ // determine wether it's an entire thread or just one of the replies
 1111+ var isThreadReply = ! $thread.is( '.lqt-thread-topmost' );
 1112+ // FIXME: what does all of this do? From here
 1113+ $j( 'html,body' ).each(
11111114 function() {
1112 - if ( $j(this).attr('scrollTop') )
1113 - scrollOffset = $j(this).attr('scrollTop');
 1115+ if ( $j(this).attr( 'scrollTop' ) )
 1116+ scrollOffset = $j( this ).attr( 'scrollTop' );
11141117 } );
11151118
1116 - scrollOffset = scrollOffset - thread.offset().top;
 1119+ scrollOffset = scrollOffset - $thread.offset().top;
11171120
11181121 var helperFunc;
1119 - if ( thread.hasClass( 'lqt-thread-topmost' ) ) {
1120 - var header = $j('#lqt-header-'+threadID);
1121 - var headline = header.contents().filter('.mw-headline').clone();
1122 - var helper = $j('<h2/>').append(headline);
1123 - helperFunc = function() { return helper; };
 1122+ if ( $thread.hasClass( 'lqt-thread-topmost' ) ) {
 1123+ var $header = $j( '#lqt-header-' + threadID );
 1124+ var $headline = $header.contents().filter( '.mw-headline' ).clone();
 1125+ var $helper = $j( '<h2 />' ).append( $headline );
 1126+ helperFunc = function() { return $helper; };
11241127 } else {
11251128 helperFunc =
11261129 function() {
1127 - var helper = thread.clone();
1128 - helper.find('.lqt-thread-replies').remove();
1129 - return helper;
 1130+ var $helper = $thread.clone();
 1131+ $helper.find( '.lqt-thread-replies' ).remove();
 1132+ return $helper;
11301133 };
11311134 }
1132 -
1133 - var draggableOptions =
1134 - {
 1135+ // to here.
 1136+
 1137+ var draggableOptions = {
11351138 'axis' : 'y',
11361139 'opacity' : '0.70',
11371140 'revert' : 'invalid',
11381141 'helper' : helperFunc
11391142 };
1140 - thread.draggable( draggableOptions );
 1143+ $thread.draggable( draggableOptions );
11411144
11421145 // Kill all existing drop zones
1143 - $j('.lqt-drop-zone').remove();
 1146+ $j( '.lqt-drop-zone' ).remove();
11441147
11451148 // Set up some dropping targets. Add one before the first thread, after every
11461149 // other thread, and as a subthread of every post.
1147 - var createDropZone = function( ) {
1148 - var element = $j('<div class="lqt-drop-zone" />');
1149 - element.text( wgLqtMessages['lqt-drag-drop-zone'] );
1150 - return element;
 1150+ var createDropZone = function( sortKey, parent ) {
 1151+ return $j( '<div class="lqt-drop-zone" />' )
 1152+ .text( wgLqtMessages['lqt-drag-drop-zone'] )
 1153+ .data( 'sortkey', sortKey )
 1154+ .data( 'parent', parent );
11511155 };
1152 -
1153 - // First drop zone
1154 - var firstDropZone = createDropZone();
1155 - firstDropZone.data( 'sortkey', 'now' );
1156 - firstDropZone.data( 'parent', 'top' );
1157 - var firstThread = $j('.lqt-thread-topmost:first');
1158 - firstThread.before(firstDropZone);
1159 -
1160 - // Now one after every thread
1161 - $j('.lqt-thread-topmost').each( function() {
1162 - var sortkeySelector = 'input[name=lqt-thread-sortkey]';
1163 - var sortkeyField = $j(this).contents().filter(sortkeySelector);
1164 - var sortkey = parseInt(sortkeyField.val());
1165 -
1166 - var dropZone = createDropZone();
1167 - dropZone.data( 'sortkey', sortkey - 1 );
1168 - dropZone.data( 'parent', 'top' );
1169 - $j(this).after(dropZone);
 1156+
 1157+ // Add a drop zone at the very top unless the drag thread is the very first thread
 1158+ $j( '.lqt-thread-topmost:first' )
 1159+ .not( $thread )
 1160+ .before( createDropZone( 'now', 'top' ) );
 1161+
 1162+ // Now one after every thread except the drag thread
 1163+ $j( '.lqt-thread-topmost' ).not( $thread ).each( function() {
 1164+ var sortkey = parseInt( $j( this ).contents().filter( 'input[name=lqt-thread-sortkey]' ).val() );
 1165+ $j( this ).after( createDropZone( sortkey - 1, 'top' ) );
11701166 } );
11711167
1172 - // Now one underneath every thread
1173 - $j('.lqt_thread').not(thread).each( function() {
1174 - var thread = $j(this);
1175 - var repliesElement = liquidThreads.getRepliesElement( thread );
1176 - var dropZone = createDropZone();
1177 - var threadId = thread.data('thread-id');
1178 -
1179 - dropZone.data( 'sortkey', 'now' );
1180 - dropZone.data( 'parent', threadId );
1181 -
1182 - repliesElement.contents().filter('.lqt-replies-finish').before(dropZone);
1183 -
 1168+ // Now one underneath every thread except the drag thread
 1169+ $j('.lqt_thread').not( $thread ).each( function() {
 1170+ var $curThread = $j( this );
 1171+ var repliesElement = liquidThreads.getRepliesElement( $curThread );
 1172+ repliesElement.contents().filter('.lqt-replies-finish').before( createDropZone( 'now', $curThread.data( 'thread-id' ) ) );
11841173 } );
11851174
1186 - var droppableOptions =
1187 - {
 1175+ var droppableOptions = {
11881176 'activeClass' : 'lqt-drop-zone-active',
11891177 'hoverClass' : 'lqt-drop-zone-hover',
11901178 'drop' : liquidThreads.completeDragDrop,
11911179 'tolerance' : 'intersect'
11921180 };
11931181
1194 - $j('.lqt-drop-zone').droppable( droppableOptions );
 1182+ $j( '.lqt-drop-zone' ).droppable( droppableOptions );
11951183
1196 - scrollOffset = scrollOffset + thread.offset().top;
 1184+ scrollOffset = scrollOffset + $thread.offset().top;
11971185
11981186 // Reset scroll position
1199 - $j('html,body').attr( 'scrollTop', scrollOffset );
 1187+ $j( 'html,body' ).attr( 'scrollTop', scrollOffset );
12001188 },
12011189
12021190 'completeDragDrop' : function( e, ui ) {
@@ -1241,10 +1229,10 @@
12421230 },
12431231
12441232 'confirmDragDrop' : function( thread, params ) {
1245 - var confirmDialog = $j('<div class="lqt-drag-confirm" />');
 1233+ var confirmDialog = $j( '<div class="lqt-drag-confirm" />' );
12461234
12471235 // Add an intro
1248 - var intro = $j('<p/>').text( wgLqtMessages['lqt-drag-confirm'] );
 1236+ var intro = $j( '<p/>' ).text( wgLqtMessages['lqt-drag-confirm'] );
12491237 confirmDialog.append( intro );
12501238
12511239 // Summarize changes to be made
@@ -1388,8 +1376,8 @@
13891377 }
13901378
13911379 // Do the actual physical movement
1392 - var threadId = thread.find('.lqt-post-wrapper')
1393 - .data('thread-id');
 1380+ var threadId = thread.find( '.lqt-post-wrapper' )
 1381+ .data( 'thread-id' );
13941382
13951383 // Assorted ways of returning a thread to its proper place.
13961384 if ( typeof params.insertAfter != 'undefined' ) {
Property changes on: branches/wmf/1.16wmf4/extensions/LiquidThreads_alpha
___________________________________________________________________
Modified: svn:mergeinfo
13971385 Merged /trunk/extensions/LiquidThreads:r70085-70099,70101-70105,70107-70377

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70100re-apply r70076, WITH A FIX!mah17:59, 28 July 2010
r70106Since script ordering matters, follow up r70100 with a way to load js files a...mah20:00, 28 July 2010

Status & tagging log