MediaWiki:Common.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 131: Line 131:
tools: {
tools: {
"template": {
"template": {
label: '{{ - }}',
label: 'template',
type: 'button',
type: 'button',
icon: 'http://amwellclear.co.uk/w/images/3/30/Template.png',
icon: 'http://amwellclear.co.uk/w/images/3/30/Template.png',
Line 145: Line 145:
});
});
};
};
var customizeToolbar = function() {
$('#wpTextbox1').wikiEditor('addToToolbar', {
section: 'advanced',
group: 'format',
tools: {
"ISDAprov": {
label: 'isdaprov',
type: 'button',
icon: 'http://amwellclear.co.uk/w/images/e/ed/Button_I.PNG',
action: {
type: 'encapsulate',
options: {
pre: "{{isdaprov|",
post: "}}"
}
}
}
}
});
};


/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
/* Check if view is in edit mode and that the required modules are available. Then, customize the toolbar … */
Line 183: Line 159:
// Add the customizations to LiquidThreads' edit toolbar, if available
// Add the customizations to LiquidThreads' edit toolbar, if available
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );
mw.hook( 'ext.lqt.textareaCreated' ).add( customizeToolbar );


/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */