Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php |
— | — | @@ -662,8 +662,8 @@ |
663 | 663 | * Make an element for additional properties |
664 | 664 | */ |
665 | 665 | $result .= Html::openElement( 'div', array( 'id' => "sort_div_$i", 'class' => 'smwsort' ) ); |
666 | | - $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>'; |
667 | | - $result .= wfMsg( 'smw_qui_property' ); |
| 666 | + $result .= '<span class="smwquisortlabel"><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>'; |
| 667 | + $result .= wfMsg( 'smw_qui_property' ).'</span>'; |
668 | 668 | $result .= Html::input( 'property[' . $i . ']', $propertyValues[$key], 'text', array( 'size' => '35', 'id' => "property$i" ) ) . "\n"; |
669 | 669 | $result .= Html::openElement( 'select', array( 'name' => "order[$i]" ) ); |
670 | 670 | |
— | — | @@ -709,8 +709,8 @@ |
710 | 710 | * Make an element for additional categories |
711 | 711 | */ |
712 | 712 | $result .= Html::openElement( 'div', array( 'id' => "sort_div_$i", 'class' => 'smwsort' ) ); |
713 | | - $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>' . |
714 | | - wfMsg( 'smw_qui_category' ) . |
| 713 | + $result .= '<span class="smwquisortlabel"><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>' . |
| 714 | + wfMsg( 'smw_qui_category' ) .'</span>'. |
715 | 715 | Xml::input( "category[$i]", '25', $categoryValues[$key], array( 'id' => "category$i" ) ) . " " . |
716 | 716 | Html::hidden( "cat_label[$i]", $categoryLabelValues[$key], array( 'id' => "cat_label$i" ) ) . |
717 | 717 | Html::hidden( "cat_yes[$i]", $categoryYesValues[$key], array( 'id' => "cat_yes$i" ) ) . |
— | — | @@ -724,8 +724,8 @@ |
725 | 725 | * Make an element for main column |
726 | 726 | */ |
727 | 727 | $result .= Html::openElement( 'div', array( 'id' => "sort_div_$i", 'class' => 'smwsort' ) ) . |
728 | | - '<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>' . |
729 | | - wfMsg( 'smw_qui_rescol' ) . |
| 728 | + '<span class="smwquisortlabel"><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>' . |
| 729 | + wfMsg( 'smw_qui_rescol' ) .'</span>'. |
730 | 730 | Xml::input( "maincol_label[$i]", '20', $mainColumnLabels[$key], array ( 'id' => "maincol_label$i" ) ) . " " . |
731 | 731 | Xml::closeElement( 'div' ); |
732 | 732 | $i++; |
— | — | @@ -736,9 +736,9 @@ |
737 | 737 | |
738 | 738 | // create hidden form elements to be cloned later |
739 | 739 | $hiddenProperty = Html::openElement( 'div', array( 'id' => 'property_starter', 'class' => 'smwsort', 'style' => 'display:none' ) ) . |
740 | | - '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
741 | | - wfMsg( 'smw_qui_property' ) . |
742 | | - Xml::input( 'property_num', '35' ) . " " . |
| 740 | + '<span class="smwquisortlabel">'.'<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
| 741 | + wfMsg( 'smw_qui_property' ).'</span>'. |
| 742 | + Xml::input( 'property_num', '25' ) . " " . |
743 | 743 | Html::openElement( 'select', array( 'name' => 'order_num' ) ) . |
744 | 744 | Xml::option( wfMsg( 'smw_qui_nosort' ), 'NONE' ) . |
745 | 745 | Xml::option( wfMsg( 'smw_qui_ascorder' ), 'ASC' ) . |
— | — | @@ -752,8 +752,8 @@ |
753 | 753 | $hiddenProperty = json_encode( $hiddenProperty ); |
754 | 754 | |
755 | 755 | $hiddenCategory = Html::openElement( 'div', array( 'id' => 'category_starter', 'class' => 'smwsort', 'style' => 'display:none' ) ) . |
756 | | - '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
757 | | - wfMsg( 'smw_qui_category' ) . |
| 756 | + '<span class="smwquisortlabel">'.'<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
| 757 | + wfMsg( 'smw_qui_category' ) .'</span>'. |
758 | 758 | Xml::input( "category_num", '25' ) . " " . |
759 | 759 | '<input type="hidden" name="cat_label_num" />' . |
760 | 760 | '<input type="hidden" name="cat_yes_num" />' . |
— | — | @@ -762,9 +762,9 @@ |
763 | 763 | $hiddenCategory = json_encode( $hiddenCategory ); |
764 | 764 | |
765 | 765 | $hiddenMainColumn = Html::openElement( 'div', array( 'id' => 'maincol_starter', 'class' => 'smwsort', 'style' => 'display:none' ) ) . |
766 | | - '<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
767 | | - wfMsg( 'smw_qui_rescol' ) . |
768 | | - Xml::input( "maincol_label_num", '20' ) . " " . |
| 766 | + '<span class="smwquisortlabel">'.'<span class="smw-remove"><a><img src="' . $smwgScriptPath . '/skins/images/close-button.png" alt="' . wfMsg( 'smw_qui_delete' ) . '"></a></span>' . |
| 767 | + wfMsg( 'smw_qui_rescol' ) .'</span>'. |
| 768 | + Xml::input( "maincol_label_num", '25' ) . " " . |
769 | 769 | Xml::closeElement( 'div' ); |
770 | 770 | $hiddenMainColumn = json_encode( $hiddenMainColumn ); |
771 | 771 | |
— | — | @@ -790,9 +790,9 @@ |
791 | 791 | $categoryDialogBox = Xml::openElement( 'div', array( 'id' => 'cat-dialog', 'title' => wfMsg( 'smw_qui_catopts' ), 'class' => 'smwcatdialog' ) ) . |
792 | 792 | '<table>' . |
793 | 793 | '<tr><td>' . $categoryHtml[0] . '</td><td>' . $categoryHtml[1] . '</td></tr>' . |
| 794 | + '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' . |
794 | 795 | '<tr><td>' . $categoryYesHtml[0] . '</td><td>' . $categoryYesHtml[1] . '</td></tr>' . |
795 | 796 | '<tr><td>' . $categoryNoHtml[0] . '</td><td>' . $categoryNoHtml[1] . '</td></tr>' . |
796 | | - '<tr><td>' . $categoryLabelHtml[0] . '</td><td>' . $categoryLabelHtml[1] . '</td></tr>' . |
797 | 797 | '</table>' . |
798 | 798 | Xml::closeElement( 'div' ); |
799 | 799 | |
— | — | @@ -1062,7 +1062,19 @@ |
1063 | 1063 | } |
1064 | 1064 | }); |
1065 | 1065 | jQuery('#sort-more').click(function(){jQuery('#prop-dialog').dialog("open");}); |
1066 | | - |
| 1066 | + jQuery('#d-category').bind('change keyup focus click',function(){ |
| 1067 | + if(jQuery(this).attr('value')==''){ |
| 1068 | + jQuery('#d-category-yes').css('visibility','hidden'); |
| 1069 | + jQuery('#d-category-no').css('visibility','hidden'); |
| 1070 | + jQuery('#cat-dialog [for="d-category-no"]').css('visibility','hidden'); |
| 1071 | + jQuery('#cat-dialog [for="d-category-yes"]').css('visibility','hidden'); |
| 1072 | + } else { |
| 1073 | + jQuery('#d-category-yes').css('visibility','visible'); |
| 1074 | + jQuery('#d-category-no').css('visibility','visible'); |
| 1075 | + jQuery('#cat-dialog [for="d-category-no"]').css('visibility','visible'); |
| 1076 | + jQuery('#cat-dialog [for="d-category-yes"]').css('visibility','visible'); |
| 1077 | + } |
| 1078 | + }); |
1067 | 1079 | }); |
1068 | 1080 | |
1069 | 1081 | jQuery(document).ready(smw_property_autocomplete); |
Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_SpecialQueryCreator.php |
— | — | @@ -87,7 +87,7 @@ |
88 | 88 | // Main query and format options |
89 | 89 | $result .= $this->getQueryFormBox(); |
90 | 90 | // sorting and prinouts |
91 | | - $result .= '<div class="smw-qc-sortbox" style="padding-left:10px;">' . $this->getPoSortFormBox() . '</div>'; |
| 91 | + $result .= '<div class="smwqcsortbox">' . $this->getPoSortFormBox() . '</div>'; |
92 | 92 | // additional options |
93 | 93 | //START: show|hide additional options |
94 | 94 | $result .= '<div class="smwqcformatas"><strong>'.wfMsg('smw_ask_format_as').'</strong>'; |
Index: trunk/extensions/SemanticMediaWiki/skins/SMW_custom.css |
— | — | @@ -139,9 +139,15 @@ |
140 | 140 | span.smw-remove a img{ |
141 | 141 | text-decoration: none; |
142 | 142 | margin-right: 5px; |
143 | | - vertical-align: -3px; |
| 143 | + vertical-align: -0.25em; |
| 144 | + margin-left: -30px; |
| 145 | + |
144 | 146 | } |
145 | 147 | |
| 148 | +div.smwqcsortbox{ |
| 149 | + padding-left: 35px; |
| 150 | +} |
| 151 | + |
146 | 152 | .smwpropdialog input, .smwpropdialog select{ |
147 | 153 | margin-top: 10px; |
148 | 154 | margin-right: 5px; |
— | — | @@ -165,6 +171,11 @@ |
166 | 172 | margin-top: 15px; |
167 | 173 | margin-bottom: 0px; |
168 | 174 | } |
| 175 | + |
| 176 | +.smwquisortlabel{ |
| 177 | + width: 12em; |
| 178 | + float: left; |
| 179 | +} |
169 | 180 | /* search, browse, RDF icons */ |
170 | 181 | |
171 | 182 | span.smwsearchicon { /*FIXME: this was only used for Factbox docu, should be removed from code*/ |