r34910 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34909‎ | r34910 | r34911 >
Date:08:32, 16 May 2008
Author:jojo
Status:old
Tags:
Comment:
turn links to POD partners into buttons to make consistent (de-)activation for (non-)empty collections possible
Modified paths:
  • /trunk/extensions/Collection/Collection.body.php (modified) (history)
  • /trunk/extensions/Collection/collection/collection.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/collection/collection.js
@@ -249,7 +249,7 @@
250250 hookEventOnElement('click', function() { self.collection.sort(); }, $('sortLink'));
251251
252252 this.downloadButton = $('downloadButton');
253 -
 253+ this.ppList = $('ppList');
254254 this.titleInput = $('titleInput');
255255
256256 hookEventOnElement(['keyup', 'change'], function() {
@@ -313,6 +313,9 @@
314314 disabled = 'disabled';
315315 }
316316 this.downloadButton.disabled = disabled;
 317+ forEach(this.ppList.getElementsByTagName('input'), function(i, button) {
 318+ button.disabled = disabled;
 319+ });
317320 var saveButton = $('saveButton');
318321 if (!saveButton) {
319322 return;
Index: trunk/extensions/Collection/Collection.body.php
@@ -850,9 +850,12 @@
851851 $orderLabel = wfMsgHtml( 'coll-order_from_pp', $partnerName );
852852 $aboutLabel = wfMsgHtml( 'coll-about_pp', $partnerName );
853853 $html .= <<<EOS
854 -<li>
855 - <a href="$posturl" class="pp_post_link"><img src="$logoURL" alt="$partnerName"/>&nbsp;<strong>$orderLabel</strong></a> –
856 - <a href="$url" target="_blank">$aboutLabel</a>
 854+<li id="ppList">
 855+ <form action="$posturl" method="GET">
 856+ <a href="$url" target="_blank"><img src="$logoURL" alt="$partnerName"/></a>
 857+ <input type="submit" value="$orderLabel"/>
 858+ <a href="$url" target="_blank">$aboutLabel</a>
 859+ </form>
857860 </li>
858861 EOS
859862 ;

Status & tagging log