Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -18,7 +18,7 @@ |
19 | 19 | private static $styleFiles = array( |
20 | 20 | 'base_sets' => array( |
21 | 21 | 'raw' => array( |
22 | | - array( 'src' => 'css/suggestions.css', 'version' => 7 ), |
| 22 | + array( 'src' => 'css/suggestions.css', 'version' => 8 ), |
23 | 23 | array( 'src' => 'css/vector.collapsibleNav.css', 'version' => 7 ), |
24 | 24 | array( 'src' => 'css/vector.footerCleanup.css', 'version' => 1 ), |
25 | 25 | array( 'src' => 'css/wikiEditor.css', 'version' => 12 ), |
— | — | @@ -29,11 +29,11 @@ |
30 | 30 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
31 | 31 | ), |
32 | 32 | 'combined' => array( |
33 | | - array( 'src' => 'css/combined.css', 'version' => 81 ), |
| 33 | + array( 'src' => 'css/combined.css', 'version' => 82 ), |
34 | 34 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
35 | 35 | ), |
36 | 36 | 'minified' => array( |
37 | | - array( 'src' => 'css/combined.min.css', 'version' => 81 ), |
| 37 | + array( 'src' => 'css/combined.min.css', 'version' => 82 ), |
38 | 38 | array( 'src' => 'css/vector/jquery-ui-1.7.2.css', 'version' => '1.7.2y' ), |
39 | 39 | ), |
40 | 40 | ) |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | array( 'src' => 'js/plugins/jquery.color.js', 'version' => 1 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.cookie.js', 'version' => 4 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
74 | | - array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 8 ), |
| 74 | + array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 9 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 179 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 52 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 368 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 369 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 368 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 369 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/css/suggestions.css |
— | — | @@ -28,10 +28,7 @@ |
29 | 29 | background-color: #4C59A6; |
30 | 30 | background-color: Highlight; |
31 | 31 | } |
32 | | -.suggestions-special:hover .special-label { |
33 | | - color: white; |
34 | | - color: HighlightText; |
35 | | -} |
| 32 | +.suggestions-special:hover .special-label, |
36 | 33 | .suggestions-special:hover .special-query { |
37 | 34 | color: white; |
38 | 35 | color: HighlightText; |
Index: trunk/extensions/UsabilityInitiative/css/combined.css |
— | — | @@ -28,10 +28,7 @@ |
29 | 29 | background-color: #4C59A6; |
30 | 30 | background-color: Highlight; |
31 | 31 | } |
32 | | -.suggestions-special:hover .special-label { |
33 | | - color: white; |
34 | | - color: HighlightText; |
35 | | -} |
| 32 | +.suggestions-special:hover .special-label, |
36 | 33 | .suggestions-special:hover .special-query { |
37 | 34 | color: white; |
38 | 35 | color: HighlightText; |
Index: trunk/extensions/UsabilityInitiative/css/combined.min.css |
— | — | @@ -26,10 +26,7 @@ |
27 | 27 | background-color:#4C59A6; |
28 | 28 | background-color:Highlight; |
29 | 29 | } |
30 | | -.suggestions-special:hover .special-label{ |
31 | | -color:white; |
32 | | -color:HighlightText; |
33 | | -} |
| 30 | +.suggestions-special:hover .special-label, |
34 | 31 | .suggestions-special:hover .special-query{ |
35 | 32 | color:white; |
36 | 33 | color:HighlightText; |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js |
— | — | @@ -93,7 +93,7 @@ |
94 | 94 | // Only hook this up the first time |
95 | 95 | if ( $special.children().length == 0 ) { |
96 | 96 | $special.mousemove( function() { |
97 | | - $.suggestions.highlight( context, $(), false ); |
| 97 | + $.suggestions.highlight( context, $( [] ), false ); |
98 | 98 | } ); |
99 | 99 | } |
100 | 100 | context.config.special.render.call( $special, context.data.$textbox.val() ); |
— | — | @@ -321,7 +321,7 @@ |
322 | 322 | '$textbox': $(this) |
323 | 323 | }; |
324 | 324 | context.data.$textbox.mousemove( function() { |
325 | | - $.suggestions.highlight( context, $(), false ); |
| 325 | + $.suggestions.highlight( context, $( [] ), false ); |
326 | 326 | } ); |
327 | 327 | context.data.$container = $( '<div />' ) |
328 | 328 | .css( { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -5831,7 +5831,7 @@ |
5832 | 5832 | // Only hook this up the first time |
5833 | 5833 | if ( $special.children().length == 0 ) { |
5834 | 5834 | $special.mousemove( function() { |
5835 | | - $.suggestions.highlight( context, $(), false ); |
| 5835 | + $.suggestions.highlight( context, $( [] ), false ); |
5836 | 5836 | } ); |
5837 | 5837 | } |
5838 | 5838 | context.config.special.render.call( $special, context.data.$textbox.val() ); |
— | — | @@ -6059,7 +6059,7 @@ |
6060 | 6060 | '$textbox': $(this) |
6061 | 6061 | }; |
6062 | 6062 | context.data.$textbox.mousemove( function() { |
6063 | | - $.suggestions.highlight( context, $(), false ); |
| 6063 | + $.suggestions.highlight( context, $( [] ), false ); |
6064 | 6064 | } ); |
6065 | 6065 | context.data.$container = $( '<div />' ) |
6066 | 6066 | .css( { |
— | — | @@ -6917,7 +6917,7 @@ |
6918 | 6918 | } |
6919 | 6919 | break; |
6920 | 6920 | case 86: //v |
6921 | | - if ( event.ctrlKey ){ |
| 6921 | + if ( event.ctrlKey && $.browser.msie ) { |
6922 | 6922 | //paste, intercepted for IE |
6923 | 6923 | context.evt.paste( event ); |
6924 | 6924 | } |
— | — | @@ -6971,7 +6971,6 @@ |
6972 | 6972 | // Save the cursor position to restore it after all this voodoo |
6973 | 6973 | var cursorPos = context.fn.getCaretPosition(); |
6974 | 6974 | var oldLength = context.fn.getContents().length; |
6975 | | - |
6976 | 6975 | context.$content.find( ':not(.wikiEditor)' ).addClass( 'wikiEditor' ); |
6977 | 6976 | if ( $.layout.name !== 'webkit' ) { |
6978 | 6977 | context.$content.addClass( 'pasting' ); |
— | — | @@ -8985,7 +8984,7 @@ |
8986 | 8985 | |
8987 | 8986 | // Remove this marker |
8988 | 8987 | var marker = $(this).data( 'marker' ); |
8989 | | - if ( typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
| 8988 | + if ( marker && typeof marker.skipDivision != 'undefined' && ( division == marker.skipDivision ) ) { |
8990 | 8989 | // Don't remove these either |
8991 | 8990 | return true; |
8992 | 8991 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -393,7 +393,7 @@ |
394 | 394 | if(typeof context.config.cancel=='function'){context.config.cancel.call(context.data.$textbox);}},restore:function(context){context.data.$textbox.val(context.data.prevText);},update:function(context,delayed){function maybeFetch(){if(context.data.$textbox.val()!==context.data.prevText){context.data.prevText=context.data.$textbox.val();if(typeof context.config.fetch=='function'){context.config.fetch.call(context.data.$textbox,context.data.$textbox.val());}}} |
395 | 395 | if(context.data.timerID!=null){clearTimeout(context.data.timerID);} |
396 | 396 | if(delayed){context.data.timerID=setTimeout(maybeFetch,context.config.delay);}else{maybeFetch();} |
397 | | -$.suggestions.special(context);},special:function(context){if(typeof context.config.special.render=='function'){setTimeout(function(){$special=context.data.$container.find('.suggestions-special');if($special.children().length==0){$special.mousemove(function(){$.suggestions.highlight(context,$(),false);});} |
| 397 | +$.suggestions.special(context);},special:function(context){if(typeof context.config.special.render=='function'){setTimeout(function(){$special=context.data.$container.find('.suggestions-special');if($special.children().length==0){$special.mousemove(function(){$.suggestions.highlight(context,$([]),false);});} |
398 | 398 | context.config.special.render.call($special,context.data.$textbox.val());},1);}},configure:function(context,property,value){switch(property){case'fetch':case'cancel':case'special':case'result':case'$region':context.config[property]=value;break;case'suggestions':context.config[property]=value;if(typeof context.data!=='undefined'){if(context.data.$textbox.val().length==0){context.data.$container.hide();}else{context.data.$container.show();context.data.$container.css({'top':context.config.$region.offset().top+context.config.$region.outerHeight(),'bottom':'auto','width':context.config.$region.outerWidth(),'height':'auto','left':context.config.$region.offset().left,'right':'auto'});var $results=context.data.$container.children('.suggestions-results');$results.empty();for(var i=0;i<context.config.suggestions.length;i++){$result=$('<div />').addClass('suggestions-result').attr('rel',i).data('text',context.config.suggestions[i]).mouseover(function(e){$.suggestions.highlight(context,$(this).closest('.suggestions-results div'),false);}).appendTo($results);if(typeof context.config.result.render=='function'){context.config.result.render.call($result,context.config.suggestions[i]);}else{$result.text(context.config.suggestions[i]).autoEllipsis();}}}} |
399 | 399 | break;case'maxRows':context.config[property]=Math.max(1,Math.min(100,value));break;case'delay':context.config[property]=Math.max(0,Math.min(1200,value));break;case'submitOnClick':context.config[property]=value?true:false;break;}},highlight:function(context,result,updateTextbox){var selected=context.data.$container.find('.suggestions-result-current');if(!result.get||selected.get(0)!=result.get(0)){if(result=='prev'){result=selected.prev();}else if(result=='next'){if(selected.size()==0) |
400 | 400 | result=context.data.$container.find('.suggestions-results div:first');else{result=selected.next();if(result.size()==0) |
— | — | @@ -406,7 +406,7 @@ |
407 | 407 | break;default:$.suggestions.update(context,true);break;} |
408 | 408 | if(preventDefault){e.preventDefault();e.stopImmediatePropagation();}}};$.fn.suggestions=function(){var returnValue=null;var args=arguments;$(this).each(function(){var context=$(this).data('suggestions-context');if(typeof context=='undefined'){context={config:{'fetch':function(){},'cancel':function(){},'special':{},'result':{},'$region':$(this),'suggestions':[],'maxRows':7,'delay':120,'submitOnClick':false}};} |
409 | 409 | if(args.length>0){if(typeof args[0]=='object'){for(var key in args[0]){$.suggestions.configure(context,key,args[0][key]);}}else if(typeof args[0]=='string'){if(args.length>1){$.suggestions.configure(context,args[0],args[1]);}else if(returnValue==null){returnValue=(args[0]in context.config?undefined:context.config[args[0]]);}}} |
410 | | -if(typeof context.data=='undefined'){context.data={'timerID':null,'prevText':null,'visibleResults':0,'mouseDownOn':$([]),'$textbox':$(this)};context.data.$textbox.mousemove(function(){$.suggestions.highlight(context,$(),false);});context.data.$container=$('<div />').css({'top':Math.round(context.data.$textbox.offset().top+context.data.$textbox.outerHeight()),'left':Math.round(context.data.$textbox.offset().left),'width':context.data.$textbox.outerWidth(),'display':'none'}).addClass('suggestions').append($('<div />').addClass('suggestions-results').mousedown(function(e){context.data.mouseDownOn=$(e.target).closest('.suggestions-results div');}).mouseup(function(e){var $result=$(e.target).closest('.suggestions-results div');var $other=context.data.mouseDownOn;context.data.mouseDownOn=$([]);if($result.get(0)!=$other.get(0)){return;} |
| 410 | +if(typeof context.data=='undefined'){context.data={'timerID':null,'prevText':null,'visibleResults':0,'mouseDownOn':$([]),'$textbox':$(this)};context.data.$textbox.mousemove(function(){$.suggestions.highlight(context,$([]),false);});context.data.$container=$('<div />').css({'top':Math.round(context.data.$textbox.offset().top+context.data.$textbox.outerHeight()),'left':Math.round(context.data.$textbox.offset().left),'width':context.data.$textbox.outerWidth(),'display':'none'}).addClass('suggestions').append($('<div />').addClass('suggestions-results').mousedown(function(e){context.data.mouseDownOn=$(e.target).closest('.suggestions-results div');}).mouseup(function(e){var $result=$(e.target).closest('.suggestions-results div');var $other=context.data.mouseDownOn;context.data.mouseDownOn=$([]);if($result.get(0)!=$other.get(0)){return;} |
411 | 411 | $.suggestions.highlight(context,$result,true);context.data.$container.hide();if(typeof context.config.result.select=='function'){context.config.result.select.call($result,context.data.$textbox);} |
412 | 412 | context.data.$textbox.focus();})).append($('<div />').addClass('suggestions-special').mousedown(function(e){context.data.mouseDownOn=$(e.target).closest('.suggestions-special');}).mouseup(function(e){var $special=$(e.target).closest('.suggestions-special');var $other=context.data.mouseDownOn;context.data.mouseDownOn=$([]);if($special.get(0)!=$other.get(0)){return;} |
413 | 413 | context.data.$container.hide();if(typeof context.config.special.select=='function'){context.config.special.select.call($special,context.data.$textbox);} |
— | — | @@ -459,7 +459,7 @@ |
460 | 460 | return false;} |
461 | 461 | break;case 9:if(event.ctrlKey||event.altKey||event.shiftKey){return true;}else{var $tabindexList=$j('[tabindex]:visible').sort(function(a,b){return a.tabIndex-b.tabIndex;});for(var i=0;i<$tabindexList.length;i++){if($tabindexList.eq(i).attr('id')==context.$iframe.attr('id')){$tabindexList.get(i+1).focus();break;}} |
462 | 462 | return false;} |
463 | | -break;case 86:if(event.ctrlKey){context.evt.paste(event);} |
| 463 | +break;case 86:if(event.ctrlKey&&$.browser.msie){context.evt.paste(event);} |
464 | 464 | break;} |
465 | 465 | return true;},'change':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldHTML!=newHTML){context.fn.purgeOffsets();context.oldHTML=newHTML;event.data.scope='realchange';} |
466 | 466 | if(context.$content.children().length==0){context.$content.append('<p></p>');} |
— | — | @@ -614,7 +614,7 @@ |
615 | 615 | $(anchor).data('marker',markers[i]).addClass('wikiEditor-highlight');markers[i].afterWrap(anchor,markers[i]);}else{$(anchor).data('marker',markers[i]);markers[i].onSkip(anchor);} |
616 | 616 | visited[v++]=anchor;}} |
617 | 617 | var j=0;context.$content.find('.wikiEditor-highlight').each(function(){if(visited[j]==this){j++;return true;} |
618 | | -var marker=$(this).data('marker');if(typeof marker.skipDivision!='undefined'&&(division==marker.skipDivision)){return true;} |
| 618 | +var marker=$(this).data('marker');if(marker&&typeof marker.skipDivision!='undefined'&&(division==marker.skipDivision)){return true;} |
619 | 619 | if(marker&&typeof marker.beforeUnwrap=='function') |
620 | 620 | marker.beforeUnwrap(this);if((marker&&marker.anchor=='tag')||$(this).is('p')){$(this).removeAttr('class');}else{$(this).replaceWith(this.childNodes);} |
621 | 621 | context.fn.purgeOffsets();});}}};})(jQuery);(function($){$.wikiEditor.modules.preview={'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',3]],'opera':[['>=',9.6]],'safari':[['>=',4]]}},fn:{create:function(context,config){if('initialized'in context.modules.preview){return;} |