Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.delayedBind.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 16 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.expandableField.js', 'version' => 15 ), |
76 | | - array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 17 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 18 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 33 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 187 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 53 ), |
— | — | @@ -85,10 +85,10 @@ |
86 | 86 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 5 ), |
87 | 87 | ), |
88 | 88 | 'combined' => array( |
89 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 399 ), |
| 89 | + array( 'src' => 'js/plugins.combined.js', 'version' => 400 ), |
90 | 90 | ), |
91 | 91 | 'minified' => array( |
92 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 399 ), |
| 92 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 400 ), |
93 | 93 | ), |
94 | 94 | ), |
95 | 95 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.suggestions.js |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * maxExpandFactor: Maximum suggestions box width relative to the textbox width. If set to e.g. 2, the suggestions box |
38 | 38 | * will never be grown beyond 2 times the width of the textbox. |
39 | 39 | * Type: Number, Range: 1 - infinity, Default: 2 |
40 | | - * positionFromLeft: Wether to position the suggestion box with the left attribute or the right |
| 40 | + * positionFromLeft: Whether to position the suggestion box with the left attribute or the right |
41 | 41 | * Type: Boolean, Default: true |
42 | 42 | */ |
43 | 43 | ( function( $ ) { |
— | — | @@ -134,11 +134,9 @@ |
135 | 135 | 'height': 'auto' |
136 | 136 | } |
137 | 137 | if ( context.config.positionFromLeft ) { |
138 | | - console.log("LEFT"); |
139 | 138 | newCSS['left'] = context.config.$region.offset().left; |
140 | 139 | newCSS['right'] = 'auto'; |
141 | 140 | } else { |
142 | | - console.log("right"); |
143 | 141 | newCSS['left'] = 'auto'; |
144 | 142 | newCSS['right'] = $( 'body' ).width() - ( context.config.$region.offset().left + context.config.$region.outerWidth() ); |
145 | 143 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -5793,7 +5793,7 @@ |
5794 | 5794 | * maxExpandFactor: Maximum suggestions box width relative to the textbox width. If set to e.g. 2, the suggestions box |
5795 | 5795 | * will never be grown beyond 2 times the width of the textbox. |
5796 | 5796 | * Type: Number, Range: 1 - infinity, Default: 2 |
5797 | | - * positionFromLeft: Wether to position the suggestion box with the left attribute or the right |
| 5797 | + * positionFromLeft: Whether to position the suggestion box with the left attribute or the right |
5798 | 5798 | * Type: Boolean, Default: true |
5799 | 5799 | */ |
5800 | 5800 | ( function( $ ) { |
— | — | @@ -5891,11 +5891,9 @@ |
5892 | 5892 | 'height': 'auto' |
5893 | 5893 | } |
5894 | 5894 | if ( context.config.positionFromLeft ) { |
5895 | | - console.log("LEFT"); |
5896 | 5895 | newCSS['left'] = context.config.$region.offset().left; |
5897 | 5896 | newCSS['right'] = 'auto'; |
5898 | 5897 | } else { |
5899 | | - console.log("right"); |
5900 | 5898 | newCSS['left'] = 'auto'; |
5901 | 5899 | newCSS['right'] = $( 'body' ).width() - ( context.config.$region.offset().left + context.config.$region.outerWidth() ); |
5902 | 5900 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -396,7 +396,7 @@ |
397 | 397 | if(context.data.timerID!=null){clearTimeout(context.data.timerID);} |
398 | 398 | if(delayed){context.data.timerID=setTimeout(maybeFetch,context.config.delay);}else{maybeFetch();} |
399 | 399 | $.suggestions.special(context);},special:function(context){if(typeof context.config.special.render=='function'){setTimeout(function(){$special=context.data.$container.find('.suggestions-special');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();var newCSS={'top':context.config.$region.offset().top+context.config.$region.outerHeight(),'bottom':'auto','width':context.config.$region.outerWidth(),'height':'auto'} |
400 | | -if(context.config.positionFromLeft){console.log("LEFT");newCSS['left']=context.config.$region.offset().left;newCSS['right']='auto';}else{console.log("right");newCSS['left']='auto';newCSS['right']=$('body').width()-(context.config.$region.offset().left+context.config.$region.outerWidth());} |
| 400 | +if(context.config.positionFromLeft){newCSS['left']=context.config.$region.offset().left;newCSS['right']='auto';}else{newCSS['left']='auto';newCSS['right']=$('body').width()-(context.config.$region.offset().left+context.config.$region.outerWidth());} |
401 | 401 | context.data.$container.css(newCSS);var $results=context.data.$container.children('.suggestions-results');$results.empty();var expWidth=-1;var $autoEllipseMe=$([]);for(var i=0;i<context.config.suggestions.length;i++){var $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.append($('<span />').css('whiteSpace','nowrap').text(context.config.suggestions[i]));var $span=$result.children('span');if($span.width()>$result.width()){expWidth=Math.max(expWidth,Math.min($span.width(),context.data.$textbox.width()*context.config.maxExpandFactor));} |
402 | 402 | $autoEllipseMe=$autoEllipseMe.add($result);}} |
403 | 403 | if(expWidth!=-1){context.data.$container.width(expWidth);} |