r94341 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94340‎ | r94341 | r94342 >
Date:12:24, 12 August 2011
Author:devayon
Status:deferred
Tags:
Comment:
minor layout changes
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php
@@ -77,6 +77,7 @@
7878 */
7979 protected function makeResults() {
8080 global $wgOut, $smwgScriptPath;
 81+ $this->enableJQuery();
8182 $result = "";
8283 $spec_title = $this->getTitle();
8384 $format_box = $this->getFormatSelectBoxSep( 'broadtable' );
@@ -89,24 +90,36 @@
9091 '<tr><th>' . wfMsg( 'smw_ask_queryhead' ) . "</th>\n<th>" . wfMsg( 'smw_ask_format_as' ) . "</th></tr>" .
9192 '<tr>' .
9293 '<td style="width: 70%; padding-right: 7px;">' . $this->getQueryFormBox() . "</td>\n" .
93 - '<td style="padding-right: 7px; text-align:center;">' . $format_box[0] . '</td>' .
94 - '</tr>' .
95 - "</table>\n";
96 - // sorting and prinouts
97 - $result .= '<div class="smw-qc-sortbox" style="padding-left:10px;">' . $this->getPoSortFormBox() . '</div>';
98 - // show|hide additional options and querying help
99 - $result .= '<br><span id="show_additional_options" style="display:inline;"><a href="#addtional" rel="nofollow" onclick="' .
100 - "document.getElementById('additional_options').style.display='block';" .
 94+ '<td style="padding-right: 7px; text-align:center;">' . $format_box[0];
 95+
 96+ //START: show|hide additional options
 97+ $result .= '<span id="show_additional_options" style="display:inline;"><a href="#addtional" rel="nofollow" onclick="' .
 98+ "jQuery('#additional_options').show('blind');" .
10199 "document.getElementById('show_additional_options').style.display='none';" .
102100 "document.getElementById('hide_additional_options').style.display='inline';" . '">' .
103101 wfMsg( 'smw_qc_show_addnal_opts' ) . '</a></span>';
104102 $result .= '<span id="hide_additional_options" style="display:none"><a href="#" rel="nofollow" onclick="' .
105 - "document.getElementById('additional_options').style.display='none';" .
 103+ "jQuery('#additional_options').hide('blind');;" .
106104 "document.getElementById('hide_additional_options').style.display='none';" .
107105 "document.getElementById('show_additional_options').style.display='inline';" . '">' .
108106 wfMsg( 'smw_qc_hide_addnal_opts' ) . '</a></span>';
109 - $result .= ' | <a href="' . htmlspecialchars( wfMsg( 'smw_ask_doculink' ) ) . '">' . wfMsg( 'smw_ask_help' ) . '</a>';
110 - if ( $this->uiCore->getQueryString() != '' ) { // hide #ask if there isnt any query defined
 107+ //END: show|hide additional options
 108+
 109+ $result .= '</td>' .
 110+ '</tr>' .
 111+ "</table>\n";
 112+ // sorting and prinouts
 113+ $result .= '<div class="smw-qc-sortbox" style="padding-left:10px;">' . $this->getPoSortFormBox() . '</div>';
 114+ // additional options
 115+ $result .= '<div id="additional_options" style="display:none">';
 116+
 117+ $result .= $format_box[1]; // display the format options
 118+
 119+ $result .= '</div>'; // end of hidden additional options
 120+ $result .= '<br /><input type="submit" value="' . wfMsg( 'smw_ask_submit' ) . '"/><br/>';
 121+
 122+ $result .= '<a href="' . htmlspecialchars( wfMsg( 'smw_ask_doculink' ) ) . '">' . wfMsg( 'smw_ask_help' ) . '</a>';
 123+ if ( $this->uiCore->getQueryString() != '' ) { // hide #ask if there isnt any query defined
111124 $result .= ' | <a name="show-embed-code" id="show-embed-code" href="#show-embed-code">' . wfMsg( 'smw_ask_show_embed' ) . '</a>';
112125 $result .= '<div id="embed-code-dialog">' .
113126 $this->getAskEmbedBox() .
@@ -128,13 +141,6 @@
129142 EOT;
130143 $wgOut->addScript( $javascript_text );
131144 }
132 - // additional options
133 - $result .= '<div id="additional_options" style="display:none">';
134 -
135 - $result .= $format_box[1]; // display the format options
136 -
137 - $result .= '</div>'; // end of hidden additional options
138 - $result .= '<br /><input type="submit" value="' . wfMsg( 'smw_ask_submit' ) . '"/>';
139145 $result .= '<input type="hidden" name="eq" value="no"/>' .
140146 "\n</form><br/>";
141147
@@ -371,7 +377,7 @@
372378 $result .= Html::openElement( 'div', array( 'id' => "sort_div_$i", 'class' => 'smwsort' ) );
373379 $result .= '<span class="smw-remove"><a href="javascript:removePOInstance(\'sort_div_' . $i . '\')"><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' .
374380 wfMsg( 'smw_qui_category' ) .
375 - Xml::input( "category[$i]", '20', $category_values[$key], array( 'id' => "category$i" ) ) . " " .
 381+ Xml::input( "category[$i]", '25', $category_values[$key], array( 'id' => "category$i" ) ) . " " .
376382 wfMsg( 'smw_qui_label' ) .
377383 Xml::input( "cat_label[$i]", '20', array_key_exists( $key, $category_label_values ) ? $category_label_values[$key]:false, array( 'id' => "cat_label$i" ) ) . " " .
378384 ' <a id="more' . $i . '" "class="smwq-more" href="javascript:smw_makeCatDialog(\'' . $i . '\')"> ' . WfMsg( 'smw_qui_options' ) . ' </a> ' .
@@ -410,7 +416,7 @@
411417 $hidden_category = Html::openElement( 'div', array( 'id' => 'category_starter', 'class' => 'smwsort', 'style' => 'display:none' ) ) .
412418 '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' .
413419 wfMsg( 'smw_qui_category' ) .
414 - Xml::input( "category_num", '20' ) . " " .
 420+ Xml::input( "category_num", '25' ) . " " .
415421 wfMsg( 'smw_qui_label' ) .
416422 Xml::input( "cat_label_num", '20' ) . " " .
417423 Xml::closeElement( 'div' );