Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -591,11 +591,21 @@ |
592 | 592 | array( 'href' => 'javascript:smwRemoveMainLabel()' ) ) . |
593 | 593 | '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '">' . |
594 | 594 | '</a>' . |
595 | | - '</span>' . |
| 595 | + '</span><strong>' . |
596 | 596 | wfMsg( 'smw_qui_rescol' ) . |
597 | | - '</span>' . |
598 | | - '<input size="25" value="' . $mainLabelText . '" id="mainlabelvis" />' . |
599 | | - '<input type="hidden" name="pmainlabel" value="' . $mainLabel . '" id="mainlabelhid" />' . |
| 597 | + '</strong></span>' . |
| 598 | + Xml::openElement( 'div', |
| 599 | + array( 'id' => 'mainlabel-dialog', |
| 600 | + 'title' => wfMsg( 'smw_qui_mainlabopts'), |
| 601 | + 'class' => 'smwmainlabdialog' ) |
| 602 | + ). |
| 603 | + '<table align="center" ><tr>'. |
| 604 | + '<td>'. wfMsg('smw_qui_dlabel'). '</td>'. |
| 605 | + '<td><input size="25" value="' . $mainLabelText . '" id="mainlabelvis" /></td>'. |
| 606 | + '</tr></table>' . |
| 607 | + '</div>'. |
| 608 | + '<input type="hidden" name="pmainlabel" value="' . $mainLabel . '" id="mainlabelhid" /> ' . |
| 609 | + '<a class="smwq-more" href="javascript:smw_makeMainlabelDialog()">'.wfMsg( 'smw_qui_options' ).'</a> '. |
600 | 610 | '</div>'; |
601 | 611 | $urlArgs = array(); |
602 | 612 | $urlArgs['pmainlabel'] = $mainLabel; |
— | — | @@ -908,9 +918,9 @@ |
909 | 919 | ) . |
910 | 920 | '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '">' . |
911 | 921 | '</a>' . |
912 | | - '</span>' . |
| 922 | + '</span><strong>' . |
913 | 923 | wfMsg( 'smw_qui_rescol' ) . |
914 | | - '</span>' . |
| 924 | + '</strong></span>' . |
915 | 925 | Xml::input( "maincol_label[$i]", |
916 | 926 | '25', |
917 | 927 | $mainColumnLabels[$key], |
— | — | @@ -981,8 +991,8 @@ |
982 | 992 | '<a>' . |
983 | 993 | '<img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '">' . |
984 | 994 | '</a>' . |
985 | | - '</span>' . |
986 | | - wfMsg( 'smw_qui_rescol' ) . '</span>' . |
| 995 | + '</span><strong>' . |
| 996 | + wfMsg( 'smw_qui_rescol' ) . '</strong></span>' . |
987 | 997 | Xml::input( "maincol_label_num", '25' ) . " " . |
988 | 998 | Xml::closeElement( 'div' ); |
989 | 999 | $hiddenMainColumn = json_encode( $hiddenMainColumn ); |
— | — | @@ -1049,10 +1059,18 @@ |
1050 | 1060 | '<table align="center">' . |
1051 | 1061 | '<tr><td>' . $categoryHtml[0] . '</td><td>' . $categoryHtml[1] . '</td></tr>' . |
1052 | 1062 | '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' . |
| 1063 | + '</table><br/><table align="center">'. |
1053 | 1064 | '<tr><td>' . $categoryYesHtml[0] . '</td><td>' . $categoryYesHtml[1] . '</td></tr>' . |
1054 | 1065 | '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' . |
1055 | 1066 | '</table>' . |
1056 | 1067 | Xml::closeElement( 'div' ); |
| 1068 | + $mainLabelDialogBox = Xml::openElement( 'div', |
| 1069 | + array( 'id' => 'mainlabel-dialog', |
| 1070 | + 'title' => wfMsg( 'smw_qui_mainlabopts'), |
| 1071 | + 'class' => 'smwmainlabdialog' ) |
| 1072 | + ). |
| 1073 | + Xml::inputLabel(wfMsg('smw_qui_dlabel'), '', 'd-mainlabel-label'). |
| 1074 | + Xml::closeElement('div'); |
1057 | 1075 | |
1058 | 1076 | $result .= '<div id="sorting_main"></div>' . "\n"; |
1059 | 1077 | $result .= '[<a href="javascript:smw_addPropertyInstance(\'property_starter\', \'sorting_main\')">' . wfMsg( 'smw_qui_addnprop' ) . '</a>]' . |
— | — | @@ -1131,6 +1149,10 @@ |
1132 | 1150 | |
1133 | 1151 | $javascriptText .= <<<EOT |
1134 | 1152 | |
| 1153 | + function smw_makeMainlabelDialog(){ |
| 1154 | + jQuery('#mainlabel-dialog').dialog("open"); |
| 1155 | + } |
| 1156 | + |
1135 | 1157 | function smw_makeCatDialog( cat_id ){ |
1136 | 1158 | jQuery( '#prop-cat input' ).attr('value',''); |
1137 | 1159 | |
— | — | @@ -1242,7 +1264,7 @@ |
1243 | 1265 | } |
1244 | 1266 | var smw_mainLabelHidden=true; |
1245 | 1267 | function smw_addMainColInstance(starter_div_id, main_div_id) { |
1246 | | - if(smw_mainLabelHidden && jQuery('.smwsort').length==1){ |
| 1268 | + if(smw_mainLabelHidden && (jQuery('.smwsort').length==1)){ |
1247 | 1269 | jQuery('#mainlabelhid').attr('value',''); |
1248 | 1270 | jQuery('#mainlabelvis').attr('value',''); |
1249 | 1271 | jQuery('#smwmainlabel').show(); |
— | — | @@ -1293,10 +1315,27 @@ |
1294 | 1316 | jQuery('$hiddenMainColumn').appendTo(document.body); |
1295 | 1317 | jQuery('$propertyDialogBox').appendTo(document.body); |
1296 | 1318 | jQuery('$categoryDialogBox').appendTo(document.body); |
1297 | | - jQuery('#cat-dialog').dialog({ |
| 1319 | + |
| 1320 | + jQuery( '#mainlabel-dialog' ).dialog( { |
1298 | 1321 | autoOpen: false, |
1299 | 1322 | modal: true, |
1300 | 1323 | resizable: true, |
| 1324 | + minWidth: 400, |
| 1325 | + buttons: { |
| 1326 | + "{$okMsg}": function(){ |
| 1327 | + jQuery('#mainlabelhid').attr('value',jQuery('#mainlabelvis').attr('value')); |
| 1328 | + jQuery(this).dialog("close"); |
| 1329 | + }, |
| 1330 | + "{$cancelMsg}": function(){ |
| 1331 | + jQuery(this).dialog("close"); |
| 1332 | + } |
| 1333 | + } |
| 1334 | + } ); |
| 1335 | + |
| 1336 | + jQuery( '#cat-dialog' ).dialog( { |
| 1337 | + autoOpen: false, |
| 1338 | + modal: true, |
| 1339 | + resizable: true, |
1301 | 1340 | minHeight: 200, |
1302 | 1341 | minWidth: 400, |
1303 | 1342 | buttons: { |
— | — | @@ -1324,7 +1363,6 @@ |
1325 | 1364 | autoOpen: false, |
1326 | 1365 | modal: true, |
1327 | 1366 | resizable: true, |
1328 | | - minHeight: 200, |
1329 | 1367 | minWidth: 400, |
1330 | 1368 | buttons: { |
1331 | 1369 | "{$okMsg}": function(){ |
— | — | @@ -1366,10 +1404,7 @@ |
1367 | 1405 | jQuery(document).ready(smw_property_autocomplete); |
1368 | 1406 | jQuery(document).ready(smw_category_autocomplete); |
1369 | 1407 | jQuery(document).ready(function(){ |
1370 | | - jQuery('#mainlabelvis').bind('change', function(){ |
1371 | | - jQuery('#mainlabelhid').attr('value',jQuery('#mainlabelvis').attr('value')); |
1372 | | - }); |
1373 | | - if(jQuery('#mainlabelvis')!='') smw_mainLabelHidden=false; |
| 1408 | + if(jQuery('#mainlabelhid')=='') smw_mainLabelHidden=true; |
1374 | 1409 | }); |
1375 | 1410 | </script> |
1376 | 1411 | |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php |
— | — | @@ -264,7 +264,7 @@ |
265 | 265 | 'smw_qui_descorder' => 'Descending', |
266 | 266 | 'smw_qui_addnprop' => 'Add additional property', |
267 | 267 | 'smw_qui_delete' => 'Remove', |
268 | | - 'smw_qui_rescol' => '<strong>Query Matches</strong> Label', |
| 268 | + 'smw_qui_rescol' => 'Query Matches', |
269 | 269 | 'smw_qui_options' => 'options', |
270 | 270 | 'smw_qui_addcategory' => 'Add additional category', |
271 | 271 | 'smw_qui_addrescol' => 'Add main result column', |
— | — | @@ -274,6 +274,7 @@ |
275 | 275 | 'smw_qui_label' => 'Label', |
276 | 276 | 'smw_prp_options' => 'Property Options', |
277 | 277 | 'smw_qui_catopts' => 'Category Options', |
| 278 | + 'smw_qui_mainlabopts' => 'Result Options', |
278 | 279 | 'smw_qui_dlabel' => 'Label:', |
279 | 280 | 'smw_qui_dcategory' => 'Category:', |
280 | 281 | 'smw_qui_dcatyes' => 'Show text when category is present:', |
Index: trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css |
— | — | @@ -131,6 +131,9 @@ |
132 | 132 | } |
133 | 133 | |
134 | 134 | /* ui buttons for QueryUI */ |
| 135 | +div.smwsort{ |
| 136 | + margin-bottom: 5px; |
| 137 | +} |
135 | 138 | .smwsort input, .smwsort a, .smwsort select, .smwsort checkbox{ |
136 | 139 | margin-left: 5px; |
137 | 140 | margin-bottom: 5px; |
— | — | @@ -148,18 +151,13 @@ |
149 | 152 | padding-left: 35px; |
150 | 153 | } |
151 | 154 | |
152 | | -.smwpropdialog input, .smwpropdialog select{ |
| 155 | +.smwpropdialog input, .smwpropdialog select, .smwcatdialog input, |
| 156 | +.smwcatdialog select, .smwmainlabdialog input{ |
153 | 157 | margin-top: 10px; |
154 | 158 | margin-right: 5px; |
155 | 159 | margin-left: 5px; |
156 | 160 | } |
157 | 161 | |
158 | | -.smwcatdialog input, .smwcatdialog select{ |
159 | | - margin-top: 10px; |
160 | | - margin-right: 5px; |
161 | | - margin-left: 5px; |
162 | | -} |
163 | | - |
164 | 162 | /* Query Creator */ |
165 | 163 | div.smwqcnavbar{ |
166 | 164 | padding-bottom: 5px; |
— | — | @@ -173,7 +171,7 @@ |
174 | 172 | } |
175 | 173 | |
176 | 174 | .smwquisortlabel{ |
177 | | - width: 15em; |
| 175 | + width: 10em; |
178 | 176 | float: left; |
179 | 177 | } |
180 | 178 | /* search, browse, RDF icons */ |