Subversion-Projekte lars-tiefland.ci

Revision

Revision 1358 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
866 lars 1
	<style>
2
	label
3
	{
4
		cursor:pointer;
5
	}
6
	.fieldOrder
7
	{
8
		list-style-type: none;
9
		margin: 0;
10
		padding: 0;
11
		width: 50%;
12
	}
13
	.fieldOrder li
14
	{
15
		margin: 0 3px 3px 3px;
16
		padding: 0.4em;
17
		padding-left: 1.5em;
18
		height: 18px;
19
	}
20
	.fieldOrder li span
21
	{
22
		position: absolute;
23
		margin-left: -1.3em;
24
	}
25
	#products
26
	{
27
		float:left;
28
		width: 500px;
29
		margin-right: 2em;
30
	}
31
	.fieldOrder
32
	{
33
		width: 300px;
34
		float: left;
35
		margin-top: 1em;
36
	}
37
	/* style the list to maximize the droppable hitarea */
38
	.fieldOrder ul
39
	{
40
		margin: 0;
41
		padding: 1em 0 1em 3em;
42
	}
43
	</style>
44
	<script>
45
		function toggle_csvOpt()
46
		{
47
			format=$("#format").val();
48
			if(format=="CSV")
49
			{
50
				$("#reiter").tabs("enable",1);
51
			}
52
			else
53
			{
54
				$("#reiter").tabs("disable",1);
55
			}
56
		}
57
		function toggle_xmlOpt()
58
		{
59
			format=$("#format").val();
60
			if(format=="XML")
61
			{
62
				$("#reiter").tabs("enable",2);
63
			}
64
			else
65
			{
66
				$("#reiter").tabs("disable",2);
67
			}
68
		}
69
		$(function() {
70
			$('#reiter').tabs();
71
			$('#format').change(toggle_csvOpt).change(toggle_xmlOpt).change();
72
			$( "#sortable, #catalog" ).droppable({
73
				accept: ":not(.ui-sortable-helper)",
74
				drop: function( event, ui ) {
75
					$( this ).find( ".placeholder" ).remove();
76
					$( "<li></li>" ).text( ui.draggable.text() ).appendTo( this );
77
				}
78
			}).sortable({
79
				connectWith:".fieldOrder",
80
				items: "li:not(.placeholder)",
81
				sort: function() {
82
					// gets added unintentionally by droppable interacting with sortable
83
					// using connectWithSortable fixes this, but does not allow you to customize active/hoverClass options
84
					$( this ).removeClass( "ui-state-default" );
85
				},
86
				stop:function(event,ui)
87
				{
88
					result=$('#sortable').sortable("serialize");
89
					result+="&"+$('#configForm').serialize();
90
					$.post("/toolbox/preisagentur_config.php",result,function(html)
91
					{
92
						//$('#msg').html(html);
93
						ret=html.split("$$")
94
						$('#content').val(ret[1]);
95
						$('#prefix').val(ret[0])
96
					});
97
				}
98
			}).css("cursor","pointer").disableSelection();
99
		});
100
	</script>
101
	<form id="configForm" method="post" action="{$SCRIPT_NAME}">
102
		<div id="reiter">
103
			<ul>
104
				<li>
105
					<a href="#base">Basisdaten</a>
106
				</li>
107
				<li id="csvOpt">
108
					<a href="#csv">CSV-Dateioptionen</a>
109
				</li>
110
				<li id="xmlOpt">
111
					<a href="#xml">XML-Dateioptionen</a>
112
				</li>
113
				<li>
114
					<a href="#config">Konfiguration der Felder</a>
115
				</li>
116
			</ul>
117
			<div id="base">
118
				<table>
119
					<tr>
120
						<td>
121
							<label for="dateiname">Name der Datei</label>
122
						</td>
123
						<td>
124
							<input type="text" name="dateiname" id="dateiname" value="{$cfg.dateiname}" />
125
						</td>
126
					</tr>
127
					<tr>
128
						<td>
129
							<label for="format">Format der Datei</label>
130
						</td>
131
						<td>
132
							{html_options name="format" id="format" options=$formate selected=$cfg.format}
133
						</td>
134
					</tr>
135
					<tr>
136
						<td>
137
							<label for="html">HTML entfernen?</label>
138
						</td>
139
						<td>
140
							<input type="hidden" name="html" value="0" />
141
							<input type="checkbox" name="html" value="1" {if $cfg.html==1}checked="checked"{/if} id="html" />
142
						</td>
143
					</tr>
144
					<tr>
145
						<td>
1295 lars 146
							<label for="keinBild">Artikel ohne Bild übertragen?</label>
