User:Micki/extratoolbarbuttons.js: Difference between revisions
Content deleted Content added
No edit summary |
mNo edit summary |
||
Line 17: | Line 17: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Strikethrough': { |
'Strikethrough': { |
||
label: 'Precrtan tekst', |
label: 'Precrtan tekst', |
||
Line 35: | Line 29: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Template': { |
'Template': { |
||
label: 'Šablon', |
label: 'Šablon', |
||
Line 53: | Line 41: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'External link': { |
'External link': { |
||
label: 'Spoljašnja veza', |
label: 'Spoljašnja veza', |
||
Line 71: | Line 53: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Internal link': { |
'Internal link': { |
||
label: 'Unutrašnja veza', |
label: 'Unutrašnja veza', |
||
Line 89: | Line 65: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Link': { |
'Link': { |
||
label: 'Veza', |
label: 'Veza', |
||
Line 107: | Line 77: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Vertical line': { |
'Vertical line': { |
||
label: 'Uspravna crta', |
label: 'Uspravna crta', |
||
Line 124: | Line 88: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Category': { |
'Category': { |
||
label: 'Kategorija', |
label: 'Kategorija', |
||
Line 142: | Line 100: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Advanced image': { |
'Advanced image': { |
||
label: 'Slika 250px', |
label: 'Slika 250px', |
||
Line 160: | Line 112: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Smile': { |
'Smile': { |
||
label: 'Smeje se', |
label: 'Smeje se', |
||
Line 177: | Line 123: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Winking': { |
'Winking': { |
||
label: 'Namiguje', |
label: 'Namiguje', |
||
Line 194: | Line 134: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Done': { |
'Done': { |
||
label: 'Urađeno', |
label: 'Urađeno', |
||
Line 212: | Line 146: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'advanced', |
|||
'group': 'format', |
|||
'tools': { |
|||
'Not done': { |
'Not done': { |
||
label: 'Nije urađeno', |
label: 'Nije urađeno', |
||
Line 281: | Line 209: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'frown': { |
'frown': { |
||
label: 'Frown', |
label: 'Frown', |
||
Line 298: | Line 220: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'plain': { |
'plain': { |
||
label: 'Plain', |
label: 'Plain', |
||
Line 315: | Line 231: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'wink': { |
'wink': { |
||
label: 'Wink', |
label: 'Wink', |
||
Line 332: | Line 242: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'tongue': { |
'tongue': { |
||
label: 'Tongue', |
label: 'Tongue', |
||
Line 349: | Line 253: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'surprised': { |
'surprised': { |
||
label: 'Surprised', |
label: 'Surprised', |
||
Line 366: | Line 264: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'confused': { |
'confused': { |
||
label: 'Confused', |
label: 'Confused', |
||
Line 383: | Line 275: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'grin': { |
'grin': { |
||
label: 'Grin', |
label: 'Grin', |
||
Line 400: | Line 286: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'braces': { |
'braces': { |
||
label: 'Braces grin', |
label: 'Braces grin', |
||
Line 417: | Line 297: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'crying': { |
'crying': { |
||
label: 'Crying', |
label: 'Crying', |
||
Line 434: | Line 308: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'blush': { |
'blush': { |
||
label: 'Blush', |
label: 'Blush', |
||
Line 451: | Line 319: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'laughing': { |
'laughing': { |
||
label: 'Laughing', |
label: 'Laughing', |
||
Line 468: | Line 330: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'kiss': { |
'kiss': { |
||
label: 'Kiss', |
label: 'Kiss', |
||
Line 485: | Line 341: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'glasses': { |
'glasses': { |
||
label: 'Glasses', |
label: 'Glasses', |
||
Line 502: | Line 352: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'nerd': { |
'nerd': { |
||
label: 'Nerd', |
label: 'Nerd', |
||
Line 519: | Line 363: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'angel': { |
'angel': { |
||
label: 'Angel', |
label: 'Angel', |
||
Line 536: | Line 374: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'devil': { |
'devil': { |
||
label: 'Devil', |
label: 'Devil', |
||
Line 553: | Line 385: | ||
} |
} |
||
} |
} |
||
} |
}, |
||
} |
|||
}); |
|||
$('#wpTextbox1').wikiEditor('addToToolbar', { |
|||
'section': 'emoticons', |
|||
'group': 'emoticons', |
|||
'tools': { |
|||
'monkey': { |
'monkey': { |
||
label: 'Monkey', |
label: 'Monkey', |
Revision as of 11:09, 22 June 2012
/*<nowiki><pre>*/
var customizeToolbar = function () {
//EXTRA TOOLBAR BUTTONS
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'advanced',
'group': 'format',
'tools': {
'Blockquote': {
label: 'Navodnici',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png',
action: {
type: 'encapsulate',
options: {
pre: "„",
post: "“"
}
}
},
'Strikethrough': {
label: 'Precrtan tekst',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/45/Gnome-format-text-strikethrough.svg/25px-Gnome-format-text-strikethrough.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "<s>",
post: "</s>"
}
}
},
'Template': {
label: 'Šablon',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/d/dd/Vector_toolbar_template_button.png',
action: {
type: 'encapsulate',
options: {
pre: "{{",
post: "}}"
}
}
},
'External link': {
label: 'Spoljašnja veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/49/Gnome-go-previous.svg/25px-Gnome-go-previous.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[",
post: "]"
}
}
},
'Internal link': {
label: 'Unutrašnja veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/9/94/Gnome-go-next.svg/25px-Gnome-go-next.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[",
post: "]]"
}
}
},
'Link': {
label: 'Veza',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/2/27/Gnome-go-last.svg/25px-Gnome-go-last.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[|",
post: "]]"
}
}
},
'Vertical line': {
label: 'Uspravna crta',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/46/Gnome-go-first.svg/25px-Gnome-go-first.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "|",
}
}
},
'Category': {
label: 'Kategorija',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Gnome-go-bottom.svg/25px-Gnome-go-bottom.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[Category:",
post: "]]"
}
}
},
'Advanced image': {
label: 'Slika 250px',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Image-x-generic.svg/25px-Image-x-generic.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:",
post: "|thumb|right|250px|Opis]]"
}
}
},
'Smile': {
label: 'Smeje se',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile.svg|20px]]",
}
}
},
'Winking': {
label: 'Namiguje',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-wink.svg|20px]]",
}
}
},
'Done': {
label: 'Urađeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0e/Dialog-apply.svg/25px-Dialog-apply.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "{{done}} ",
post: " ~~~~"
}
}
},
'Not done': {
label: 'Nije urađeno',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Gnome-colors-window-close.svg/25px-Gnome-colors-window-close.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "{{not done}} ",
post: " ~~~~"
}
}
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'main',
'group': 'insert',
'tools': {
'Signature': {
label: 'Potpis',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/7/79/Insert-signature.png',
action: {
type: 'encapsulate',
options: {
pre: " ~~~~",
}
}
}
}
});
//EMOTICONS
$('#wpTextbox1').wikiEditor('addToToolbar', {
'sections': {
'emoticons': {
'type': 'toolbar',
'label': 'Emoticons'
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'emoticons',
'groups': {
'emoticons': {
'label': 'Emoticons'
}
}
});
$('#wpTextbox1').wikiEditor('addToToolbar', {
'section': 'emoticons',
'group': 'emoticons',
'tools': {
'smile': {
label: 'Smile',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/25px-Face-smile.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile.svg|20px]]"
}
}
},
'frown': {
label: 'Frown',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/06/Face-sad.svg/25px-Face-sad.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-sad.svg|20px]]"
}
}
},
'plain': {
label: 'Plain',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Face-plain.svg/25px-Face-plain.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-plain.svg|20px]]"
}
}
},
'wink': {
label: 'Wink',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/25px-Face-wink.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-wink.svg|20px]]"
}
}
},
'tongue': {
label: 'Tongue',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/7e/Face-tongue.svg/25px-Face-tongue.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-tongue.svg|20px]]"
}
}
},
'surprised': {
label: 'Surprised',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-surprise.svg/25px-Face-surprise.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-surprise.svg|20px]]"
}
}
},
'confused': {
label: 'Confused',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/1e/Face-confused.svg/25px-Face-confused.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-confused.svg|20px]]"
}
}
},
'grin': {
label: 'Grin',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/25px-Face-grin.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin.svg|20px]]"
}
}
},
'braces': {
label: 'Braces grin',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Face-grin-braces.svg/25px-Face-grin-braces.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin-braces.svg|20px]]"
}
}
},
'crying': {
label: 'Crying',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Face-crying.svg/25px-Face-crying.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-crying.svg|20px]]"
}
}
},
'blush': {
label: 'Blush',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Face-blush.svg/25px-Face-blush.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-blush.svg|20px]]"
}
}
},
'laughing': {
label: 'Laughing',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/1/15/Face-smile-big.svg/25px-Face-smile-big.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-smile-big.svg|20px]]"
}
}
},
'kiss': {
label: 'Kiss',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/a/a8/Face-kiss.svg/25px-Face-kiss.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-kiss.svg|20px]]"
}
}
},
'glasses': {
label: 'Glasses',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/0f/Face-glasses.svg/25px-Face-glasses.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-glasses.svg|20px]]"
}
}
},
'nerd': {
label: 'Nerd',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/0/03/Face-grin_expert.svg/25px-Face-grin_expert.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-grin_expert.svg|20px]]"
}
}
},
'angel': {
label: 'Angel',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/d/d5/Face-angel.svg/25px-Face-angel.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-angel.svg|20px]]"
}
}
},
'devil': {
label: 'Devil',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/25px-Face-devil-grin.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-devil-grin.svg|20px]]"
}
}
},
'monkey': {
label: 'Monkey',
type: 'button',
icon: '//upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-monkey.svg/25px-Face-monkey.svg.png',
action: {
type: 'encapsulate',
options: {
pre: "[[File:Face-monkey.svg|20px]]"
}
}
}
}
});
//REMOVING THINGS
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'help',
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'file'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'signature'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'main',
'group': 'insert',
'tool': 'signature-ns0'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'heading',
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'ulist'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'olist'
});
$('#wpTextbox1').wikiEditor('removeFromToolbar', {
'section': 'advanced',
'group': 'format',
'tool': 'indent'
});
};
if ($.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {
mw.loader.using('user.options', function () {
if (mw.user.options.get('usebetatoolbar')) {
mw.loader.using('ext.wikiEditor.toolbar', function () {
$(document).ready(customizeToolbar);
});
}
});
}
/*</nowiki></pre>*/