Index: trunk/extensions/UsabilityInitiative/UsabilityInitiative.hooks.php |
— | — | @@ -78,14 +78,14 @@ |
79 | 79 | array( 'src' => 'js/plugins/jquery.wikiEditor.dialogs.js', 'version' => 21 ), |
80 | 80 | array( 'src' => 'js/plugins/jquery.wikiEditor.toc.js', 'version' => 97 ), |
81 | 81 | array( 'src' => 'js/plugins/jquery.wikiEditor.preview.js', 'version' => 11 ), |
82 | | - array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 58 ), |
| 82 | + array( 'src' => 'js/plugins/jquery.wikiEditor.templateEditor.js', 'version' => 59 ), |
83 | 83 | array( 'src' => 'js/plugins/jquery.wikiEditor.publish.js', 'version' => 3 ), |
84 | 84 | ), |
85 | 85 | 'combined' => array( |
86 | | - array( 'src' => 'js/plugins.combined.js', 'version' => 338 ), |
| 86 | + array( 'src' => 'js/plugins.combined.js', 'version' => 339 ), |
87 | 87 | ), |
88 | 88 | 'minified' => array( |
89 | | - array( 'src' => 'js/plugins.combined.min.js', 'version' => 338 ), |
| 89 | + array( 'src' => 'js/plugins.combined.min.js', 'version' => 339 ), |
90 | 90 | ), |
91 | 91 | ), |
92 | 92 | ); |
Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.templateEditor.js |
— | — | @@ -121,7 +121,7 @@ |
122 | 122 | // reset our ignoreKeypress variable if it's set to true |
123 | 123 | if( context.$iframe.data( 'ignoreKeypress' ) ) context.$iframe.data( 'ignoreKeypress', false ); |
124 | 124 | var $evtElem = event.jQueryNode; |
125 | | - if( $evtElem.hasClass( 'wikiEditor-template-name' ) ) { |
| 125 | + if( $evtElem.hasClass( 'wikiEditor-template-label' ) ) { |
126 | 126 | // allow anything if the command or control key are depressed |
127 | 127 | if ( event.ctrlKey || event.metaKey ) return true; |
128 | 128 | switch ( event.which ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js |
— | — | @@ -9366,7 +9366,7 @@ |
9367 | 9367 | // reset our ignoreKeypress variable if it's set to true |
9368 | 9368 | if( context.$iframe.data( 'ignoreKeypress' ) ) context.$iframe.data( 'ignoreKeypress', false ); |
9369 | 9369 | var $evtElem = event.jQueryNode; |
9370 | | - if( $evtElem.hasClass( 'wikiEditor-template-name' ) ) { |
| 9370 | + if( $evtElem.hasClass( 'wikiEditor-template-label' ) ) { |
9371 | 9371 | // allow anything if the command or control key are depressed |
9372 | 9372 | if ( event.ctrlKey || event.metaKey ) return true; |
9373 | 9373 | switch ( event.which ) { |
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js |
— | — | @@ -646,7 +646,7 @@ |
647 | 647 | if(tokenIndex<tokenArray.length){var beginIndex=tokenIndex;var endIndex=-1;var openTemplates=1;var templatesMatched=false;while(tokenIndex<tokenArray.length-1&&endIndex==-1){tokenIndex++;if(tokenArray[tokenIndex].label=='TEMPLATE_BEGIN'){openTemplates++;}else if(tokenArray[tokenIndex].label=='TEMPLATE_END'){openTemplates--;if(openTemplates==0){endIndex=tokenIndex;}}} |
648 | 648 | if(endIndex!=-1){markers.push({start:tokenArray[beginIndex].offset,end:tokenArray[endIndex].offset,type:'template',anchor:'wrap',afterWrap:function(node){var model=$.wikiEditor.modules.templateEditor.fn.updateModel($(node));if(model.isCollapsible()){$.wikiEditor.modules.templateEditor.fn.wrapTemplate($(node));$.wikiEditor.modules.templateEditor.fn.bindTemplateEvents($(node));}else{$(node).addClass('wikiEditor-template-text');}},beforeUnwrap:function(node){if($(node).parent().hasClass('wikiEditor-template')){$.wikiEditor.modules.templateEditor.fn.unwrapTemplate($(node));}},onSkip:function(node){if($(node).html()==$(node).data('oldHTML')){return;} |
649 | 649 | var model=$.wikiEditor.modules.templateEditor.fn.updateModel($(node));if($(node).parent().hasClass('wikiEditor-template')){var $label=$(node).parent().find('.wikiEditor-template-label');if($label.text()!=model.getName()){$label.text(model.getName());}} |
650 | | -if($(node).parent().hasClass('wikiEditor-template')&&!model.isCollapsible()){$.wikiEditor.modules.templateEditor.fn.unwrapTemplate($(node));}else if(!$(node).parent().hasClass('wikiEditor-template')&&model.isCollapsible()){$.wikiEditor.modules.templateEditor.fn.wrapTemplate($(node));$.wikiEditor.modules.templateEditor.fn.bindTemplateEvents($(node));}},getAnchor:function(ca1,ca2){return $(ca1.parentNode).is('span.wikiEditor-template-text')?ca1.parentNode:null;},context:context});}else{tokenArray[beginIndex].label='TEMPLATE_FALSE_BEGIN';tokenIndex=beginIndex;}}}},keydown:function(context,event){if(context.$iframe.data('ignoreKeypress'))context.$iframe.data('ignoreKeypress',false);var $evtElem=event.jQueryNode;if($evtElem.hasClass('wikiEditor-template-name')){if(event.ctrlKey||event.metaKey)return true;switch(event.which){case 37:case 38:case 39:case 40:return true;default:context.$iframe.data('ignoreKeypress',true);return false;}}else if($evtElem.hasClass('wikiEditor-template-text')){switch(event.which){case 13:context.$iframe.data('ignoreKeypress',true);context.fn.encapsulateSelection({'pre':'\n','peri':'','post':''});return false;default:return true;}}},keyup:function(context,event){if(context.$iframe.data('ignoreKeypress'))context.$iframe.data('ignoreKeypress',false);return true;},keypress:function(context,event){return(context.$iframe.data('ignoreKeypress')?false:true);}},exp:[{'regex':/{{/,'label':"TEMPLATE_BEGIN"},{'regex':/}}/,'label':"TEMPLATE_END",'markAfter':true}],cfg:{},fn:{create:function(context,config){context.modules.templateEditor={};},wrapTemplate:function($wrapper){var model=$wrapper.data('model');var context=$wrapper.data('marker').context;var $template=$wrapper.wrap('<span class="wikiEditor-template"></span>').addClass('wikiEditor-template-text wikiEditor-nodisplay').parent().addClass('wikiEditor-template-collapsed').prepend($('<span class="wikiEditor-template-expand wikiEditor-noinclude"></span>'+'<span class="wikiEditor-template-name wikiEditor-noinclude">'+'<span class="wikiEditor-template-label wikiEditor-noinclude">'+model.getName()+'</span>'+'<span class="wikiEditor-template-dialog wikiEditor-noinclude"></span>'+'</span>'));},unwrapTemplate:function($wrapper){$wrapper.parent().replaceWith($wrapper);},bindTemplateEvents:function($wrapper){var $template=$wrapper.parent('.wikiEditor-template');$template.find('.wikiEditor-template-name').click(function(){$.wikiEditor.modules.templateEditor.fn.createDialog($wrapper);return false;}).mousedown(function(){return false;});$template.find('.wikiEditor-template-expand').click(function(){$.wikiEditor.modules.templateEditor.fn.toggleWikiTextEditor($wrapper);return false;}).mousedown(function(){return false;});},toggleWikiTextEditor:function($wrapper){var context=$wrapper.data('marker').context;var $template=$wrapper.parent('.wikiEditor-template');context.fn.purgeOffsets();$template.toggleClass('wikiEditor-template-expanded').toggleClass('wikiEditor-template-collapsed').find('.wikiEditor-template-text').toggleClass('wikiEditor-nodisplay');},createDialog:function($wrapper){var context=$wrapper.data('marker').context;var $template=$wrapper.parent('.wikiEditor-template');var dialog={'titleMsg':'wikieditor-template-editor-dialog-title','id':'wikiEditor-template-dialog','html':'\ |
| 650 | +if($(node).parent().hasClass('wikiEditor-template')&&!model.isCollapsible()){$.wikiEditor.modules.templateEditor.fn.unwrapTemplate($(node));}else if(!$(node).parent().hasClass('wikiEditor-template')&&model.isCollapsible()){$.wikiEditor.modules.templateEditor.fn.wrapTemplate($(node));$.wikiEditor.modules.templateEditor.fn.bindTemplateEvents($(node));}},getAnchor:function(ca1,ca2){return $(ca1.parentNode).is('span.wikiEditor-template-text')?ca1.parentNode:null;},context:context});}else{tokenArray[beginIndex].label='TEMPLATE_FALSE_BEGIN';tokenIndex=beginIndex;}}}},keydown:function(context,event){if(context.$iframe.data('ignoreKeypress'))context.$iframe.data('ignoreKeypress',false);var $evtElem=event.jQueryNode;if($evtElem.hasClass('wikiEditor-template-label')){if(event.ctrlKey||event.metaKey)return true;switch(event.which){case 37:case 38:case 39:case 40:return true;default:context.$iframe.data('ignoreKeypress',true);return false;}}else if($evtElem.hasClass('wikiEditor-template-text')){switch(event.which){case 13:context.$iframe.data('ignoreKeypress',true);context.fn.encapsulateSelection({'pre':'\n','peri':'','post':''});return false;default:return true;}}},keyup:function(context,event){if(context.$iframe.data('ignoreKeypress'))context.$iframe.data('ignoreKeypress',false);return true;},keypress:function(context,event){return(context.$iframe.data('ignoreKeypress')?false:true);}},exp:[{'regex':/{{/,'label':"TEMPLATE_BEGIN"},{'regex':/}}/,'label':"TEMPLATE_END",'markAfter':true}],cfg:{},fn:{create:function(context,config){context.modules.templateEditor={};},wrapTemplate:function($wrapper){var model=$wrapper.data('model');var context=$wrapper.data('marker').context;var $template=$wrapper.wrap('<span class="wikiEditor-template"></span>').addClass('wikiEditor-template-text wikiEditor-nodisplay').parent().addClass('wikiEditor-template-collapsed').prepend($('<span class="wikiEditor-template-expand wikiEditor-noinclude"></span>'+'<span class="wikiEditor-template-name wikiEditor-noinclude">'+'<span class="wikiEditor-template-label wikiEditor-noinclude">'+model.getName()+'</span>'+'<span class="wikiEditor-template-dialog wikiEditor-noinclude"></span>'+'</span>'));},unwrapTemplate:function($wrapper){$wrapper.parent().replaceWith($wrapper);},bindTemplateEvents:function($wrapper){var $template=$wrapper.parent('.wikiEditor-template');$template.find('.wikiEditor-template-name').click(function(){$.wikiEditor.modules.templateEditor.fn.createDialog($wrapper);return false;}).mousedown(function(){return false;});$template.find('.wikiEditor-template-expand').click(function(){$.wikiEditor.modules.templateEditor.fn.toggleWikiTextEditor($wrapper);return false;}).mousedown(function(){return false;});},toggleWikiTextEditor:function($wrapper){var context=$wrapper.data('marker').context;var $template=$wrapper.parent('.wikiEditor-template');context.fn.purgeOffsets();$template.toggleClass('wikiEditor-template-expanded').toggleClass('wikiEditor-template-collapsed').find('.wikiEditor-template-text').toggleClass('wikiEditor-nodisplay');},createDialog:function($wrapper){var context=$wrapper.data('marker').context;var $template=$wrapper.parent('.wikiEditor-template');var dialog={'titleMsg':'wikieditor-template-editor-dialog-title','id':'wikiEditor-template-dialog','html':'\ |
651 | 651 | <fieldset>\ |
652 | 652 | <div class="wikiEditor-template-dialog-title" />\ |
653 | 653 | <div class="wikiEditor-template-dialog-fields" />\ |