r94889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94888‎ | r94889 | r94890 >
Date:13:26, 18 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
modal window for '?' printouts, follow-up r94882
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -925,11 +925,11 @@
926926 '</span><strong>' .
927927 wfMsg( 'smw_qui_rescol' ) .
928928 '</strong></span>' .
929 - Xml::input( "maincol_label[$i]",
930 - '25',
 929+ Html::hidden( "maincol_label[$i]",
931930 $mainColumnLabels[$key],
932931 array ( 'id' => "maincol_label$i" )
933932 ) . " " .
 933+ '<a class="smwq-more" href="javascript:smw_makeQueryMatchesDialog(\'' . $i . '\')">' . wfMsg( 'smw_qui_options' ) . '</a> ' .
934934 '</div>';
935935 $urlArgs["maincol_label[$i]"] =
936936 ( $mainColumnLabels[$key] == '' ) ? ' ':$mainColumnLabels[$key];
@@ -997,7 +997,7 @@
998998 '</a>' .
999999 '</span><strong>' .
10001000 wfMsg( 'smw_qui_rescol' ) . '</strong></span>' .
1001 - Xml::input( "maincol_label_num", '25' ) . " " .
 1001+ Html::hidden( "maincol_label_num", '' ) . " " .
10021002 Xml::closeElement( 'div' );
10031003 $hiddenMainColumn = json_encode( $hiddenMainColumn );
10041004
@@ -1068,12 +1068,17 @@
10691069 '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' .
10701070 '</table>' .
10711071 Xml::closeElement( 'div' );
1072 - $mainLabelDialogBox = Xml::openElement( 'div',
1073 - array( 'id' => 'mainlabel-dialog',
 1072+
 1073+ // Create dialog box for QueryMatches
 1074+ $mainResLabelHtml = Xml::inputLabelSep( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainres-label' );
 1075+ $mainResDialogBox = Xml::openElement( 'div',
 1076+ array( 'id' => 'mainres-dialog',
10741077 'title' => wfMsg( 'smw_qui_mainlabopts' ),
10751078 'class' => 'smwmainlabdialog' )
10761079 ) .
1077 - Xml::inputLabel( wfMsg( 'smw_qui_dlabel' ), '', 'd-mainlabel-label' ) .
 1080+ '<table align="center">' .
 1081+ '<tr><td>' . $mainResLabelHtml[0] . '</td><td>' . $mainResLabelHtml[1] . '</td></tr>' .
 1082+ '</table>' .
10781083 Xml::closeElement( 'div' );
10791084
10801085 $result .= '<div id="sorting_main"></div>' . "\n";
@@ -1157,6 +1162,13 @@
11581163 jQuery('#mainlabel-dialog').dialog("open");
11591164 }
11601165
 1166+ function smw_makeQueryMatchesDialog( qm_id ){
 1167+ qmLabel=jQuery('#maincol_label'+qm_id).attr('value');
 1168+ jQuery('#d-mainres-label').attr('value', qmLabel);
 1169+ jQuery( '#mainres-dialog' ).dialog.sortid = qm_id;
 1170+ jQuery( '#mainres-dialog' ).dialog( 'open' );
 1171+ }
 1172+
11611173 function smw_makeCatDialog( cat_id ){
11621174 jQuery( '#prop-cat input' ).attr('value','');
11631175
@@ -1319,6 +1331,7 @@
13201332 jQuery('$hiddenMainColumn').appendTo(document.body);
13211333 jQuery('$propertyDialogBox').appendTo(document.body);
13221334 jQuery('$categoryDialogBox').appendTo(document.body);
 1335+ jQuery('$mainResDialogBox').appendTo(document.body);
13231336
13241337 jQuery( '#mainlabel-dialog' ).dialog( {
13251338 autoOpen: false,
@@ -1336,6 +1349,24 @@
13371350 }
13381351 } );
13391352
 1353+ jQuery( '#mainres-dialog' ).dialog( {
 1354+ autoOpen: false,
 1355+ modal: true,
 1356+ resizable: true,
 1357+ minWidth: 400,
 1358+ buttons: {
 1359+ "{$okMsg}": function(){
 1360+ id = jQuery( this ).dialog.sortid;
 1361+ label = jQuery('#d-mainres-label');
 1362+ jQuery('#maincol_label'+id).attr('value', label);
 1363+ jQuery(this).dialog("close");
 1364+ },
 1365+ "{$cancelMsg}": function(){
 1366+ jQuery(this).dialog("close");
 1367+ }
 1368+ }
 1369+ } );
 1370+
13401371 jQuery( '#cat-dialog' ).dialog( {
13411372 autoOpen: false,
13421373 modal: true,

Follow-up revisions

RevisionCommit summaryAuthorDate
r94893follow-up r94889devayon13:54, 18 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94882modal-window for mainlabeldevayon11:51, 18 August 2011