Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -70,15 +70,15 @@ |
71 | 71 | array( 'src' => 'js/plugins/jquery.suggestions.js', 'version' => 6 ), |
72 | 72 | array( 'src' => 'js/plugins/jquery.textSelection.js', 'version' => 16 ), |
73 | 73 | array( 'src' => 'js/plugins/jquery.wikiEditor.js', 'version' => 12 ), |
74 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 17 ), |
75 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 7 ), |
| 74 | + array( 'src' => 'js/plugins/jquery.wikiEditor.toolbar.js', 'version' => 18 ), |
| 75 | + array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 8 ), |
76 | 76 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 24 ), |
77 | 77 | ), |
78 | 78 | 'combined' => array( |
79 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 55 ), |
| 79 | + array( 'src' => 'js/plugins.combined.js', 'version' => 56 ), |
80 | 80 | ), |
81 | 81 | 'minified' => array( |
82 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 55 ), |
| 82 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 56 ), |
83 | 83 | ), |
84 | 84 | ), |
85 | 85 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.dialogs.js |
— | — | @@ -14,16 +14,16 @@ |
15 | 15 | */ |
16 | 16 | api: { |
17 | 17 | addDialog: function( context, data ) { |
18 | | - $.wikiEditor.modules.dialogs.fn.create( context, { 'modules': data } ) |
| 18 | + $.wikiEditor.modules.dialogs.fn.create( context, data ) |
19 | 19 | }, |
20 | | - openDialog: function( context, data ) { |
21 | | - if ( data.dialog in $.wikiEditor.modules.dialogs.modules ) { |
22 | | - $( '#' + $.wikiEditor.modules.dialogs.modules[data.dialog].id ).dialog( 'open' ); |
| 20 | + openDialog: function( context, module ) { |
| 21 | + if ( module in $.wikiEditor.modules.dialogs.modules ) { |
| 22 | + $( '#' + $.wikiEditor.modules.dialogs.modules[module].id ).dialog( 'open' ); |
23 | 23 | } |
24 | 24 | }, |
25 | 25 | closeDialog: function( context, data ) { |
26 | | - if ( data.dialog in $.wikiEditor.modules.dialogs.modules ) { |
27 | | - $( '#' + $.wikiEditor.modules.dialogs.modules[data.dialog].id ).dialog( 'close' ); |
| 26 | + if ( module in $.wikiEditor.modules.dialogs.modules ) { |
| 27 | + $( '#' + $.wikiEditor.modules.dialogs.modules[module].id ).dialog( 'close' ); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | }, |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js |
— | — | @@ -239,7 +239,7 @@ |
240 | 240 | } |
241 | 241 | break; |
242 | 242 | case 'dialog': |
243 | | - context.$textarea.wikiEditor( 'openDialog', { 'dialog': action.module } ); |
| 243 | + context.$textarea.wikiEditor( 'openDialog', action.module ); |
244 | 244 | break; |
245 | 245 | default: break; |
246 | 246 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -1492,16 +1492,16 @@ |
1493 | 1493 | */ |
1494 | 1494 | api: { |
1495 | 1495 | addDialog: function( context, data ) { |
1496 | | - $.wikiEditor.modules.dialogs.fn.create( context, { 'modules': data } ) |
| 1496 | + $.wikiEditor.modules.dialogs.fn.create( context, data ) |
1497 | 1497 | }, |
1498 | | - openDialog: function( context, data ) { |
1499 | | - if ( data.dialog in $.wikiEditor.modules.dialogs.modules ) { |
1500 | | - $( '#' + $.wikiEditor.modules.dialogs.modules[data.dialog].id ).dialog( 'open' ); |
| 1498 | + openDialog: function( context, module ) { |
| 1499 | + if ( module in $.wikiEditor.modules.dialogs.modules ) { |
| 1500 | + $( '#' + $.wikiEditor.modules.dialogs.modules[module].id ).dialog( 'open' ); |
1501 | 1501 | } |
1502 | 1502 | }, |
1503 | 1503 | closeDialog: function( context, data ) { |
1504 | | - if ( data.dialog in $.wikiEditor.modules.dialogs.modules ) { |
1505 | | - $( '#' + $.wikiEditor.modules.dialogs.modules[data.dialog].id ).dialog( 'close' ); |
| 1504 | + if ( module in $.wikiEditor.modules.dialogs.modules ) { |
| 1505 | + $( '#' + $.wikiEditor.modules.dialogs.modules[module].id ).dialog( 'close' ); |
1506 | 1506 | } |
1507 | 1507 | } |
1508 | 1508 | }, |
— | — | @@ -1878,7 +1878,7 @@ |
1879 | 1879 | } |
1880 | 1880 | break; |
1881 | 1881 | case 'dialog': |
1882 | | - context.$textarea.wikiEditor( 'openDialog', { 'dialog': action.module } ); |
| 1882 | + context.$textarea.wikiEditor( 'openDialog', action.module ); |
1883 | 1883 | break; |
1884 | 1884 | default: break; |
1885 | 1885 | } |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | $(this).setSelection(pos[0],pos[1]);$(this).data('wikiEditor-cursor',false);}).blur(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);}} |
90 | 90 | 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];}}}}} |
91 | 91 | 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]);}}} |
92 | | -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];} |
| 92 | +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];} |
93 | 93 | mvJsLoader.doLoad(['$j.ui','$j.ui.dialog','$j.ui.draggable','$j.ui.resizable'],function(){for(module in $.wikiEditor.modules.dialogs.modules){var module=$.wikiEditor.modules.dialogs.modules[module];if($('#'+module.id).size()==0){var configuration=module.dialog;configuration.bgiframe=true;configuration.autoOpen=false;configuration.modal=true;configuration.title=$.wikiEditor.autoMsg(module,'title');configuration.newButtons={};for(msg in configuration.buttons) |
94 | 94 | configuration.newButtons[gM(msg)]=configuration.buttons[msg];configuration.buttons=configuration.newButtons;$('<div /> ').attr('id',module.id).html(module.html).data('context',context).appendTo($('body')).each(module.init).dialog(configuration).bind('dialogopen',$.wikiEditor.modules.dialogs.fn.resize).find('.ui-tabs').bind('tabsshow',function(){$(this).closest('.ui-dialog-content').each($.wikiEditor.modules.dialogs.fn.resize);});var maxTI=0;$j('[tabindex]').each(function(){var ti=parseInt($j(this).attr('tabindex'));if(ti>maxTI) |
95 | 95 | maxTI=ti;});var tabIndex=maxTI+1;$j('.ui-dialog input, .ui-dialog button').not('[tabindex]').each(function(){$j(this).attr('tabindex',tabIndex++);});}}});},resize:function(){var wrapper=$(this).closest('.ui-dialog');var oldWidth=wrapper.width();var oldHidden=$(this).find('*').not(':visible');oldHidden.each(function(){$(this).data('oldstyle',$(this).attr('style'));});oldHidden.show();var oldWS=$(this).css('white-space');$(this).css('white-space','nowrap');if(wrapper.width()<=$(this).get(0).scrollWidth){var thisWidth=$(this).data('thisWidth')?$(this).data('thisWidth'):0;thisWidth=Math.max($(this).get(0).scrollWidth,thisWidth);$(this).width(thisWidth);$(this).data('thisWidth',thisWidth);var wrapperWidth=$(this).data('wrapperWidth')?$(this).data('wrapperWidth'):0;wrapperWidth=Math.max(wrapper.get(0).scrollWidth,wrapperWidth);wrapper.width(wrapperWidth);$(this).data('wrapperWidth',wrapperWidth);$(this).dialog({'width':wrapper.width()});wrapper.css('left',parseInt(wrapper.css('left'))- |
— | — | @@ -114,7 +114,7 @@ |
115 | 115 | switch(action.type){case'replace':case'encapsulate':var parts={'pre':'','peri':'','post':''};for(part in parts){if(part+'Msg'in action.options){parts[part]=gM(action.options[part+'Msg'],(action.options[part]||null));}else{parts[part]=(action.options[part]||'')}} |
116 | 116 | if('periRegex'in action.options&&'periRegexReplace'in action.options){var selection=context.$textarea.getSelection();if(selection!=''){parts.peri=selection.replace(action.options.periRegex,action.options.periRegexReplace);}} |
117 | 117 | context.$textarea.encapsulateSelection(parts.pre,parts.peri,parts.post,action.options.ownline,action.type=='replace');break;case'callback':if(typeof action.execute=='function'){action.execute(context);} |
118 | | -break;case'dialog':context.$textarea.wikiEditor('openDialog',{'dialog':action.module});break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')} |
| 118 | +break;case'dialog':context.$textarea.wikiEditor('openDialog',action.module);break;default:break;}},buildGroup:function(context,id,group){var $group=$('<div />').attr({'class':'group group-'+id,'rel':id});var label=$.wikiEditor.autoMsg(group,'label');if(label){$group.append('<div class="label">'+label+'</div>')} |
119 | 119 | if('tools'in group){for(tool in group.tools){$group.append($.wikiEditor.modules.toolbar.fn.buildTool(context,tool,group.tools[tool]));}} |
120 | 120 | return $group;},buildTool:function(context,id,tool){if('filters'in tool){for(filter in tool.filters){if($(tool.filters[filter]).size()==0){return null;}}} |
121 | 121 | var label=$.wikiEditor.autoMsg(tool,'label');switch(tool.type){case'button':var src=tool.icon;if(src.indexOf('http://')!==0&&src.indexOf('https://')!==0){src=$.wikiEditor.imgPath+'toolbar/'+src;} |