Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/OptIn |
___________________________________________________________________ |
Name: svn:mergeinfo |
1 | 1 | - /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646 |
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62274,62380,62384,62392-62396 |
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
2 | 2 | + /branches/REL1_15/phase3/extensions/UsabilityInitiative/OptIn:51646 |
/trunk/extensions/UsabilityInitiative/OptIn:56207,56209,56296,56333,56355,62041,62043,62127,62139-62140,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396 |
/trunk/phase3/extensions/UsabilityInitiative/OptIn:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
3 | 3 | - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62392-62396 |
4 | 4 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396 |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js |
___________________________________________________________________ |
Name: svn:mergeinfo |
5 | 5 | - /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62392-62396 |
6 | 6 | + /trunk/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js:62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396 |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -77,15 +77,33 @@ |
78 | 78 | * is essentially to blacklist rather than whitelist are debateable, but at this point we've decided it's the more |
79 | 79 | * "open-web" way to go. |
80 | 80 | */ |
81 | | - 'isSupported': function() { |
82 | | - // Check for and make use of a cached return value |
83 | | - if ( typeof $.wikiEditor.supported != 'undefined' ) { |
84 | | - return $.wikiEditor.supported; |
| 81 | + 'isSupported': function( module ) { |
| 82 | + // Check for and make use of cached value and early opportunities to bail |
| 83 | + if ( module ) { |
| 84 | + // If the module doesn't exist, it's clearly not supported |
| 85 | + if ( typeof $.wikiEditor.modules[module] == 'undefined' ) { |
| 86 | + return false; |
| 87 | + } else if ( typeof $.wikiEditor.modules[module].supported !== 'undefined' ) { |
| 88 | + // Cache hit |
| 89 | + return $.wikiEditor.modules[module].supported; |
| 90 | + } |
| 91 | + } else { |
| 92 | + if ( typeof $.wikiEditor.supported !== 'undefined' ) { |
| 93 | + // Cache hit |
| 94 | + return $.wikiEditor.supported; |
| 95 | + } |
85 | 96 | } |
| 97 | + // Provide quick way to cache support |
| 98 | + function cacheSupport( value ) { |
| 99 | + return module ? $.wikiEditor.modules[module].supported = value : $.wikiEditor.supported = value; |
| 100 | + } |
| 101 | + // Fallback to the wikiEditor browser map if no special map is provided in the module |
| 102 | + var map = module && 'browsers' in $.wikiEditor.modules[module] ? |
| 103 | + $.wikiEditor.modules[module].browsers : $.wikiEditor.browsers; |
86 | 104 | // Check if we have any compatiblity information on-hand for the current browser |
87 | 105 | if ( !( $.browser.name in $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'] ) ) { |
88 | 106 | // Assume good faith :) |
89 | | - return $.wikiEditor.supported = true; |
| 107 | + return cacheSupport( true ); |
90 | 108 | } |
91 | 109 | // Check over each browser condition to determine if we are running in a compatible client |
92 | 110 | var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name]; |
— | — | @@ -94,16 +112,16 @@ |
95 | 113 | var val = browser[condition][1]; |
96 | 114 | if ( typeof val == 'string' ) { |
97 | 115 | if ( !( eval( '$.browser.version' + op + '"' + val + '"' ) ) ) { |
98 | | - return $.wikiEditor.supported = false; |
| 116 | + return cacheSupport( false ); |
99 | 117 | } |
100 | 118 | } else if ( typeof val == 'number' ) { |
101 | 119 | if ( !( eval( '$.browser.versionNumber' + op + val ) ) ) { |
102 | | - return $.wikiEditor.supported = false; |
| 120 | + return cacheSupport( false ); |
103 | 121 | } |
104 | 122 | } |
105 | 123 | } |
106 | 124 | // Return and also cache the return value - this will be checked somewhat often |
107 | | - return $.wikiEditor.supported = true; |
| 125 | + return cacheSupport( true ); |
108 | 126 | }, |
109 | 127 | /** |
110 | 128 | * Provides a way to extract messages from objects. Wraps the mw.usability.getMsg() function, which |
— | — | @@ -236,8 +254,8 @@ |
237 | 255 | modules = data; |
238 | 256 | } |
239 | 257 | for ( var module in modules ) { |
240 | | - // Check for the existance of an available module with a matching name and a create function |
241 | | - if ( typeof module == 'string' && module in $.wikiEditor.modules ) { |
| 258 | + // Check for the existance of an available / supported module with a matching name and a create function |
| 259 | + if ( typeof module == 'string' && $.wikiEditor.isSupported( module ) ) { |
242 | 260 | // Extend the context's core API with this module's own API calls |
243 | 261 | if ( 'api' in $.wikiEditor.modules[module] ) { |
244 | 262 | for ( var call in $.wikiEditor.modules[module].api ) { |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6510,15 +6510,33 @@ |
6511 | 6511 | * is essentially to blacklist rather than whitelist are debateable, but at this point we've decided it's the more |
6512 | 6512 | * "open-web" way to go. |
6513 | 6513 | */ |
6514 | | - 'isSupported': function() { |
6515 | | - // Check for and make use of a cached return value |
6516 | | - if ( typeof $.wikiEditor.supported != 'undefined' ) { |
6517 | | - return $.wikiEditor.supported; |
| 6514 | + 'isSupported': function( module ) { |
| 6515 | + // Check for and make use of cached value and early opportunities to bail |
| 6516 | + if ( module ) { |
| 6517 | + // If the module doesn't exist, it's clearly not supported |
| 6518 | + if ( typeof $.wikiEditor.modules[module] == 'undefined' ) { |
| 6519 | + return false; |
| 6520 | + } else if ( typeof $.wikiEditor.modules[module].supported !== 'undefined' ) { |
| 6521 | + // Cache hit |
| 6522 | + return $.wikiEditor.modules[module].supported; |
| 6523 | + } |
| 6524 | + } else { |
| 6525 | + if ( typeof $.wikiEditor.supported !== 'undefined' ) { |
| 6526 | + // Cache hit |
| 6527 | + return $.wikiEditor.supported; |
| 6528 | + } |
6518 | 6529 | } |
| 6530 | + // Provide quick way to cache support |
| 6531 | + function cacheSupport( value ) { |
| 6532 | + return module ? $.wikiEditor.modules[module].supported = value : $.wikiEditor.supported = value; |
| 6533 | + } |
| 6534 | + // Fallback to the wikiEditor browser map if no special map is provided in the module |
| 6535 | + var map = module && 'browsers' in $.wikiEditor.modules[module] ? |
| 6536 | + $.wikiEditor.modules[module].browsers : $.wikiEditor.browsers; |
6519 | 6537 | // Check if we have any compatiblity information on-hand for the current browser |
6520 | 6538 | if ( !( $.browser.name in $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'] ) ) { |
6521 | 6539 | // Assume good faith :) |
6522 | | - return $.wikiEditor.supported = true; |
| 6540 | + return cacheSupport( true ); |
6523 | 6541 | } |
6524 | 6542 | // Check over each browser condition to determine if we are running in a compatible client |
6525 | 6543 | var browser = $.wikiEditor.browsers[$( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'][$.browser.name]; |
— | — | @@ -6527,16 +6545,16 @@ |
6528 | 6546 | var val = browser[condition][1]; |
6529 | 6547 | if ( typeof val == 'string' ) { |
6530 | 6548 | if ( !( eval( '$.browser.version' + op + '"' + val + '"' ) ) ) { |
6531 | | - return $.wikiEditor.supported = false; |
| 6549 | + return cacheSupport( false ); |
6532 | 6550 | } |
6533 | 6551 | } else if ( typeof val == 'number' ) { |
6534 | 6552 | if ( !( eval( '$.browser.versionNumber' + op + val ) ) ) { |
6535 | | - return $.wikiEditor.supported = false; |
| 6553 | + return cacheSupport( false ); |
6536 | 6554 | } |
6537 | 6555 | } |
6538 | 6556 | } |
6539 | 6557 | // Return and also cache the return value - this will be checked somewhat often |
6540 | | - return $.wikiEditor.supported = true; |
| 6558 | + return cacheSupport( true ); |
6541 | 6559 | }, |
6542 | 6560 | /** |
6543 | 6561 | * Provides a way to extract messages from objects. Wraps the mw.usability.getMsg() function, which |
— | — | @@ -6669,8 +6687,8 @@ |
6670 | 6688 | modules = data; |
6671 | 6689 | } |
6672 | 6690 | for ( var module in modules ) { |
6673 | | - // Check for the existance of an available module with a matching name and a create function |
6674 | | - if ( typeof module == 'string' && module in $.wikiEditor.modules ) { |
| 6691 | + // Check for the existance of an available / supported module with a matching name and a create function |
| 6692 | + if ( typeof module == 'string' && $.wikiEditor.isSupported( module ) ) { |
6675 | 6693 | // Extend the context's core API with this module's own API calls |
6676 | 6694 | if ( 'api' in $.wikiEditor.modules[module] ) { |
6677 | 6695 | for ( var call in $.wikiEditor.modules[module].api ) { |
Index: branches/wmf-deployment/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -436,14 +436,15 @@ |
437 | 437 | options.endContainer=options.startContainer;break;case'scrollToCaretPosition':options=$.extend({'force':false},options);break;} |
438 | 438 | var context=$(this).data('wikiEditor-context');var hasIframe=context!==undefined&&context.$iframe!==undefined;var needSave=false;if(hasIframe&&context.savedSelection!==null){context.fn.restoreSelection();needSave=true;} |
439 | 439 | retval=(hasIframe?context.fn:fn)[command].call(this,options);if(hasIframe&&needSave){context.fn.saveSelection();} |
440 | | -return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(){if(typeof $.wikiEditor.supported!='undefined'){return $.wikiEditor.supported;} |
441 | | -if(!($.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return $.wikiEditor.supported=true;} |
442 | | -var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return $.wikiEditor.supported=false;}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return $.wikiEditor.supported=false;}}} |
443 | | -return $.wikiEditor.supported=true;},'autoMsg':function(object,property){if(typeof property=='object'){for(var i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}} |
| 440 | +return retval;};})(jQuery);(function($){$.wikiEditor={'modules':{},'instances':[],'browsers':{'ltr':{'msie':[['>=',7]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]},'rtl':{'msie':[['>=',8]],'firefox':[['>=',2],['!=','2.0'],['!=','2.0.0.1'],['!=','2.0.0.2'],['!=','2.0.0.3'],['!=','2.0.0.4']],'opera':[['>=',9.6]],'safari':[['>=',4]]}},'imgPath':wgScriptPath+'/extensions/UsabilityInitiative/images/wikiEditor/','isSupported':function(module){if(module){if(typeof $.wikiEditor.modules[module]=='undefined'){return false;}else if(typeof $.wikiEditor.modules[module].supported!=='undefined'){return $.wikiEditor.modules[module].supported;}}else{if(typeof $.wikiEditor.supported!=='undefined'){return $.wikiEditor.supported;}} |
| 441 | +function cacheSupport(value){return module?$.wikiEditor.modules[module].supported=value:$.wikiEditor.supported=value;} |
| 442 | +var map=module&&'browsers'in $.wikiEditor.modules[module]?$.wikiEditor.modules[module].browsers:$.wikiEditor.browsers;if(!($.browser.name in $.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'])){return cacheSupport(true);} |
| 443 | +var browser=$.wikiEditor.browsers[$('body').is('.rtl')?'rtl':'ltr'][$.browser.name];for(var condition in browser){var op=browser[condition][0];var val=browser[condition][1];if(typeof val=='string'){if(!(eval('$.browser.version'+op+'"'+val+'"'))){return cacheSupport(false);}}else if(typeof val=='number'){if(!(eval('$.browser.versionNumber'+op+val))){return cacheSupport(false);}}} |
| 444 | +return cacheSupport(true);},'autoMsg':function(object,property){if(typeof property=='object'){for(var i in property){if(property[i]in object||property[i]+'Msg'in object){property=property[i];break;}}} |
444 | 445 | if(property in object){return object[property];}else if(property+'Msg'in object){if(typeof object[property+'Msg']=='object'){return mw.usability.getMsg.apply(mw.usability,object[property+'Msg']);}else{return mw.usability.getMsg(object[property+'Msg']);}}else{return'';}},'autoLang':function(object,lang){return object[lang||wgUserLanguage]||object['default']||object;},'autoIcon':function(icon,path,lang){var src=$.wikiEditor.autoLang(icon,lang);path=path||$.wikiEditor.imgPath;if(src.substr(0,7)!='http://'&&src.substr(0,8)!='https://'&&src[0]!='/'){src=path+src;} |
445 | 446 | return src+'?'+wgWikiEditorIconVersion;}};$.fn.wikiEditor=function(){if(!$j.wikiEditor.isSupported()){return $(this);} |
446 | 447 | var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){context={'$textarea':$(this),'views':{},'modules':{},'data':{},'instance':$.wikiEditor.instances.push($(this))-1,'offsets':null,'htmlToTextMap':{},'oldHTML':null,'oldDelayedHTML':null,'savedSelection':null,'history':[],'historyPosition':-1};context.api={'addModule':function(context,data){var modules={};if(typeof data=='string'){modules[data]={};}else if(typeof data=='object'){modules=data;} |
447 | | -for(var module in modules){if(typeof module=='string'&&module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(var call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}} |
| 448 | +for(var module in modules){if(typeof module=='string'&&$.wikiEditor.isSupported(module)){if('api'in $.wikiEditor.modules[module]){for(var call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}} |
448 | 449 | if('fn'in $.wikiEditor.modules[module]&&'create'in $.wikiEditor.modules[module].fn){context.modules[module]={};$.wikiEditor.modules[module].fn.create(context,modules[module]);}}}}};context.evt={'keydown':function(event){switch(event.which){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;}} |
449 | 450 | return false;} |
450 | 451 | break;case 86:if(event.ctrlKey){context.evt.paste(event);} |
Property changes on: branches/wmf-deployment/extensions/UsabilityInitiative |
___________________________________________________________________ |
Name: svn:mergeinfo |
451 | 452 | - /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646 |
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62380,62384,62392-62396 |
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |
452 | 453 | + /branches/REL1_15/phase3/extensions/UsabilityInitiative:51646 |
/trunk/extensions/UsabilityInitiative:56207,56209,56296,56333,56355,62041,62043,62127,62139,62142-62143,62145-62146,62256,62263,62274,62341,62371,62380,62384,62392-62396 |
/trunk/phase3/extensions/UsabilityInitiative:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57541,57916,58151,58219,58633,58816 |