<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/longTagFixer.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform-version/content/style.css"?>

<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">

<dialog id="zotero-long-tag-fixer" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
		buttons="accept,cancel"
		onload="Zotero_Long_Tag_Fixer.init()"
		ondialogcancel="Zotero_Long_Tag_Fixer.cancel()"
		ondialogaccept="Zotero_Long_Tag_Fixer.save()"
		title="&zotero.sync.error;">
	
	<script src="include.js"/>
	<script src="longTagFixer.js"/>
	
	<label value="&zotero.sync.longTagFixer.followingTagTooLong;"/>
	<groupbox>
		<textbox id="zotero-old-tag" multiline="true" rows="4" readonly="true" class="plain"/>
	</groupbox>
	<label>&zotero.sync.longTagFixer.syncedTagSizeLimit;</label>
	
	<separator class="thin"/>
	
	<label value="&zotero.sync.longTagFixer.splitEditDelete;"/>
	
	<separator/>
	
	<tabbox id="zotero-new-tag-actions">
		<tabs oncommand="Zotero_Long_Tag_Fixer.switchMode(this.selectedIndex)">
			<tab label="&zotero.sync.longTagFixer.split;"/>
			<tab label="&zotero.general.edit;"/>
			<tab label="&zotero.general.delete;"/>
		</tabs>
		<tabpanels>
			<!-- Split -->
			<vbox>
				<hbox align="center">
					<label>&zotero.sync.longTagFixer.splitAtThe;</label>
					<textbox id="zotero-old-tag-delimiter" size="1"
						oninput="this.nextSibling.value = Zotero.getString('general.character.' + (this.value.length > 1  ? 'plural' : 'singular')); Zotero_Long_Tag_Fixer.updateTagList();"/>
					<label/>
				</hbox>
				
				<separator class="thin"/>
				
				<listbox id="zotero-new-tag-list" rows="8"/>
				
				<separator class="thin"/>
				
				<label value="&zotero.sync.longTagFixer.uncheckedTagsNotSaved;"/>
				
				<hbox>
					<button label="&zotero.general.deselectAll;" oncommand="Zotero_Long_Tag_Fixer.deselectAll()"/>
					<button label="&zotero.general.selectAll;" oncommand="Zotero_Long_Tag_Fixer.selectAll()"/>
				</hbox>
			</vbox>
			
			<!-- Edit -->
			<vbox>
				<textbox id="zotero-new-tag-editor" multiline="true" flex="1"
					oninput="Zotero_Long_Tag_Fixer.updateEditLength(this.value.length)"/>
				<hbox id="zotero-new-tag-characters">
					<label id="zotero-new-tag-character-count"/>
					<label value="&zotero.sync.longTagFixer.characters;"/>
				</hbox>
			</vbox>
			
			<!-- Delete -->
			<vbox align="center" pack="center">
				<label value="&zotero.sync.longTagFixer.tagWillBeDeleted;"/>
			</vbox>
		</tabpanels>
	</tabbox>
</dialog>
