Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php |
— | — | @@ -77,6 +77,7 @@ |
78 | 78 | */ |
79 | 79 | protected function makeResults() { |
80 | 80 | global $wgOut, $smwgScriptPath; |
| 81 | + $this->enableJQuery(); |
81 | 82 | $result = ""; |
82 | 83 | $spec_title = $this->getTitle(); |
83 | 84 | $format_box = $this->getFormatSelectBoxSep( 'broadtable' ); |
— | — | @@ -89,24 +90,36 @@ |
90 | 91 | '<tr><th>' . wfMsg( 'smw_ask_queryhead' ) . "</th>\n<th>" . wfMsg( 'smw_ask_format_as' ) . "</th></tr>" . |
91 | 92 | '<tr>' . |
92 | 93 | '<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');" . |
101 | 99 | "document.getElementById('show_additional_options').style.display='none';" . |
102 | 100 | "document.getElementById('hide_additional_options').style.display='inline';" . '">' . |
103 | 101 | wfMsg( 'smw_qc_show_addnal_opts' ) . '</a></span>'; |
104 | 102 | $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');;" . |
106 | 104 | "document.getElementById('hide_additional_options').style.display='none';" . |
107 | 105 | "document.getElementById('show_additional_options').style.display='inline';" . '">' . |
108 | 106 | 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 |
111 | 124 | $result .= ' | <a name="show-embed-code" id="show-embed-code" href="#show-embed-code">' . wfMsg( 'smw_ask_show_embed' ) . '</a>'; |
112 | 125 | $result .= '<div id="embed-code-dialog">' . |
113 | 126 | $this->getAskEmbedBox() . |
— | — | @@ -128,13 +141,6 @@ |
129 | 142 | EOT; |
130 | 143 | $wgOut->addScript( $javascript_text ); |
131 | 144 | } |
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' ) . '"/>'; |
139 | 145 | $result .= '<input type="hidden" name="eq" value="no"/>' . |
140 | 146 | "\n</form><br/>"; |
141 | 147 | |
— | — | @@ -371,7 +377,7 @@ |
372 | 378 | $result .= Html::openElement( 'div', array( 'id' => "sort_div_$i", 'class' => 'smwsort' ) ); |
373 | 379 | $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>' . |
374 | 380 | 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" ) ) . " " . |
376 | 382 | wfMsg( 'smw_qui_label' ) . |
377 | 383 | Xml::input( "cat_label[$i]", '20', array_key_exists( $key, $category_label_values ) ? $category_label_values[$key]:false, array( 'id' => "cat_label$i" ) ) . " " . |
378 | 384 | ' <a id="more' . $i . '" "class="smwq-more" href="javascript:smw_makeCatDialog(\'' . $i . '\')"> ' . WfMsg( 'smw_qui_options' ) . ' </a> ' . |
— | — | @@ -410,7 +416,7 @@ |
411 | 417 | $hidden_category = Html::openElement( 'div', array( 'id' => 'category_starter', 'class' => 'smwsort', 'style' => 'display:none' ) ) . |
412 | 418 | '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
413 | 419 | wfMsg( 'smw_qui_category' ) . |
414 | | - Xml::input( "category_num", '20' ) . " " . |
| 420 | + Xml::input( "category_num", '25' ) . " " . |
415 | 421 | wfMsg( 'smw_qui_label' ) . |
416 | 422 | Xml::input( "cat_label_num", '20' ) . " " . |
417 | 423 | Xml::closeElement( 'div' ); |