Difference between revisions of "MediaWiki:Vector.js"

From Korean Wiki Project
Jump to: navigation, search
(trying to add more buttons)
 
(11 intermediate revisions by one user not shown)
Line 15: Line 15:
 
'tools': {
 
'tools': {
 
'Ac': {
 
'Ac': {
label: 'AutoreCitato',
+
label: 'Underline text',
 
type: 'button',
 
type: 'button',
icon: 'http://upload.wikimedia.org/wikipedia/commons/6/6d/Button_AC.png',
+
icon: 'http://koreanwikiproject.com/wiki/images/Underline_button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: "{{AutoreCitato||",
+
pre: "<u>",
post: "}}"
+
post: "</u>"
 
}
 
}
 
}
 
}
Line 33: Line 33:
 
'tools': {
 
'tools': {
 
'Center': {
 
'Center': {
label: 'Centra',
+
label: 'Skyblue font',
 
type: 'button',
 
type: 'button',
icon: 'http://upload.wikimedia.org/wikipedia/commons/5/5f/Button_center.png',
+
icon: 'http://koreanwikiproject.com/wiki/images/Skyblue_font_button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: "{{Centrato||",
+
pre: "<font color=DeepSkyBlue>",
post: "}}"
+
post: "</font>"
 
}
 
}
 
}
 
}
Line 51: Line 51:
 
'tools': {
 
'tools': {
 
'Section': {
 
'Section': {
label: 'Sezione',
+
label: 'Pink font',
 
type: 'button',
 
type: 'button',
icon: 'http://upload.wikimedia.org/wikipedia/commons/4/44/Button_comillas_latinas.png',
+
icon: 'http://koreanwikiproject.com/wiki/images/Pink_font_button.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: "<section begin=1 />",
+
pre: "<font color=deeppink>",
post: "<section begin=1 />"
+
post: "</font>"
 
}
 
}
 
}
 
}
Line 64: Line 64:
 
}
 
}
 
} );
 
} );
$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
+
                $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 
'section': 'advanced',
 
'section': 'advanced',
 
'group': 'format',
 
'group': 'format',
 
'tools': {
 
'tools': {
'Pt': {
+
'Section': {
label: 'Pt',
+
label: 'Green font',
 +
type: 'button',
 +
icon: 'http://koreanwikiproject.com/wiki/images/Green_font_button.png',
 +
action: {
 +
type: 'encapsulate',
 +
options: {
 +
pre: "<font color=green>",
 +
post: "</font>"
 +
}
 +
}
 +
}
 +
}
 +
} );
 +
                $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
 +
'section': 'advanced',
 +
'group': 'insert',
 +
'tools': {
 +
'Section': {
 +
label: 'Insert TTMIK top template',
 
type: 'button',
 
type: 'button',
icon: 'http://upload.wikimedia.org/wikipedia/commons/4/4b/Button_class_text.png',
+
icon: 'http://koreanwikiproject.com/wiki/images/TTMIK_icon_top.png',
 
action: {
 
action: {
 
type: 'encapsulate',
 
type: 'encapsulate',
 
options: {
 
options: {
pre: "{{pt||",
+
pre: "{{TTMIK bottom}}",
post: "}}"
+
post: ""
 
}
 
}
 
}
 
}

Latest revision as of 11:04, 28 November 2010

/* Any JavaScript here will be loaded for users using the Vector skin */
// <pre>

//SAL
//inc("Utente:IPork/SAL.js");
 
// PULSANTI ADDIZIONALI per skin Vector :-)
// AutoreCitato: confronta codice sotto con vecchia versione per monobook. La funzione è autonoma, 
// non richiede il caricamento di altri script!
if ( typeof $j != 'undefined' && typeof $j.fn.wikiEditor != 'undefined' ) {
	$j(document).ready( function() {
		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'Ac': {
					label: 'Underline text',
					type: 'button',
					icon: 'http://koreanwikiproject.com/wiki/images/Underline_button.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<u>",
							post: "</u>"
						}
					}
				}
			}
		} );
                $j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'Center': {
					label: 'Skyblue font',
					type: 'button',
					icon: 'http://koreanwikiproject.com/wiki/images/Skyblue_font_button.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<font color=DeepSkyBlue>",
							post: "</font>"
						}
					}
				}
			}
		} ); 
                		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'Section': {
					label: 'Pink font',
					type: 'button',
					icon: 'http://koreanwikiproject.com/wiki/images/Pink_font_button.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<font color=deeppink>",
							post: "</font>"
						}
					}
				}
			}
		} );
                		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'format',
			'tools': {
				'Section': {
					label: 'Green font',
					type: 'button',
					icon: 'http://koreanwikiproject.com/wiki/images/Green_font_button.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "<font color=green>",
							post: "</font>"
						}
					}
				}
			}
		} );
                		$j( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'advanced',
			'group': 'insert',
			'tools': {
				'Section': {
					label: 'Insert TTMIK top template',
					type: 'button',
					icon: 'http://koreanwikiproject.com/wiki/images/TTMIK_icon_top.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: "{{TTMIK bottom}}",
							post: ""
						}
					}
				}
			}
		} );
 
	} );
}