User:Altt311/discussmgt2.js

维基百科,自由的百科全书

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

if ( typeof $j != 'undefined' && typeof $.fn.wikiEditor != 'undefined' ) {
	$( function() { // Execute on load
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'discussmgt',
			'groups': {
				'votemgmt': {
					'label': ''
				},
				'discmgmt': {
					'label': ''  // or use labelMsg for a localized label, see above
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'discussmgt',
			'group': 'votemgmt',
			'tools': {
				'vote': {
					label: '投票/討論',
					type: 'select',
					list: {
						'support': {
							label: '支持',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{support}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'agree': {
							label: '贊成',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{agree}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'oppose': {
							label: '反對',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{oppose}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'neutral': {
							label: '中立',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{neutral}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'remind': {
							label: '提醒',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{remind}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'comment': {
							label: '意見',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{comment}\}',
									post: '—~~\~~\n'
								}
							}
						},
						'reply': {
							label: '回覆',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{reply}\}',
									post: '—~~\~~\n'
								}
							}
						}
					}
				},
				'votemgmt': {
					label: '投票管理',
					type: 'select',
					list: {
						'container': {
							label: '無效票框',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{\FollowLastIndent|#\|2=',
									post: '}\}'
								}
							}
						},
						'notQ': {
							label: '不合資格',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{Notqualifiedh}\}',
									post: '{\{Notqualifiedf}\}'
								}
							}
						},
						'noSign': {
							label: '無簽名',
								action: {
								type: 'encapsulate',
								options: {
									pre: '{\{Nosignh}\}',
									post: '{\{Nosignf}\}'
								}
							}
						},
						'dupe': {
							label: '重複票',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{voteduph}\}',
									post: '{\{votedupf}\}'
								}
							}
						},
						'overtime': {
							label: '超過時限',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{超過時限h}\}',
									post: '{\{超過時限f}\}'
								}
							}
						},
						'otherReason': {
							label: '其他原因',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{votevoidh}\}',
									post: '{\{votevoidf|原因}\}'
								}
							}
						}
					}
				}
			}
		} );
		$( '#wpTextbox1' ).wikiEditor( 'addToToolbar', {
			'section': 'discussmgt',
			'group': 'discmgmt',
			'tools': {
				'deltalk': {
					label: '刪除討論',
					type: 'button',
					icon: 'http://upload.wikimedia.org/wikipedia/commons/0/08/Button_badlang.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: '{\{deltalk|Altt311|\~~\~~\~|',
							periMsg: '理由',
							post: '}\}\n'
						}
					}
				},
				'clstalk': {
					label: '關閉討論及存檔',
					type: 'button',
					icon: 'http://upload.wikimedia.org/wikipedia/commons/0/03/Button_chapitre.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: '{\{closed|已解決|text=',
							periMsg: '討論內容',
							post: '}\}\n'
						}
					}
				},
				'saveto': {
					label: '指定存檔頁面',
					type: 'button',
					icon: 'http://upload.wikimedia.org/wikipedia/commons/d/d8/Button_archivo_borrar.png',
					action: {
						type: 'encapsulate',
						options: {
							pre: '{\{saveto|',
							periMsg: '存檔頁面',
							post: '}\}\n'
						}
					}
				},
				'movefrvp': {
					label: '客棧移動源',
					type: 'select',
					list: {
						'fromNews': {
							label: '消息',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:互助客栈/消息|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'fromPolicy': {
							label: '方針',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:互助客栈/方针|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'fromAssist': {
							label: '求助',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:互助客栈/求助|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'fromTech': {
							label: '技術',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:互助客栈/技术|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'fromMisc': {
							label: '其他',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:互助客栈/其他|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'fromEnq': {
							label: '詢問處',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{movedfrom|Wikipedia:詢問處|sign=~~\~~}\}',
									post: '\n'
								}
							}
						}
					}
				},
				'movetovp': {
					label: '客棧移動至',
					type: 'select',
					list: {
						'toNews': {
							label: '消息',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:互助客栈/消息|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'toPolicy': {
							label: '方針',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:互助客栈/方针|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'toAssist': {
							label: '求助',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:互助客栈/求助|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'toTech': {
							label: '技術',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:互助客栈/技术|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'toMisc': {
							label: '其他',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:互助客栈/其他|sign=~~\~~}\}',
									post: '\n'
								}
							}
						},
						'toEnq': {
							label: '詢問處',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{moveto|Wikipedia:詢問處|sign=~~\~~}\}',
									post: '\n'
								}
							}
						}
					}
				},
				'archivevp': {
					label: '客棧存檔',
					type: 'select',
					list: {
						'archiveNews': {
							label: '消息',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{subst:移自互助客栈|—\~~\~~|消息}\}',
									periMsg: '討論內容',
									post: '\n'
								}
							}
						},
						'archivePolicy': {
							label: '方針',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{subst:移自互助客栈|—\~~\~~|方针}\}',
									periMsg: '討論內容',
									post: '\n'
								}
							}
						},
						'archiveAssist': {
							label: '求助',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{subst:移自互助客栈|—\~~\~~|求助}\}',
									periMsg: '討論內容',
									post: '\n'
								}
							}
						},
						'archiveTech': {
							label: '技術',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{subst:移自互助客栈|—\~~\~~|技术}\}',
									periMsg: '討論內容',
									post: '\n'
								}
							}
						},
						'archiveOthers': {
							label: '其他',
							action: {
								type: 'encapsulate',
								options: {
									pre: '{\{subst:移自互助客栈|—\~~\~~|其他}\}',
									periMsg: '討論內容',
									post: '\n'
								}
							}
						}
					}
				}
			}
		} );
	} );
}