Index: branches/usability/acaifix/UsabilityInitiative.hooks.php |
— | — | @@ -66,16 +66,16 @@ |
67 | 67 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
68 | 68 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
69 | 69 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 18 ), |
70 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 13 ), |
| 70 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 14 ), |
71 | 71 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 22 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 27 ), |
74 | 74 | ), |
75 | 75 | 'combined' => array( |
76 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 65 ), |
| 76 | + array( 'src' => 'js/plugins.combined.js', 'version' => 66 ), |
77 | 77 | ), |
78 | 78 | 'minified' => array( |
79 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 65 ), |
| 79 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 66 ), |
80 | 80 | ), |
81 | 81 | ), |
82 | 82 | ); |
Index: branches/usability/acaifix/js/plugins/jquery.wikiEditor.js |
— | — | @@ -170,12 +170,11 @@ |
171 | 171 | $(this).setSelection( pos[0], pos[1] ); |
172 | 172 | $(this).data( 'wikiEditor-cursor', false ); |
173 | 173 | }) |
174 | | - .blur( function() { |
175 | | - var pos = $(this).data( 'wikiEditor-cursor' ); |
176 | | - if ( !$(this).data( 'wikiEditor-cursor' ) ) |
177 | | - $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true, true ) ); |
178 | | - }); |
| 174 | + .delayedBind( 100, 'keyup mouseup', function() { |
| 175 | + $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true ) ); |
179 | 176 | |
| 177 | + } ); |
| 178 | + |
180 | 179 | // Create a set of standard methods for internal and external use |
181 | 180 | context.api = { |
182 | 181 | /** |
Index: branches/usability/acaifix/js/plugins.combined.js |
— | — | @@ -1334,12 +1334,11 @@ |
1335 | 1335 | $(this).setSelection( pos[0], pos[1] ); |
1336 | 1336 | $(this).data( 'wikiEditor-cursor', false ); |
1337 | 1337 | }) |
1338 | | - .blur( function() { |
1339 | | - var pos = $(this).data( 'wikiEditor-cursor' ); |
1340 | | - if ( !$(this).data( 'wikiEditor-cursor' ) ) |
1341 | | - $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true, true ) ); |
1342 | | - }); |
| 1338 | + .delayedBind( 100, 'keyup mouseup', function() { |
| 1339 | + $(this).data( 'wikiEditor-cursor', $(this).getCaretPosition( true ) ); |
1343 | 1340 | |
| 1341 | + } ); |
| 1342 | + |
1344 | 1343 | // Create a set of standard methods for internal and external use |
1345 | 1344 | context.api = { |
1346 | 1345 | /** |
Index: branches/usability/acaifix/js/plugins.combined.min.js |
— | — | @@ -88,8 +88,7 @@ |
89 | 89 | $.isOperaBroken=true;div.remove();} |
90 | 90 | if($.isOperaBroken) |
91 | 91 | s=s.replace(/\n/g,"\r\n");return s;};$.fn.wikiEditor=function(){var context=$(this).data('wikiEditor-context');if(typeof context=='undefined'){var instance=$.wikiEditor.instances.length;context={'$textarea':$(this),'modules':{},'data':{},'instance':instance};$.wikiEditor.instances[instance]=$(this);$(this).wrap($('<div></div>').addClass('wikiEditor-ui').attr('id','wikiEditor-ui')).wrap($('<div></div>').addClass('wikiEditor-ui-bottom').attr('id','wikiEditor-ui-bottom')).wrap($('<div></div>').addClass('wikiEditor-ui-text').attr('id','wikiEditor-ui-text'));context.$ui=$(this).parent().parent().parent();context.$ui.after($('<div style="clear:both;"></div>'));context.$ui.prepend($('<div></div>').addClass('wikiEditor-ui-top').attr('id','wikiEditor-ui-top'));$(this).focus(function(){var pos=$(this).data('wikiEditor-cursor');if(pos) |
92 | | -$(this).setSelection(pos[0],pos[1]);$(this).data('wikiEditor-cursor',false);}).blur(function(){var pos=$(this).data('wikiEditor-cursor');if(!$(this).data('wikiEditor-cursor')) |
93 | | -$(this).data('wikiEditor-cursor',$(this).getCaretPosition(true,true));});context.api={addModule:function(context,data){function callModuleApi(module,call,data){if(module in $.wikiEditor.modules&&'fn'in $.wikiEditor.modules[module]&&call in $.wikiEditor.modules[module].fn){$.wikiEditor.modules[module].fn[call](context,data);}} |
| 92 | +$(this).setSelection(pos[0],pos[1]);$(this).data('wikiEditor-cursor',false);}).delayedBind(100,'keyup mouseup',function(){$(this).data('wikiEditor-cursor',$(this).getCaretPosition(true));});context.api={addModule:function(context,data){function callModuleApi(module,call,data){if(module in $.wikiEditor.modules&&'fn'in $.wikiEditor.modules[module]&&call in $.wikiEditor.modules[module].fn){$.wikiEditor.modules[module].fn[call](context,data);}} |
94 | 93 | if(typeof data=='string'){callModuleApi(data,'create',{});}else if(typeof data=='object'){for(module in data){if(typeof module=='string'){callModuleApi(module,'create',data[module]);}}}}};for(module in $.wikiEditor.modules){if('api'in $.wikiEditor.modules[module]){for(call in $.wikiEditor.modules[module].api){if(!(call in context.api)){context.api[call]=$.wikiEditor.modules[module].api[call];}}}}} |
95 | 94 | if(arguments.length>0&&typeof arguments[0]=='object'){context.api.addModule(context,arguments[0]);}else{arguments=$.makeArray(arguments);if(arguments.length>0){var call=arguments.shift();if(call in context.api){context.api[call](context,arguments[0]==undefined?{}:arguments[0]);}}} |
96 | 95 | return $(this).data('wikiEditor-context',context);};})(jQuery);RegExp.escape=function(s){return s.replace(/([.*+?^${}()|\/\\[\]])/g,'\\$1');};(function($){$.wikiEditor.modules.dialogs={api:{addDialog:function(context,data){$.wikiEditor.modules.dialogs.fn.create(context,{'modules':data})},openDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('open');}},closeDialog:function(context,data){if(data.dialog in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[data.dialog].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |