Uživatel:Shlomo/vector.js

Z Wikislovníku
Skočit na navigaci Skočit na vyhledávání

Poznámka: Po zveřejnění musíte vyprázdnit cache vašeho prohlížeče, jinak změny neuvidíte.

  • Firefox / Safari: Při kliknutí na Aktualizovat držte Shift nebo stiskněte Ctrl-F5 nebo Ctrl-R (na Macu ⌘-R)
  • Google Chrome: Stiskněte Ctrl-Shift-R (na Macu ⌘-Shift-R)
  • Internet Explorer / Edge: Při kliknutí na Aktualizovat držte Ctrl nebo stiskněte Ctrl-F5
  • Opera: Stiskněte Ctrl-F5.
jQuery( document ).ready( function ( $ ) {
    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'sections': {
                        'citations': {
                                'type': 'toolbar', // Can also be 'booklet'
                                'label': 'Citace'
                        }
                }
        } );

    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'citations',
                        'groups': {
                                'dictionaries': {
                                        'label': 'Slovníky'
                        		},
                                'literature': {
                                        'label': 'Citační šablony'
                        		},
                                'instruments': {
                                        'label': 'Nástroje'
                        		}
                		}
        } );
    $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'citations',
                'group': 'dictionaries',
                'tools': {
                        'semitské': {
                                label: 'Semitské jazyky', 
                                type: 'select',
                                list: {
				'even-sosan-1973' : {
					'label': 'Even Šošan 1973',
					'action': {
						'type': 'encapsulate',
						'options': {
							'pre': "\x7b\x7bEven Šošan|rok=1973|strany=",
							'peri': 'číslo strany',
							'post': "|heslo=}}",
							'ownline': false
						}
					}
				},
				'even-sosan-1997' : {
					'label': 'Even Šošan 1997',
					'action': {
						'type': 'encapsulate',
						'options': {
							'pre': "\x7b\x7bEven Šošan|rok=1997|strany=",
							'peri': 'číslo strany',
							'post': "|heslo=}}",
							'ownline': false
						}
					}
                                        }
                                }
                        }
                }
        } );
        $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'citations',
                'group': 'literature',
                'tools': {
                        'citmono': {
                                label: 'Citace monografie', 
                                type: 'button',
                                icon: 'http://upload.wikimedia.org/wikipedia/commons/e/ef/Button_cite_book.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                pre: "\x7b\x7bCitace monografie\n | jméno = ",
                                                post: "\n | příjmení = \n | titul = \n | vydavatel = \n | místo = \n | rok = \n | isbn = \n | url = \n | kapitola = \n | typ kapitoly = \n | počet stran = \n | strany = \n | jazyk = \n}}"
                                        }
                                }
                        }
                }
        } );
        $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'main',
                'group': 'format',
                'tools': {
                        'strikethroug': {
                                label: 'Strike', // or use labelMsg for a localized label, see above
                                type: 'button',
                                icon: 'http://upload.wikimedia.org/wikipedia/commons/6/6d/Vector_strikeout.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': "<s>",
                                                'post': "</s>"
                                        }
                                }
                        }
                }
        } );
        $( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
                'section': 'main',
                'group': 'format',
                'tools': {
                        'quotecs': {
                                label: 'Quotation mark', // or use labelMsg for a localized label, see above
                                type: 'button',
                                icon: 'http://upload.wikimedia.org/wikipedia/commons/2/2f/Toolbaricon_quote_1.png',
                                action: {
                                        type: 'encapsulate',
                                        options: {
                                                'pre': "„",
                                                'post': "“"
                                        }
                                }
                        }
                }
        } );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'literature',
			'tools': {
				'citelmono': {
					'label': 'Citace elektronické monografie',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/9/91/Button_cite_web.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\x7b\x7bCitace elektronické monografie\n | příjmení = ",
							post: "\n | jméno = \n | titul = \n | url = \n | datum vydání = \n | datum aktualizace = \n | datum přístupu = " + (y = new Date().getFullYear ()) + "-" + (m = new Date ().getMonth () + 1) + "-" + (d = new Date ().getDate ()) + "\n | vydavatel = \n | jazyk = \n}}"
					}
				}
			}
		}
	} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'literature',
			'tools': {
				'citjour': {
					'label': 'Citace periodika',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/4/49/Button_cite_journal.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\x7b\x7bCitace periodika\n | příjmení = ",
							post: "\n | jméno = \n | spoluautoři = \n | titul = \n | periodikum = \n | odkaz na periodikum = \n | rok = \n | měsíc = \n | ročník = \n | číslo = \n | strany = \n | url = \n | issn = \n | jazyk = \n }}"
						}
					}
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'literature',
			'tools': {
				'citproc': {
					'label': 'Citace sborníku',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/7/74/Button_indented_transcluded_pages.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\x7b\x7bCitace sborníku\n | příjmení = ",
							post: "\n | jméno = \n | příjmení2 = \n | jméno2 = \n | odkaz na autora2 = \n | spoluautoři = \n | titul = \n | odkaz na titul = \n | příjmení sestavitele = \n | jméno sestavitele = \n | příjmení sestavitele2 = \n | jméno sestavitele2 = \n | spolusestavitelé = \n | sborník = \n | odkaz na sborník = \n | url = \n | vydavatel = \n | místo = \n | datum vydání = \n | rok vydání = \n | měsíc vydání = \n | den vydání = \n | isbn = \n | svazek = \n | strany = \n | jazyk = \n}}"
						}
					}
				}
			}
		} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'instruments',
			'tools': {
				'ref': {
					'label': 'Reference',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/8/81/Wikieditor-reference.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<ref>",
							post: "</ref>"
						}
					}
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'instruments',
			'tools': {
				'refname': {
					'label': 'Zobrazení referencí',
					'type': 'button',
					'icon': 'https://upload.wikimedia.org/wikipedia/commons/0/0a/Wikieditor-references-blue.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<references>\n",
							post: "\n</references>"
						}
					}
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'instruments',
			'tools': {
				'refname': {
					'label': 'Opakovaná reference',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/1/19/Wikieditor-reference-2.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "<ref name=\"",
							post: "\"/>"
						}
					}
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'citations',
			'group': 'instruments',
			'tools': {
				'nocit': {
					'label': 'Doplňte zdroj',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/9/94/Button_zdroj.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "\x7b\x7bsubst:Doplňte zdroj}}",
							post: ""
						}
					}
				}
			}
		} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'main',
			'group': 'format',
			'tools': {
				'langhe': {
					'label': 'Hebrejský překlad',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/d/d2/Button_flagicon.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "  | he = \x7b\x7bP|he|",
							post: "}}\n"
						}
					}
				}
			}
		} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'main',
			'group': 'format',
			'tools': {
				'language': {
					'label': 'Jiný překlad',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/b/b6/Vjazyce-button.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "  | ",
							post: " = \x7b\x7bP||}}\n"
						}
					}
				}
			}
		} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'main',
			'group': 'format',
			'tools': {
				'language': {
					'label': 'Diff',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/P_writing_icon.svg/28px-P_writing_icon.svg.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "[[Speciální:Diff/",
							peri: "číslo diffu",
							post: "]]"
						}
					}
				}
			}
		} );
$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'main',
			'group': 'format',
			'tools': {
				'language': {
					'label': 'Perm',
					'type': 'button',
					'icon': 'http://upload.wikimedia.org/wikipedia/commons/7/7b/Toolbar_clock.png',
					'action': {
						'type': 'encapsulate',
						'options': {
							pre: "[[Speciální:Permalink/",
							peri: "číslo revize",
							post: "]]"
						}
					}
				}
			}
		} );
} );