Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | array( 'src' => 'js/plugins/jquery.namespaceSelect.js', 'version' => 1 ), |
74 | 74 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 7 ), |
75 | 75 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 27 ), |
76 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 123 ), |
| 76 | + array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 124 ), |
77 | 77 | array( 'src' => 'js/plugins/jquery.wikiEditor.highlight.js', 'version' => 29 ), |
78 | 78 | array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 48 ), |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 12 ), |
— | — | @@ -82,10 +82,10 @@ |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 2 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 243 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 244 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 243 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 244 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -297,24 +297,31 @@ |
298 | 298 | if ( ( event.ctrlKey || event.metaKey ) && context.history.length ) { |
299 | 299 | // HistoryPosition is a negative number between -1 and -context.history.length, in other words |
300 | 300 | // it's the number of steps backwards from the latest state. |
| 301 | + var newPosition; |
301 | 302 | if ( event.shiftKey ) { |
302 | 303 | // Redo |
303 | | - context.historyPosition++; |
| 304 | + newPosition = context.historyPosition + 1; |
304 | 305 | } else { |
305 | 306 | // Undo |
306 | | - context.historyPosition--; |
| 307 | + newPosition = context.historyPosition - 1; |
307 | 308 | } |
308 | 309 | // Only act if we are switching to a valid state |
309 | | - if ( context.history.length + context.historyPosition >= 0 && context.historyPosition < 0 ) { |
| 310 | + if ( newPosition >= ( context.history.length * -1 ) && newPosition < 0 ) { |
| 311 | + // Make sure we run the history storing code before we make this change |
| 312 | + context.evt.delayedChange( event ); |
| 313 | + context.historyPosition = newPosition; |
310 | 314 | // Change state |
311 | 315 | // FIXME: Destroys event handlers, will be a problem with template folding |
312 | 316 | context.$content.html( |
313 | 317 | context.history[context.history.length + context.historyPosition].html |
314 | 318 | ); |
315 | | - } else { |
316 | | - // Normalize the historyPosition |
317 | | - context.historyPosition = |
318 | | - Math.max( -context.history.length, Math.min( context.historyPosition, -1 ) ); |
| 319 | + context.fn.purgeOffsets(); |
| 320 | + if( context.history[context.history.length + context.historyPosition ].sel ) { |
| 321 | + context.fn.setSelection( { |
| 322 | + start: context.history[context.history.length + context.historyPosition ].sel[0], |
| 323 | + end: context.history[context.history.length + context.historyPosition ].sel[1] } |
| 324 | + ); |
| 325 | + } |
319 | 326 | } |
320 | 327 | // Prevent the browser from jumping in and doing its stuff |
321 | 328 | return false; |
— | — | @@ -367,21 +374,30 @@ |
368 | 375 | 'delayedChange': function( event ) { |
369 | 376 | event.data.scope = 'division'; |
370 | 377 | var newHTML = context.$content.html(); |
371 | | - if ( context.oldDelayedHTML != newHTML ) { |
| 378 | + var newSel = context.fn.getCaretPosition(); |
| 379 | + // Was text changed? Was it because of a REDO or UNDO action? |
| 380 | + if ( context.history.length == 0 || (context.oldDelayedHTML != newHTML |
| 381 | + && newHTML != context.history[context.history.length + context.historyPosition].html ) ) { |
372 | 382 | context.fn.purgeOffsets(); |
373 | 383 | context.oldDelayedHTML = newHTML; |
| 384 | + context.oldDelayedSel = newSel; |
374 | 385 | event.data.scope = 'realchange'; |
375 | | - // Save in the history |
376 | | - //console.log( 'save-state' ); |
377 | | - // Only reset the historyPosition and begin moving forward if this change is not the result of undo |
378 | | - if ( newHTML !== context.history[context.history.length + context.historyPosition].html ) { |
| 386 | + // Do we need to trim extras from our history? |
| 387 | + // FIXME: this should really be happing on change, not on the delay |
| 388 | + if ( context.historyPosition < -1 ) { |
| 389 | + //clear out the extras |
| 390 | + context.history.splice( context.history.length + context.historyPosition ); |
379 | 391 | context.historyPosition = -1; |
380 | 392 | } |
381 | | - context.history.push( { 'html': newHTML } ); |
382 | | - // Keep the history under control |
| 393 | + context.history.push( { 'html': newHTML, 'sel': newSel } ); |
| 394 | + // If the histroy has grown longer than 10 items, remove the earliest one |
383 | 395 | while ( context.history.length > 10 ) { |
384 | 396 | context.history.shift(); |
385 | 397 | } |
| 398 | + } else if ( context.oldDelayedSel != newSel && context.historyPosition == -1 ) { |
| 399 | + // If only the selection was changed, and we're not between undos, update it |
| 400 | + context.oldDelayedSel = newSel; |
| 401 | + context.history[context.history.length + context.historyPosition].sel = newSel; |
386 | 402 | } |
387 | 403 | return true; |
388 | 404 | }, |
— | — | @@ -1485,8 +1501,6 @@ |
1486 | 1502 | .replace( /&esc;esc;/g, '&esc;' ); |
1487 | 1503 | context.$content.html( html ); |
1488 | 1504 | context.oldHTML = html; |
1489 | | - // FIXME: This needs to be merged somehow with the oldHTML thing |
1490 | | - context.history.push( { 'html': html } ); |
1491 | 1505 | |
1492 | 1506 | // Reflect direction of parent frame into child |
1493 | 1507 | if ( $( 'body' ).is( '.rtl' ) ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -6730,24 +6730,31 @@ |
6731 | 6731 | if ( ( event.ctrlKey || event.metaKey ) && context.history.length ) { |
6732 | 6732 | // HistoryPosition is a negative number between -1 and -context.history.length, in other words |
6733 | 6733 | // it's the number of steps backwards from the latest state. |
| 6734 | + var newPosition; |
6734 | 6735 | if ( event.shiftKey ) { |
6735 | 6736 | // Redo |
6736 | | - context.historyPosition++; |
| 6737 | + newPosition = context.historyPosition + 1; |
6737 | 6738 | } else { |
6738 | 6739 | // Undo |
6739 | | - context.historyPosition--; |
| 6740 | + newPosition = context.historyPosition - 1; |
6740 | 6741 | } |
6741 | 6742 | // Only act if we are switching to a valid state |
6742 | | - if ( context.history.length + context.historyPosition >= 0 && context.historyPosition < 0 ) { |
| 6743 | + if ( newPosition >= ( context.history.length * -1 ) && newPosition < 0 ) { |
| 6744 | + // Make sure we run the history storing code before we make this change |
| 6745 | + context.evt.delayedChange( event ); |
| 6746 | + context.historyPosition = newPosition; |
6743 | 6747 | // Change state |
6744 | 6748 | // FIXME: Destroys event handlers, will be a problem with template folding |
6745 | 6749 | context.$content.html( |
6746 | 6750 | context.history[context.history.length + context.historyPosition].html |
6747 | 6751 | ); |
6748 | | - } else { |
6749 | | - // Normalize the historyPosition |
6750 | | - context.historyPosition = |
6751 | | - Math.max( -context.history.length, Math.min( context.historyPosition, -1 ) ); |
| 6752 | + context.fn.purgeOffsets(); |
| 6753 | + if( context.history[context.history.length + context.historyPosition ].sel ) { |
| 6754 | + context.fn.setSelection( { |
| 6755 | + start: context.history[context.history.length + context.historyPosition ].sel[0], |
| 6756 | + end: context.history[context.history.length + context.historyPosition ].sel[1] } |
| 6757 | + ); |
| 6758 | + } |
6752 | 6759 | } |
6753 | 6760 | // Prevent the browser from jumping in and doing its stuff |
6754 | 6761 | return false; |
— | — | @@ -6800,21 +6807,30 @@ |
6801 | 6808 | 'delayedChange': function( event ) { |
6802 | 6809 | event.data.scope = 'division'; |
6803 | 6810 | var newHTML = context.$content.html(); |
6804 | | - if ( context.oldDelayedHTML != newHTML ) { |
| 6811 | + var newSel = context.fn.getCaretPosition(); |
| 6812 | + // Was text changed? Was it because of a REDO or UNDO action? |
| 6813 | + if ( context.history.length == 0 || (context.oldDelayedHTML != newHTML |
| 6814 | + && newHTML != context.history[context.history.length + context.historyPosition].html ) ) { |
6805 | 6815 | context.fn.purgeOffsets(); |
6806 | 6816 | context.oldDelayedHTML = newHTML; |
| 6817 | + context.oldDelayedSel = newSel; |
6807 | 6818 | event.data.scope = 'realchange'; |
6808 | | - // Save in the history |
6809 | | - //console.log( 'save-state' ); |
6810 | | - // Only reset the historyPosition and begin moving forward if this change is not the result of undo |
6811 | | - if ( newHTML !== context.history[context.history.length + context.historyPosition].html ) { |
| 6819 | + // Do we need to trim extras from our history? |
| 6820 | + // FIXME: this should really be happing on change, not on the delay |
| 6821 | + if ( context.historyPosition < -1 ) { |
| 6822 | + //clear out the extras |
| 6823 | + context.history.splice( context.history.length + context.historyPosition ); |
6812 | 6824 | context.historyPosition = -1; |
6813 | 6825 | } |
6814 | | - context.history.push( { 'html': newHTML } ); |
6815 | | - // Keep the history under control |
| 6826 | + context.history.push( { 'html': newHTML, 'sel': newSel } ); |
| 6827 | + // If the histroy has grown longer than 10 items, remove the earliest one |
6816 | 6828 | while ( context.history.length > 10 ) { |
6817 | 6829 | context.history.shift(); |
6818 | 6830 | } |
| 6831 | + } else if ( context.oldDelayedSel != newSel && context.historyPosition == -1 ) { |
| 6832 | + // If only the selection was changed, and we're not between undos, update it |
| 6833 | + context.oldDelayedSel = newSel; |
| 6834 | + context.history[context.history.length + context.historyPosition].sel = newSel; |
6819 | 6835 | } |
6820 | 6836 | return true; |
6821 | 6837 | }, |
— | — | @@ -7918,8 +7934,6 @@ |
7919 | 7935 | .replace( /&esc;esc;/g, '&esc;' ); |
7920 | 7936 | context.$content.html( html ); |
7921 | 7937 | context.oldHTML = html; |
7922 | | - // FIXME: This needs to be merged somehow with the oldHTML thing |
7923 | | - context.history.push( { 'html': html } ); |
7924 | 7938 | |
7925 | 7939 | // Reflect direction of parent frame into child |
7926 | 7940 | if ( $( 'body' ).is( '.rtl' ) ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -445,8 +445,8 @@ |
446 | 446 | return src+'?'+wgWikiEditorIconVersion;}};$.fn.wikiEditor=function(){if(!$j.wikiEditor.isSupported()){return $(this);} |
447 | 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;} |
448 | 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];}}} |
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 90:if((event.ctrlKey||event.metaKey)&&context.history.length){if(event.shiftKey){context.historyPosition++;}else{context.historyPosition--;} |
450 | | -if(context.history.length+context.historyPosition>=0&&context.historyPosition<0){context.$content.html(context.history[context.history.length+context.historyPosition].html);}else{context.historyPosition=Math.max(-context.history.length,Math.min(context.historyPosition,-1));} |
| 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 90:if((event.ctrlKey||event.metaKey)&&context.history.length){var newPosition;if(event.shiftKey){newPosition=context.historyPosition+1;}else{newPosition=context.historyPosition-1;} |
| 450 | +if(newPosition>=(context.history.length*-1)&&newPosition<0){context.evt.delayedChange(event);context.historyPosition=newPosition;context.$content.html(context.history[context.history.length+context.historyPosition].html);context.fn.purgeOffsets();if(context.history[context.history.length+context.historyPosition].sel){context.fn.setSelection({start:context.history[context.history.length+context.historyPosition].sel[0],end:context.history[context.history.length+context.historyPosition].sel[1]});}} |
451 | 451 | return false;} |
452 | 452 | 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;}} |
453 | 453 | return false;} |
— | — | @@ -454,8 +454,8 @@ |
455 | 455 | break;} |
456 | 456 | 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';} |
457 | 457 | switch(event.which){case 8:break;} |
458 | | -return true;},'delayedChange':function(event){event.data.scope='division';var newHTML=context.$content.html();if(context.oldDelayedHTML!=newHTML){context.fn.purgeOffsets();context.oldDelayedHTML=newHTML;event.data.scope='realchange';if(newHTML!==context.history[context.history.length+context.historyPosition].html){context.historyPosition=-1;} |
459 | | -context.history.push({'html':newHTML});while(context.history.length>10){context.history.shift();}} |
| 458 | +return true;},'delayedChange':function(event){event.data.scope='division';var newHTML=context.$content.html();var newSel=context.fn.getCaretPosition();if(context.history.length==0||(context.oldDelayedHTML!=newHTML&&newHTML!=context.history[context.history.length+context.historyPosition].html)){context.fn.purgeOffsets();context.oldDelayedHTML=newHTML;context.oldDelayedSel=newSel;event.data.scope='realchange';if(context.historyPosition<-1){context.history.splice(context.history.length+context.historyPosition);context.historyPosition=-1;} |
| 459 | +context.history.push({'html':newHTML,'sel':newSel});while(context.history.length>10){context.history.shift();}}else if(context.oldDelayedSel!=newSel&&context.historyPosition==-1){context.oldDelayedSel=newSel;context.history[context.history.length+context.historyPosition].sel=newSel;} |
460 | 460 | return true;},'paste':function(event){context.$content.find(':not(.wikiEditor)').addClass('wikiEditor');context.$content.addClass('pasting');setTimeout(function(){var $selection=context.$content.find(':not(.wikiEditor)');while($selection.length&&$selection.length>0){var $currentElement=$selection.eq(0);while(!$currentElement.parent().is('body')&&!$currentElement.parent().is('.wikiEditor')){$currentElement=$currentElement.parent();} |
461 | 461 | if($currentElement.is('br')){$currentElement.addClass('wikiEditor');}else{$('<p></p>').text($currentElement.text()).addClass('wikiEditor').insertAfter($currentElement);$currentElement.remove();} |
462 | 462 | $selection=context.$content.find(':not(.wikiEditor)');} |
— | — | @@ -554,7 +554,7 @@ |
555 | 555 | context.$iframe[0].contentWindow.focus();context.savedSelection=context.$iframe[0].contentWindow.document.selection.createRange();},'restoreSelection':function(){if(!$.browser.msie||context.savedSelection===null){return;} |
556 | 556 | context.$iframe[0].contentWindow.focus();context.savedSelection.select();context.savedSelection=null;}};var $loader=$('<div></div>').addClass('wikiEditor-ui-loading').append($('<span>'+mw.usability.getMsg('wikieditor-loading')+'</span>').css('marginTop',context.$textarea.height()/2));context.$textarea.after($loader).add($loader).wrapAll($('<div></div>').addClass('wikiEditor-ui')).wrapAll($('<div></div>').addClass('wikiEditor-ui-view wikiEditor-ui-view-wikitext')).wrapAll($('<div></div>').addClass('wikiEditor-ui-left')).wrapAll($('<div></div>').addClass('wikiEditor-ui-bottom')).wrapAll($('<div></div>').addClass('wikiEditor-ui-text'));context.$ui=context.$textarea.parent().parent().parent().parent().parent();context.$wikitext=context.$textarea.parent().parent().parent().parent();context.$wikitext.before($('<div></div>').addClass('wikiEditor-ui-controls').append($('<div></div>').addClass('wikiEditor-ui-tabs').hide()).append($('<div></div>').addClass('wikiEditor-ui-buttons'))).before($('<div style="clear:both;"></div>'));context.$controls=context.$ui.find('.wikiEditor-ui-buttons').hide();context.$buttons=context.$ui.find('.wikiEditor-ui-buttons');context.$tabs=context.$ui.find('.wikiEditor-ui-tabs');context.$ui.after($('<div style="clear:both;"></div>'));context.$wikitext.append($('<div></div>').addClass('wikiEditor-ui-right'));context.$wikitext.find('.wikiEditor-ui-left').prepend($('<div></div>').addClass('wikiEditor-ui-top'));context.view='wikitext';$(window).resize(function(event){context.fn.trigger('resize',event);});context.$iframe=$('<iframe></iframe>').attr({'frameBorder':0,'border':0,'tabindex':1,'src':wgScriptPath+'/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.html?'+'instance='+context.instance+'&ts='+(new Date()).getTime()+'&is=content','id':'wikiEditor-iframe-'+context.instance}).css({'backgroundColor':'white','width':'100%','height':context.$textarea.height(),'display':'none','overflow-y':'scroll','overflow-x':'hidden'}).insertAfter(context.$textarea).load(function(){if(!this.isSecondRun){context.$iframe[0].contentWindow.document.designMode='on';if($.browser.msie){this.isSecondRun=true;return;}} |
557 | 557 | context.$content=$(context.$iframe[0].contentWindow.document.body);var html=context.$textarea.val().replace(/&esc;/g,'&esc;esc;').replace(/\<p\>/g,'&esc;<p>').replace(/\<\/p\>/g,'&esc;</p>').replace(/\<span class="wikiEditor-tab"\>\<\/span\>/g,'&esc;<span class="wikiEditor-tab"></span>').replace(/ /g,'&esc;&nbsp;');if($.browser.msie){html=html.replace(/\t/g,'<span class="wikiEditor-tab"></span>');if($.browser.versionNumber<=7){html=html.replace(/ /g," ");}else{html=html.replace(/(^|\n) /g,"$1 ");}} |
558 | | -html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&nbsp;/g,' ').replace(/<p>/g,'<p>').replace(/<\/p>/g,'</p>').replace(/<span( | )class=("|")wikiEditor-tab("|")><\/span>/g,'<span class="wikiEditor-tab"></span>').replace(/<p><\/p>/g,'<p><br></p>').replace(/&esc;&amp;nbsp;/g,'&nbsp;').replace(/&esc;&lt;p&gt;/g,'<p>').replace(/&esc;&lt;\/p&gt;/g,'</p>').replace(/&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"><\/span>').replace(/&esc;esc;/g,'&esc;');context.$content.html(html);context.oldHTML=html;context.history.push({'html':html});if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
| 558 | +html=$('<div />').text('<p>'+html.replace(/\r?\n/g,'</p><p>')+'</p>').html().replace(/&nbsp;/g,' ').replace(/<p>/g,'<p>').replace(/<\/p>/g,'</p>').replace(/<span( | )class=("|")wikiEditor-tab("|")><\/span>/g,'<span class="wikiEditor-tab"></span>').replace(/<p><\/p>/g,'<p><br></p>').replace(/&esc;&amp;nbsp;/g,'&nbsp;').replace(/&esc;&lt;p&gt;/g,'<p>').replace(/&esc;&lt;\/p&gt;/g,'</p>').replace(/&esc;&lt;span&nbsp;class=&quot;wikiEditor-tab&quot;&gt;&lt;\/span&gt;/g,'<span class="wikiEditor-tab"><\/span>').replace(/&esc;esc;/g,'&esc;');context.$content.html(html);context.oldHTML=html;if($('body').is('.rtl')){context.$content.addClass('rtl').attr('dir','rtl');} |
559 | 559 | context.$textarea.attr('disabled',true);context.$textarea.hide();context.$iframe.show();context.fn.trigger('ready');$('.wikiEditor-ui-loading').fadeOut('fast',function(){$(this).remove();});$(context.$iframe[0].contentWindow.document).bind('keydown',function(event){return context.fn.trigger('keydown',event);}).bind('paste',function(event){return context.fn.trigger('paste',event);}).bind('keyup paste mouseup cut encapsulateSelection',function(event){return context.fn.trigger('change',event);}).delayedBind(250,'keyup paste mouseup cut encapsulateSelection',function(event){context.fn.trigger('delayedChange',event);});});context.$textarea.closest('form').submit(function(){context.$textarea.attr('disabled',false);context.$textarea.val(context.$textarea.textSelection('getContents'));});context.fallbackWindowOnBeforeUnload=window.onbeforeunload;window.onbeforeunload=function(){context.$textarea.val(context.$textarea.textSelection('getContents'));if(context.fallbackWindowOnBeforeUnload){return context.fallbackWindowOnBeforeUnload();}};} |
560 | 560 | var args=$.makeArray(arguments);if(args.length>0){var call=args.shift();if(call in context.api){context.api[call](context,typeof args[0]=='undefined'?{}:args[0]);}} |
561 | 561 | 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,data)},openDialog:function(context,module){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('open');}},closeDialog:function(context,data){if(module in $.wikiEditor.modules.dialogs.modules){$('#'+$.wikiEditor.modules.dialogs.modules[module].id).dialog('close');}}},fn:{create:function(context,config){for(module in config){$.wikiEditor.modules.dialogs.modules[module]=config[module];} |