866 lars 147
						</td>
148
						<td>
149
							<input type="hidden" name="keinBild" value="0" />
150
							<input type="checkbox" name="keinBild" id="keinBild" value="1" {if $cfg.keinBild==1}checked="checked"{/if} />
151
						</td>
152
					</tr>
153
					<tr>
154
						<td>
1295 lars 155
							<label for="keinAehnlichesBild">Artikel mit ähnlichen Bildern<br /> (Symbolbildern) übertragen?</label>
866 lars 156
						</td>
157
						<td>
158
							<input type="hidden" name="keinAehnlichesBild" value="0" />
159
							<input type="checkbox" name="keinAehnlichesBild" id="keinAehnlichesBild" value="1" {if $cfg.keinAehnlichesBild==1}checked="checked"{/if} />
160
						</td>
161
					</tr>
162
				</table>
163
			</div>
164
			<div id="csv">
165
				<table>
166
					<tr>
167
						<td>
168
							<label for="utf8">Datei in UTF-8 ausgeben?</label>
169
						</td>
170
						<td>
171
							<input type="hidden" name="utf8" value="0" />
172
							<input type="checkbox" name="utf8" value="1" {if $cfg.utf8==1}checked="checked"{/if} id="utf8" />
173
						</td>
174
					</tr>
175
					<tr>
176
						<td style="text-align:right;">
177
							<label for="trenner">Trenner:</label>
178
						</td>
179
						<td>
180
							{html_options name="trenner" id="trenner" options=$trenner selected=$cfg.trenner}
181
						</td>
182
					</tr>
183
					<tr>
184
						<td style="text-align:right;">
1528 lars 185
							<label for="quote">Einschließungszeichen</label>
866 lars 186
						</td>
187
						<td>
188
							{html_options name="quote" id="quote" options=$quote selected=$cfg.quote}
189
						</td>
190
					</tr>
191
					<tr>
192
						<td>
193
							<label for="kopfzeile">Datei hat eine Kopfzeile?</label>
194
						</td>
195
						<td>
196
							<input type="hidden" name="kopfzeile" value="0" />
197
							<input type="checkbox" name="kopfzeile" value="1" {if $cfg.kopfzeile==1}checked="checked"{/if} id="kopfzeile" />
198
						</td>
199
					</tr>
200
				</table>
201
			</div>
202
			<div id="xml">
203
				<table>
204
					<tr>
205
						<td>
206
							<label for="cdata">Umlaute etc. nicht umwandeln?</label>
207
						</td>
208
						<td>
209
							<input type="hidden" name="cdata" value="0" />
210
							<input type="checkbox" name="cdata" value="1" {if $cfg.cdata==1}checked="checked"{/if} id="cdata" />
211
						</td>
212
					</tr>
213
				</table>
214
			</div>
215
			<div id="config">
216
				<table>
217
					<tr>
218
						<td style="width:50%;">
1295 lars 219
							<h2>Verfügbare Felder</h2>
866 lars 220
						</td>
221
						<td style="width:50%;">
222
							<h2>benutzte Felder und deren Reihenfolge</h2>
223
						</td>
224
					</tr>
225
					<tr>
226
						<td style="width:50%;vertical-align:top">
227
							<ul id="catalog" class="fieldOrder">
228
								{foreach $feldNamen as $fId=>$name}
229
								{if !in_array($fId,$felder) && in_array($fId,array_keys($prefixArr))}
230
								<li id="sortcol_{$fId}">{$name|utf8_encode}</li>
231
								{/if}
232
								{/foreach}
233
								<li></li>
234
							</ul>
235
						</td>
236
						<td style="width:50%;vertical-align:top">
237
							<ul id="sortable" class="fieldOrder">
238
								{if !$felder|count}
239
								<li>&nbsp;</li>
240
								{/if}
241
								{foreach $felder as $fId => $name}
242
								<li id="sortcol_{$name}">{$feldNamen[$name]|utf8_encode}</li>
243
								{/foreach}
244
							</ul>
245
						</td>
246
					</tr>
247
					<tr>
248
						<td colspan="2" style="text-align:center">
249
							<input type="hidden" name="aid" value="{$id}" />
250
							<input type="hidden" name="prefix" value="{$cfg.prefix|escape}" id="prefix" />
251
							<input type="hidden" name="content" value="{$cfg.content|escape}" id="content" />
252
						</td>
253
					</tr>
254
				</table>
255
			</div>
256
		</div>
257
		<div>
258
			<br />
259
			<button align="center">Konfiguration speichern</button>
260
		</div>
261
	</form>