r36216 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r36215‎ | r36216 | r36217 >
Date:02:57, 12 June 2008
Author:dale
Status:old
Tags:
Comment:
fixes for mvpcf skin
Modified paths:
  • /branches/MetavidWiki-exp/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/languages/MV_Messages.php (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_allpages.js (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_custom.css (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.autocomplete.js (modified) (history)
  • /branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.css (modified) (history)

Diff [purge]

Index: branches/MetavidWiki-exp/MetavidWiki/includes/specials/MV_SpecialMediaSearch.php
@@ -646,23 +646,23 @@
647647 $val = str_replace(' ','_',$val);
648648
649649 //make sure people know they can "search" too (formated by
650 - $out='do_search|'.wfMsg('mv_search_transcripts_for').' <B>$1</B>|no_image'."\n";
 650+ $out='do_search|'.wfMsg('mv_search_transcripts_for','<B>$1</B>').'|no_image'."\n";
651651 //get people
652652 $person_out = MV_SpecialMediaSearch::auto_complete_person($val, 3);
653653 if($person_out!=''){
654 - $out.='Category:Person|<h2>People:</h2> |no_image'."\n";
 654+ $out.='Category:Person|<h6>'.wfMsg('mv_people_matches').'</h6>|no_image'."\n";
655655 $out.=$person_out;
656656 }
657657 //get bills
658658 $bill_out = MV_SpecialMediaSearch::auto_complete_category('Bill', $val, 3);
659659 if($bill_out!=''){
660 - $out.='Category:Bill|<h2>Bills:</h2>|no_image'."\n";
 660+ $out.='Category:Bill|<h6>'.wfMsg('mv_bill_matches').'</h6>|no_image'."\n";
661661 $out.=$bill_out;
662662 }
663663 //get intrests
664664 $intrest_out = MV_SpecialMediaSearch::auto_complete_category('Interest_Group', $val, 3);
665665 if($intrest_out!=''){
666 - $out.='Category:Interest Group|<h2>Interest Group:</h2>|no_image'."\n";
 666+ $out.='Category:Interest Group|<h6>'.wfMsg('mv_interest_group_matches').'</h6>|no_image'."\n";
667667 $out.=$intrest_out;
668668 }
669669 return $out;
Index: branches/MetavidWiki-exp/MetavidWiki/languages/MV_Messages.php
@@ -84,7 +84,7 @@
8585 #tools
8686 'mv_tool_search' => 'Search',
8787 'mv_tool_search_title' => 'Search within this Stream',
88 - 'mv_search_transcripts_for' => 'Search transcripts for',
 88+ 'mv_search_transcripts_for' => 'Search videos for $1 (hide this box)',
8989 'mv_tool_navigate' => 'Navigate',
9090 'mv_tool_navigate_title' => 'Navigate the full stream',
9191 'mv_tool_export' => 'Export',
@@ -99,7 +99,11 @@
100100 'mv_watch_clip' => 'Watch Clip',
101101 'mv_close_clip' => 'Close Clip',
102102 'mv_improve_transcript' => 'Improve Transcript',
 103+ 'mv_people_matches' => 'People Matches',
 104+ 'mv_bill_matches' => 'Bill Matches',
 105+ 'mv_interest_group_matches' => 'Interest Group Matches',
103106
 107+
104108 #mvd types:
105109 'ht_en' => 'Transcript',
106110 'ht_en_desc' => 'English transcripts. This overlay type is for spoken text',
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_custom.css
@@ -139,7 +139,7 @@
140140 }
141141
142142 .ac_loading {
143 - background : Window url('./images/indicator.gif') right center no-repeat;
 143+ background : Window url('images/indicator.gif') right center no-repeat;
144144 }
145145
146146 .ac_over {
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_allpages.js
@@ -15,7 +15,7 @@
1616 mvJsLoader.doLoad(
1717 reqLibs, function(){
1818 //js_log('allpage_ auto and hover check'+mv_setup_allpage_flag);
19 - if(!mv_setup_allpage_flag){//have no idea why this gets called twice
 19+ if(!mv_setup_allpage_flag){
2020 mv_setup_search_ac();
2121 mv_do_mvd_link_rewrite();
2222 mv_setup_allpage_flag=true;
@@ -154,7 +154,7 @@
155155 function mv_setup_search_ac(){
156156 var uri = wgScript;
157157 //add the person choices div to searchInput
158 - var obj = $j('#searchInput').get(0);
 158+ /*var obj = $j('#searchInput').get(0);
159159 //base offset:
160160 var curleft=55;
161161 var curtop=20;
@@ -168,39 +168,41 @@
169169 //get the search pos:
170170 $j('body').append('<div class="ac_results" id="mv_ac_choices" ' +
171171 'style="border:solid black;background:#FFF;position:absolute;left:'+curleft+'px;top:'+curtop+'px;z-index:99;width:300px;display: none;"/>');
 172+ */
172173 //turn off browser baseed autocomplete:
173 - $j('#searchInput').attr('autocomplete',"off");
 174+ $j('#search_field').attr('autocomplete',"off");
174175 //add hook:
175 - $j('#searchInput').autocomplete(
 176+ $j('#search_field').autocomplete(
176177 uri,
177178 {
178179 autoFill:false,
179180 onItemSelect:function(v){
180181 //alert('selected:' + v.innerHTML + ' page:'+$j('#searchInput').val());
181182 //jump to page:
182 - if($j('#searchInput').val()=='do_search'){
 183+ if($j('#search_field').val()=='do_search'){
183184 qs = v.innerHTML.toLowerCase().indexOf('<b>')+3;
184185 qe = v.innerHTML.toLowerCase().indexOf('</b>');
185186 //update the search input (incase redirect fails)
186 - $j('#searchInput').val(v.innerHTML.substring(qs,qe));
 187+ $j('#search_field').val(v.innerHTML.substring(qs,qe));
187188 window.location=uri+'/'+'Special:Search?search='+v.innerHTML.substring(qs,qe);
188189 }else{
189 - window.location =uri+'/'+$j('#searchInput').val();
 190+ window.location =uri+'/'+$j('#search_field').val();
190191 }
191192 },
192193 formatItem:function(row){
193194 if(row[0]=='do_search'){
194 - return row[1].replace('$1',$j('#searchInput').val());
 195+ return row[1].replace('$1',$j('#search_field').val());
195196 }else if(row[2]=='no_image'){
196197 return row[1];
197198 }else{
198 - return '<img width="44" src="'+ row[2] + '">'+row[1];
 199+ return '<img width="44" src="'+ row[2] + '"><span class="ac_img_txt">'+row[1]+'</span>';
199200 }
200201 },
201202 matchSubset:0,
202203 extraParams:{action:'ajax',rs:'mv_auto_complete_all'},
203204 paramName:'rsargs[]',
204 - resultElem:'#mv_ac_choices'
 205+ resultElem:'#suggestionsInner',
 206+ resultContainer:'#suggestions'
205207 });
206208 //var offset = $j('#mv_person_input_'+inx).offset();
207209 //$j('#mv_person_choices_'+inx).css('left', offset.left-205);
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/jquery/plugins/jquery.autocomplete.js
@@ -235,6 +235,9 @@
236236 }else{
237237 $results.show();
238238 }
 239+ if(options.resultContainer){
 240+ $(options.resultContainer).show();
 241+ }
239242 };
240243
241244 function hideResults() {
@@ -248,6 +251,9 @@
249252 if ($results.is(":visible")) {
250253 $results.hide();
251254 }
 255+ if(options.resultContainer){
 256+ $(options.resultContainer).hide();
 257+ }
252258 if (options.mustMatch) {
253259 var v = $input.val();
254260 if (v != input.lastSelected) {
@@ -293,6 +299,8 @@
294300
295301 function dataToDom(data) {
296302 var ul = document.createElement("ul");
 303+ if(options.ul_class)$(ul).addClass(options.ul_class);
 304+
297305 var num = data.length;
298306
299307 // limited results to a max number
@@ -481,7 +489,7 @@
482490 options.paramName = options.paramName || 'q';
483491
484492 options.inputClass = options.inputClass || "ac_input";
485 - options.resultsClass = options.resultsClass || "ac_results";
 493+ options.resultsClass = options.resultsClass || "ac_results";
486494 options.lineSeparator = options.lineSeparator || "\n";
487495 options.cellSeparator = options.cellSeparator || "|";
488496 options.minChars = options.minChars || 1;
Index: branches/MetavidWiki-exp/MetavidWiki/skins/mv_embed/mv_embed.css
@@ -15,6 +15,9 @@
1616 font-size:14px;
1717 float:left;
1818 }
 19+.set_ogg_player_pref{
 20+ text-align:left;
 21+}
1922
2023 .inputTrackerInput {
2124 height:20;

Status & tagging log