Subversion-Projekte lars-tiefland.ci

Revision

Revision 2335 | Zur aktuellen Revision | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
855 lars 1
<link rel="stylesheet" type="text/css" href="css/jquery-ui.custom.css">
2048 lars 2
<script src="/backend/js/jquery-form-wizard.js"></script>
3
<script src="/backend/js/jquery-form.js"></script>
4
<script src="/backend/js/jquery.validate.min.js"></script>
5
<script type="text/javascript" language="javascript" src="/backend/js/localization/validate/messages_de.js"></script>
855 lars 6
<script>
866 lars 7
	function checkLength(o,n,min,max,o_name)
8
	{
9
		if ( o.val().length > max || o.val().length < min )
10
		{
11
			o.addClass('ui-state-error');
1295 lars 12
			text="Länge des Feldes '" + n + "' muss zwischen "+min+" und "+max+" liegen.";
866 lars 13
			switch(o_name)
14
			{
15
				case "s_name":
16
					updateIniSectionTips(text);
17
					break;
18
				case "v_name":
19
					updateIniValueTips(text);
20
					break;
21
				default:
22
					updateTips(text);
23
					break;
24
			}
25
			return false;
26
		}
27
		else
28
		{
29
			return true;
30
		}
31
	}
32
	$(function()
33
	{
34
		var s_name = $("#s_name"),
35
		s_v_name = $('#s_v_name');
36
		var section_name=s_name.val(),
37
		v_name = $("#v_name"),
38
		g_name = $('#g_name'),
39
		ini_value_tips = $(".validateIniValueTips");
40
		ini_section_tips = $(".validateIniSectionTips");
41
		tips = $(".validateTips");
42
		$("#ini-section-form").dialog({
43
			autoOpen: false,
44
			height: "auto",
45
			width: 400,
46
			modal: true,
47
			buttons: {
48
				'neue Sektion erstellen': function() {
49
					var bValid = true;
50
					s_name.removeClass('ui-state-error');
51
					v_name.removeClass('ui-state-error');
52
					bValid = bValid && checkLength(s_name,"Sektionsname",1,255,'s_name');
1295 lars 53
					bValid = bValid && checkLength(s_v_name,"Schlüsselname",1,255,'s_name');
866 lars 54
					if (bValid) {
55
						attribs="";
56
						section_name=s_name.val();
57
						//$tabs.tabs("add", "#"+section_name, section_name );
58
						kType=$('#s_v_typ').val();
59
						if(kType=="integer")
60
						{
61
							v_min=$('#s_v_min_value').val();
62
							v_max=$('#s_v_max_value').val();
63
							attribs="&attribs[min]="+v_min+"&attribs[max]="+v_max;
64
						}
65
						if(kType=="list")
66
						{
67
							values=$('#s_v_values').val();
68
							attribs="&attribs[values]="+values;
69
							values=$('#s_v_options').val();
70
							attribs="&attribs[options]="+values;
71
						}
72
						attribs+="&attribs[type]="+kType;
73
						url="/toolbox/add_section.php?file={$cfg_file}&root={$root}&rubrik="+section_name+"&key="+s_v_name.val()+attribs;
74
						$.get(url,function(html)
75
						{
76
							$('#ini-section-form').dialog('close');
77
							location.reload();
78
						})
79
					}
80
				},
81
				'Abbruch': function() {
82
					$(this).dialog('close');
83
				}
84
			},
85
			close: function() {
86
				s_name.val('').removeClass('ui-state-error');
87
			}
88
		});
89
		$("#ini-value-form").dialog({
90
			autoOpen: false,
91
			height: "auto",
92
			width: 400,
93
			modal: true,
94
			buttons: {
95
				'neuen Wert erstellen': function() {
96
					var bValid = true;
97
					var kType=$('#typ').val();
98
					v_name.removeClass('ui-state-error');
1295 lars 99
					bValid = bValid && checkLength(v_name,"Schlüsselname",1,255,'v_name');
866 lars 100
					if (bValid) {
101
						sect_name=$('#sect_name').val();
102
						if(kType=="email")
103
						{
104
							typeStr='<input name="ini['+sect_name+']['+v_name.val()+']" value="" type="email" size="40"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][type]" value="email">';
105
						}
106
						else if(kType=="bool")
107
						{
108
							typeStr='<input name="ini['+sect_name+']['+v_name.val()+'][#]" value="0" type="hidden"><input name="ini['+sect_name+']['+v_name.val()+'][#]" value="1" type="checkbox"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][type]" value="bool">';
109
						}
110
						else if(kType=="list")
111
						{
112
							typeStr='<input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][type]" value="list"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][values]" value="'+$('#values').val()+'"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][optoins]" value="'+$('#options').val()+'">';
113
						}
114
						else if(kType=="integer")
115
						{
116
							v_min=$('#min_value').val();
117
							v_max=$('#max_value').val();
118
							opt='min="'+v_min+'" max="'+v_max+'"';
119
							attribs='<input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][min]" value="'+v_min+'"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][max]" value="'+v_max+'"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][type]" value="integer">';
120
							typeStr='<input name="ini['+sect_name+']['+v_name.val()+'][#]" value="" type="number" size="40" '+opt+'>'+attribs;
121
						}
122
						else
123
						{
124
							typeStr='<input name="ini['+sect_name+']['+v_name.val()+'][#]" value="" type="text" size="40"><input type="hidden" name="ini['+sect_name+']['+v_name.val()+'][@][type]" value="'+kType+'">';
125
						}
126
						html='<div id="row_'+sect_name+'__'+v_name.val()+'"><div style="float:left;" class="links">'+v_name.val()+'</div><div style="float:left;" class="rechts">'+typeStr+'</div><div style="clear:both;float:none;margin-bottom:10px;"></div></div>';
127
						$('#'+sect_name).append(html);
128
						//$('.del_key').click(del_ini_key).css("cursor","pointer");
129
						$(this).dialog('close');
130
					}
131
				},
132
				'Abbruch': function() {
133
					$(this).dialog('close');
134
				}
135
			},
136
			close: function() {
137
				v_name.val('').removeClass('ui-state-error');
138
			}
139
		});
140
		$('#tabs').tabs();
141
		$('label').css('cursor','pointer');
142
		$("#delete-ini-section-confirm-new").dialog(
143
		{
144
			resizable: false,
145
			height:"auto",
146
			width:400,
147
			autoOpen:false,
148
			modal: true,
149
			buttons:
150
			{
151
				'Rubrik loeschen': function() {
152
					s_id=$('#d_section').val();
153
					$.get("/toolbox/del_section.php?file={$cfg_file}&rubrik="+s_id+"&root={$root}",function(html){
154
						//alert(html);
155
						location.reload();
156
					});
157
					$(this).dialog('close');
158
				},
159
				'Abbruch': function() {
160
					$(this).dialog('close');
161
				}
162
			}
163
		});
164
 
165
		$('#createNewDocDialogMsg').dialog({
166
			autoOpen: false,
167
			height: "auto",
168
			width: 400,
169
			modal: true,
170
			buttons: {
171
				"OK": function() {
879 lars 172
					$('#').dialog("close");
866 lars 173
				}
174
			}
175
		});
176
		$('#create_new_file').button({
177
			icons:{
178
				primary: 'ui-icon-document'
179
			}
180
		}).click(createNewDoc);
181
		$("#delete-ini-key-confirm").dialog({
182
			resizable: false,
183
			height:"auto",
184
			width:400,
185
			autoOpen:false,
186
			modal: true,
187
			buttons: {
188
				'Schluessel loeschen': function() {
189
					k_id=$('#d_key').val();
190
					$('#row_'+k_id).remove();
855 lars 191
 
879 lars 192
					$('#delete-ini-key-confirm').dialog('close');
866 lars 193
				},
194
				'Abbruch': function() {
879 lars 195
					$('#delete-ini-key-confirm').dialog('close');
866 lars 196
				}
197
			}
198
		});
199
 
200
		$('#createNewDocDialogWizard').dialog({
201
			resizable: false,
202
			modal:true,
203
			autoOpen:false,
204
			width: 800
205
		});
206
		$('#back').click(function(){
207
			$('#demoForm').formwizard("reset");
208
		})
209
		$('#demoForm').formwizard({
210
			validationEnabled: true,
211
			formPluginEnabled: true,
212
			textSubmit: "Erstellen",
213
			textNext: "weiter",
214
			textBack: "zurueck",
215
			formOptions :
216
			{
217
				resetForm:true,
218
				success: function(data)
219
				{
220
					if(data)
221
					{
222
						erg=data.split("|");
223
						msg=erg[1];
224
						openFile=erg[0];
225
						if(openFile!="1")
226
						{
227
							$('#createNewDocDialogMsg').html(msg).dialog("open");
228
						}
229
						else
230
						{
231
							window.location.href="{$SCRIPT_NAME}?file="+msg;
232
						}
233
					}
234
				}
235
			}
236
		}).bind("before_step_shown",function(event,data){
237
			//alert(data.currentStep);
238
			if(data.currentStep=="second")
239
			{
240
				$('#createNewDocDialogStep2').load("/toolbox/getShops.php",$('#demoForm').serialize());
241
			}
242
			if(data.currentStep=="third")
243
			{
244
				$('#createNewDocDialogStep3').load("/toolbox/getTemplate.php",$('#demoForm').serialize());
245
			}
246
		});
247
		$( document ).tooltip({
248
			items:'span',
249
			position: {
250
				my: "center bottom-20",
251
				at: "center top",
252
				using: function( position, feedback ) {
253
					$( this ).css( position );
254
					$( "<div>" )
255
						.addClass( "arrow" )
256
						.addClass( feedback.vertical )
257
						.addClass( feedback.horizontal )
258
						.appendTo( this );
259
				}
260
			}
261
		});
262
	});
263
	function createNewDoc(e)
264
	{
265
		e.preventDefault();
266
		$('#demoForm').formwizard("reset");
267
		$('#createNewDocDialogStep1').load("/toolbox/getWebs.php",function(){
268
			$('#createNewDocDialogWizard').dialog("open");
269
		})
270
	}
855 lars 271
</script>
272
  <style>
273
  .ui-tooltip, .arrow:after {
866 lars 274
	border: 2px solid white;
855 lars 275
  }
276
  .ui-tooltip {
866 lars 277
	padding: 10px 20px;
278
	border-radius: 20px;
279
	font: bold 14px "Helvetica Neue", Sans-Serif;
280
	box-shadow: 0 0 7px black;
855 lars 281
  }
282
  .arrow {
866 lars 283
	width: 70px;
284
	height: 16px;
285
	overflow: hidden;
286
	position: absolute;
287
	left: 50%;
288
	margin-left: -35px;
289
	bottom: -16px;
855 lars 290
  }
291
  .arrow.top {
866 lars 292
	top: -16px;
293
	bottom: auto;
855 lars 294
  }
295
  .arrow.left {
866 lars 296
	left: 20%;
855 lars 297
  }
298
  .arrow:after {
866 lars 299
	content: "";
300
	background: black;
301
	position: absolute;
302
	left: 20px;
303
	top: -20px;
304
	width: 25px;
305
	height: 25px;
306
	box-shadow: 6px 5px 9px -9px black;
307
	-webkit-transform: rotate(45deg);
308
	-moz-transform: rotate(45deg);
309
	-ms-transform: rotate(45deg);
310
	-o-transform: rotate(45deg);
311
	tranform: rotate(45deg);
855 lars 312
  }
313
  .arrow.top:after {
866 lars 314
	bottom: -20px;
315
	top: auto;
855 lars 316
  }
317
			#demoWrapper {
318
				padding : 1em;
319
				width : 500px;
320
				border-style: solid;
321
			}
322
 
323
			#fieldWrapper {
324
			}
325
 
326
			#demoNavigation {
327
				margin-top : 0.5em;
328
				margin-right : 1em;
329
				text-align: right;
330
			}
331
 
332
			#data {
333
				font-size : 0.7em;
334
			}
335
 
336
			input {
337
				margin-right: 0.1em;
338
				margin-bottom: 0.5em;
339
			}
340
 
341
			.input_field_25em {
342
				width: 2.5em;
343
			}
344
 
345
			.input_field_3em {
346
				width: 3em;
347
			}
348
 
349
			.input_field_35em {
350
				width: 3.5em;
351
			}
352
 
353
			.input_field_12em {
354
				width: 12em;
355
			}
356
 
357
			label {
358
				margin-bottom: 0.2em;
359
				font-weight: bold;
360
				font-size: 0.8em;
361
			}
362
 
363
			label.error {
364
				color: red;
365
				font-size: 0.8em;
366
				margin-left : 0.5em;
367
			}
368
 
369
			.step span {
370
				float: right;
371
				font-weight: bold;
372
				padding-right: 0.8em;
373
			}
374
 
375
			.navigation_button {
376
				width : 70px;
866 lars 377
				margin-bottom:10px;
855 lars 378
			}
379
 
380
			#data {
381
					overflow : auto;
382
			}
383
 
384
			#step_visualization {
385
 
386
				margin : 2em;
387
			}
388
 
389
			#visualization_first{
390
				background-color : #ffffdd;
391
			}
392
 
393
			#visualization_finland{
394
				background-color : #ffff99;
395
			}
396
 
397
			#visualization_confirmation{
398
				background-color : #ffff44;
399
			}
400
 
401
			.visualization {
402
				border-style : solid;
403
				font-size: 0.8em;
404
			  font-weight: bold;
405
				padding-left: 1em;
406
				padding-right: 1em;
407
			}
866 lars 408
			.indent
409
			{
410
				padding:10px;
411
			}
412
 
855 lars 413
</style>
868 lars 414
{include file="list_configs.tpl"}
855 lars 415
{if $cfg_file}
1295 lars 416
<h1>Datei {$cfg_file} ändern</h1>
855 lars 417
<!-- Dateiinhalt -->
418
<form method="post">
866 lars 419
	<table width="100%" id="sections" cellspacing="0" cellpadding="0">
420
		<tr>
421
			<th class="links">Eigenschaft</th>
422
			<th class="rechts">Wert</th>
423
		</tr>
424
		<tr>
425
			<td colspan="2" align="center" class="links">&nbsp;
855 lars 426
{if $isTemplate===true}
1295 lars 427
			<span class="add ui-icon ui-icon-plus" id="add" style="cursor:pointer" title="Rubrik hinzufügen"></span>
866 lars 428
	{/if}
429
			</td>
430
		</tr>
431
	</table>
432
	<div id="tabs">
433
		<ul>
434
		{foreach $templateConfig as $section => $value}
435
			<li id="reiter_{$section}">
436
				<a href="#{$section}">{$section}</a>
437
				{if array_key_exists($section,$config) && $section!="none"}
2357 lars 438
				{if $smarty.session.uname=="admin" || $site=="weban.de"}
1295 lars 439
				<span class="delete_section ui-icon ui-icon-trash" id="delete__{$section}" style="float:right;cursor:pointer" title="Rubrik löschen"></span>
866 lars 440
				{/if}
441
				{/if}
442
				{if $isTemplate===false && !array_key_exists($section,$config)}
2357 lars 443
				{if $smarty.session.uname=="admin" || $site=="weban.de"}
866 lars 444
				<span class="activate_section ui-icon ui-icon-plus" id="activate__{$section}" style="float:right;cursor:pointer" title="Rubrik aktivieren"></span>
445
				{/if}
446
				{/if}
447
				{if $isTemplate===true}
1295 lars 448
				<span class="add_ini_value ui-icon ui-icon-plus" id="add--{$section}" style="float:right;cursor:pointer" title="Wert hinzufügen"></span>
866 lars 449
				{/if}
450
				{if $templateAttribs.$section["@"].comment}
451
				<span class="ui-icon ui-icon-info" style="float:right;cursor:help" title="{$templateAttribs.$section["@"].comment}"></span>
452
				{/if}
453
				{if is_array($templateAttribs.$section) && $isTemplate}
454
					{foreach $templateAttribs.$section["@"] as $attribName => $attribValue}
455
					<input type="hidden" name="ini[{$section}][@][{$attribName}]" value="{$attribValue}">
456
					{/foreach}
457
				{/if}
458
			</li>
459
		{/foreach}
460
		</ul>
461
		{foreach $templateConfig as $section => $key}
462
		<div id="{$section}">
463
			{foreach $key as $k=> $value}
464
			{if is_array($value)}
465
			{if isset($value[0])}
466
				{foreach $value as $key2=>$value2}
467
				<div style="float:left;margin-top:10px;" class="links">
468
					<div style="width:80%;float:left;">{$value2.name|default:$k}</div>
469
					<div style="width:20%;float:left;">
470
						{if is_array($templateAttribs.$section.$k) && $templateAttribs.$section.$k["@"].comment}
471
						<span class="ui-icon ui-icon-info" style="float:right;cursor:help" title="{$templateAttribs.$section.$k["@"].comment}"></span>
472
						{/if}
473
					</div>
474
				</div>
475
				<div style="float:left;margin-top:10px;width:79%" class="rechts">
476
				{foreach $value2 as $name=>$twert}
477
				<div style="float:left;padding-right:10px;width:300px;">
478
				{if is_array($templateAttribs.$section.$k.$key2.name) && $templateAttribs.$section.$k.$key2.name["@"].comment}
479
				<span class="ui-icon ui-icon-info" style="float:left;cursor:help" title="{$templateAttribs.$section.$k.$key2.name["@"].comment}"></span>
480
				{/if}
481
				<label for="{$section}_{$k}_{$key2}_{$name}">{$name}</label>
482
				<br>
868 lars 483
				{include file="input.tpl" htmlName="ini[{$section}][{$k}][{$key2}][{$name}]" htmlId="{$section}_{$k}_{$key2}_{$name}" typeField=$templateAttribs.$section.$k.$key2.$name  wert="{$config.$section.$k.$key2.$name}"}
866 lars 484
				</div>
485
				{/foreach}
486
				</div>
487
				{/foreach}
488
			{elseif $templateAttribs.$section["@"].type=="list"}
489
				<div style="float:left;margin-top:10px;" class="links">
490
					<div style="width:80%;float:left;">{$k}</div>
491
					<div style="width:20%;float:left;">
492
						{if is_array($templateAttribs.$section.$k) && $templateAttribs.$section.$k["@"].comment}
493
						<span class="ui-icon ui-icon-info" style="float:right;cursor:help" title="{$templateAttribs.$section.$k["@"].comment}"></span>
494
						{/if}
495
					</div>
496
				</div>
497
				<div style="float:left;margin-top:10px;width:79%" class="rechts">
498
				{foreach $value as $key2=>$value2}
499
				<div style="float:left;padding-right:10px;width:300px;">
500
				{if is_array($templateAttribs.$section.$k.$key2) && $templateAttribs.$section.$k.$key2["@"].comment}
501
				<span class="ui-icon ui-icon-info" style="float:left;cursor:help" title="{$templateAttribs.$section.$k.$key2["@"].comment}"></span>
502
				{/if}
503
				<label for="{$section}_{$k}_{$key2}">{$key2}</label>
504
				<br>
868 lars 505
				{include file="input.tpl" htmlName="ini[{$section}][{$k}][{$key2}]" htmlId="{$section}_{$k}_{$key2}" typeField=$templateAttribs.$section.$k.$key2  wert="{$config.$section.$k.$key2}" disabled=""}
866 lars 506
				</div>
507
				{/foreach}
508
				</div>
509
			{else}
510
			<div style="float:left;margin-top:10px;" class="links">
511
				<div style="width:80%;float:left;">
512
					<label for="{$section}_{$k}_value">{$k}</label>
513
				</div>
514
				<div style="width:20%;float:left;">
515
					{if is_array($templateAttribs.$section.$k) && $templateAttribs.$section.$k["@"].comment}
516
					<span class="ui-icon ui-icon-info" style="float:right;cursor:help" title="{$templateAttribs.$section.$k["@"].comment}"></span>
517
					{/if}
518
				</div>
519
			</div>
520
			<div style="float:left;margin-top:10px;" class="rechts">
868 lars 521
				{include file="input.tpl" htmlName="ini[{$section}][{$k}][value]" htmlId="{$section}_{$k}_value" typeField=$templateAttribs.$section.$k wert=$config.$section.$k.value attribField="ini[{$section}][{$k}]"}
866 lars 522
			</div>
523
			{/if}
524
			<div class="break"></div>
525
			{else}
526
			<div id="row__{$section}__{$k}">
527
			<div style="float:left;margin-top:10px;" class="links">
528
				{assign var="disabled" value=""}
529
				{if !(is_array($config.$section) && array_key_exists($k,$config.$section))}
530
				{assign var="disabled" value="disabled='disabled'"}
531
				{/if}
532
				<div style="width:80%;float:left;">
533
					<label id="label_{$section}_{$k}" for="{$section}_{$k}">
534
				{if $disabled}<strike>{/if}{$k}{if $disabled}</strike>{/if}</label>
2357 lars 535
				{if $smarty.session.uname=="admin" || $site=="weban.de"}
1295 lars 536
				<span class="add_ini_value ui-icon ui-icon-plus" id="add--{$section}__{$k}" style="float:right;cursor:pointer;display:{if $disabled}inline{else}none{/if};" title="Wert hinzufügen"></span><span class="del_ini_value ui-icon ui-icon-trash" id="del--{$section}__{$k}" style="float:right;cursor:pointer;display:{if !$disabled}inline{else}none{/if};" title="Wert löschen"></span>
866 lars 537
				{/if}
538
				</div>
539
				<div style="width:20%;float:left;">
540
					{if is_array($templateAttribs.$section.$k) && $templateAttribs.$section.$k["@"].comment}
541
					<span class="ui-icon ui-icon-info" style="float:right;cursor:help" title="{$templateAttribs.$section.$k["@"].comment}"></span>
542
					{/if}
543
				</div>
544
			</div>
545
			<div style="float:left;margin-top:10px;width:70%;" class="rechts">
868 lars 546
				{include file="input.tpl" htmlName="ini[{$section}][{$k}]" htmlId="{$section}_{$k}" typeField=$templateAttribs.$section.$k wert=$config.$section.$k}
866 lars 547
			</div>
548
			</div>
549
			<div class="break"></div>
550
			{/if}
551
		{/foreach}
552
		</div>
553
		{/foreach}
554
	</div>
555
	<table width="100%" cellpadding="3" cellspacing="0">
556
		<tr>
557
			<td colspan="2" class="links" align="center">
558
				<input type="hidden" name="file" value="{$cfg_file}">
559
				<input type="hidden" name="mode" value="save">
560
				<input type="hidden" name="root" value="{$root}">
1295 lars 561
				<input type="submit" value="Daten ändern" id="changeFile">
866 lars 562
			</td>
563
		</tr>
564
	</table>
855 lars 565
</form>
566
{if $isTemplate===false}
567
<script>
866 lars 568
	$(function()
569
	{
570
		$('.activate_section').click(activate_section);
571
		$('.delete_section').click(delSection);
572
		{foreach $templateConfig as $section => $key}
573
		{if !array_key_exists($section,$config)}
574
		$('#tabs').tabs('disable',{$key@index});
575
		{/if}
576
		{/foreach}
577
		$('.add_ini_value').click(add_ini_value);
578
		$('.del_ini_value').click(del_ini_value);
579
	});
580
	function delSection()
581
	{
582
		s_id=this.id;
583
		s_id=s_id.split("__");
584
		s_id=s_id[1];
585
		$('#d_section').val(s_id);
586
		$('#d_section_out').html(s_id);
587
		$('#delete-ini-section-confirm-new').dialog('open');
588
		return false;
589
	}
590
	function activate_section()
591
	{
592
		s_id=this.id;
593
		s_id=s_id.split("__");
594
		$.get("/toolbox/activate_section.php?file={$cfg_file}&rubrik="+s_id[1]+"&root={$root}",function(html){
595
			location.reload();
596
		});
597
	}
598
	function add_ini_value(e)
599
	{
600
		e.preventDefault();
601
		e_id_full=this.id;
602
		e_id=e_id_full.split("--");
603
		e_id=e_id[1];
604
		e_id_2=e_id.split("__");
605
		e_key=e_id_2[1];
606
		e_sect=e_id_2[0];
607
		e_id=e_sect+"_"+e_key;
608
		e_id_2=e_sect+"__"+e_key;
609
		$('#'+e_id).removeAttr("disabled");
610
		$('#label_'+e_id).html(e_key);
611
		$('#add--'+e_id_2).hide();
612
		$('#del--'+e_id_2).show();
613
		$('#hidden-'+e_id).removeAttr("disabled");
614
	}
615
	function del_ini_value(e)
616
	{
617
		e.preventDefault();
618
		e_id_full=this.id;
619
		e_id=e_id_full.split("--");
620
		e_id=e_id[1];
621
		e_id_2=e_id.split("__");
622
		e_key=e_id_2[1];
623
		e_sect=e_id_2[0];
624
		e_id=e_sect+"_"+e_key;
625
		e_id_2=e_sect+"__"+e_key;
626
		$('#'+e_id).attr("disabled","disabled");
627
		$('#label_'+e_id).html("<strike>"+e_key+"</strike>");
628
		$('#del--'+e_id_2).hide();
629
		$('#add--'+e_id_2).show();
630
		$('#hidden-'+e_id).attr("disabled","disabled");
631
	}
855 lars 632
</script>
633
{else}
634
<script>
866 lars 635
	$(function(){
636
		$('.del_ini_value').click(del_ini_value);
637
		$('.delete_section').click(delSection);
638
		$('.add').click(add_ini_section);
639
		$('#number').hide();
640
		$('#list').hide();
641
		$('#s_number').hide();
642
		$('#s_list').hide();
643
		$('#typ').change(function(){
644
			kType=$(this).val();
645
			$('#number').hide();
646
			$('#list').hide();
647
			if(kType=="integer")
648
			{
649
				$('#number').show();
650
			}
651
			if(kType=="list")
652
			{
653
				$('#list').show();
654
			}
655
		});
656
		$('#s_v_typ').change(function(){
657
			kType=$(this).val();
658
			$('#s_number').hide();
659
			$('#s_list').hide();
660
			if(kType=="integer")
661
			{
662
				$('#s_number').show();
663
			}
664
			if(kType=="list")
665
			{
666
				$('#s_list').show();
667
			}
668
		});
669
		function updateTips(t) {
670
			tips
671
			.text(t)
672
			.addClass('ui-state-highlight');
673
			setTimeout(function() {
674
				ini_section_tips.removeClass('ui-state-highlight', 1500);
675
			}, 500);
676
		}
677
		function updateIniSectionTips(t) {
678
			ini_section_tips
679
			.text(t)
680
			.addClass('ui-state-highlight');
681
			setTimeout(function() {
682
				ini_section_tips.removeClass('ui-state-highlight', 1500);
683
			}, 500);
684
		}
685
		$('.add_ini_value').click(add_ini_value);
686
	});
687
	function add_ini_section()
688
	{
689
		$('#ini-section-form').dialog('open');
690
		return false;
691
	}
692
	function add_ini_value()
693
	{
694
		s_id=this.id.substr(5);
695
		$('#sect_name').val(s_id);
696
		$('#ini-value-form').dialog('open');
697
		return false;
698
	}
699
	function delSection()
700
	{
701
		s_id=this.id;
702
		s_id=s_id.split("__");
703
		s_id=s_id[1];
704
		$('#d_section').val(s_id);
705
		$('#d_section_out').html(s_id);
706
		$('#delete-ini-section-confirm-new').dialog('open');
707
		return false;
708
	}
709
	function del_ini_value(e)
710
	{
711
		e.preventDefault();
712
		e_id_full=this.id;
713
		e_id=e_id_full.split("--");
714
		e_id=e_id[1];
715
		e_id_2=e_id.split("__");
716
		e_key=e_id_2[1];
717
		e_sect=e_id_2[0];
718
		e_id=e_sect+"_"+e_key;
719
		e_id_2=e_sect+"__"+e_key;
720
		$('#d_section').val(e_sect);
721
		$('#d_key_out').html(e_key);
722
		$('#d_key').val(e_key);
723
		$('#d_section_out_2').html(e_sect);
724
		$("#delete-ini-key-confirm").dialog("open");
725
	}
855 lars 726
</script>
727
{/if}
728
{/if}
729
 
730
<div id="ini-section-form" title="Eine neue Rubrik erstellen">
866 lars 731
	<p class="validateIniSectionTips">Alle Felder sind Pflicht.</p>
732
	<form>
733
		<fieldset>
734
			<label for="s_name">Rubrikname</label>
735
			<input type="text" name="s_name" id="s_name" class="text ui-widget-content ui-corner-all"><br>
1295 lars 736
			<label for="v_name">Schlüsselame</label>
866 lars 737
			<input type="text" name="s_v_name" id="s_v_name" class="text ui-widget-content ui-corner-all">
738
			<br>
739
			<label for="s_v_typ">Eingabetyp:</label>
740
			<select id="s_v_typ">
741
			{html_options options=$types selected="string"}
742
			</select>
743
			<br>
744
			<div id="s_conf">
745
				<div id="s_number">
746
					<fieldset>
747
						<legend>Konfiguration dieses Typs</legend>
748
						<label for="s_v_min_value">minimaler Wert</label>
749
						<input type="text" value="-1" id="s_v_min_value">
750
						<label for="s_v_max_value">maximaler Wert</label>
751
						<input type="text" value="" id="s_v_max_value">
752
					</fieldset>
753
				</div>
754
				<div id="s_list">
755
					<label for="s_v_values">Listenwerte:</label>
756
					<input type="text" id="s_v_values" value="">
757
					<br>
758
					<label for="s_v_options">Ausgabewerte:</label>
759
					<input type="text" id="s_v_options" value="">
760
				</div>
761
			</div>
762
		</fieldset>
763
	</form>
855 lars 764
</div>
765
 
1295 lars 766
<div id="ini-value-form" title="Einen neuen Schlüssel erstellen">
866 lars 767
	<p class="validateIniValueTips">Alle Felder sind Pflicht.</p>
768
	<form>
769
		<fieldset>
770
			<label for="name">Name</label>
771
			<input type="text" name="v_name" id="v_name" class="text ui-widget-content ui-corner-all">
772
			<input type="hidden" name="sect_name" id="sect_name" value="" class="text ui-widget-content ui-corner-all">
773
			<br>
774
			<label for="typ">Eingabetyp:</label>
775
			<select id="typ">
776
			{html_options options=$types seleted="string"}
777
			</select>
778
			<br>
779
			<div id="conf">
780
				<div id="number">
781
					<fieldset>
782
						<legend>Konfiguration dieses Typs</legend>
783
						<label for="min_value">minimaler Wert</label>
784
						<input type="text" value="-1" id="min_value">
785
						<label for="max_value">maximaler Wert</label>
786
						<input type="text" value="" id="max_value">
787
					</fieldset>
788
				</div>
789
				<div id="list">
790
					<label for="values">Listenwerte:</label>
791
					<input type="text" id="values" value="">
792
					<br>
793
					<label for="options">Ausgabewerte:</label>
794
					<input type="text" id="options" value="">
795
				</div>
796
			</div>
797
		</fieldset>
798
	</form>
855 lars 799
</div>
800
 
1295 lars 801
<div id="delete-ini-section-confirm-new" title="Rubrik löschen?">
866 lars 802
	<p>
1295 lars 803
		<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Die Rubrik '<span id="d_section_out"></span>' wird permanent gelöscht. Sind sie sicher?
866 lars 804
	</p>
805
	<input type="hidden" id="d_section" value="">
855 lars 806
</div>
807
 
1295 lars 808
<div id="delete-ini-key-confirm" title="Schlüssel löschen?">
866 lars 809
	<p>
1295 lars 810
		<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Der Schlüssel '<span id="d_key_out"></span>' in der Rubrik '<span id="d_section_out_2"></span>' wird permanent gelöscht. Sind sie sicher?
866 lars 811
	</p>
812
	<input type="hidden" id="d_key" value="">
855 lars 813
</div>
814
 
815
<div id="createNewDocDialogMsg" title="neue Konfigurationsdatei anlegen - Ergebnis">
816
</div>
817
 
818
<div id="createNewDocDialogWizard" title="neue Konfigurationsdatei anlegen">
819
	<form id="demoForm" method="post" action="/toolbox/createConfig.php" class="bbq">
820
		<div id="fieldWrapper">
866 lars 821
			<div id="step_visualization"></div>
822
			<div class="step" id="first">
1295 lars 823
				<span class="font_normal_07em_black">neue Konfigurationsdatei anlegen - Schritt 1 - Web auswählen</span><br />
866 lars 824
				<div id="createNewDocDialogStep1" class="indent"></div>
825
			</div>
826
			<div id="second" class="step">
1295 lars 827
				<span class="font_normal_07em_black">neue Konfigurationsdatei anlegen - Schritt 2 - Shop auswählen</span><br />
866 lars 828
				<div id="createNewDocDialogStep2" class="indent"></div>
829
			</div>
830
			<div id="third" class="step">
1295 lars 831
				<span class="font_normal_07em_black">neue Konfigurationsdatei anlegen - Schritt 3 - Template auswählen</span><br />
866 lars 832
				<div id="createNewDocDialogStep3" class="indent"></div>
833
			</div>
834
			<div id="confirmation" class="step">
835
				<span class="font_normal_07em_black">neue Konfigurationsdatei anlegen - Schritt 4 - Auswahl der Shop-Umgebung</span><br />
836
				<span class="font_normal_07em_black">Mit dem Klck auf "Erstellen" wird die Konfigurationsdatei erstellt.</span><br /><br>
837
				<div id="createNewDocDialogStep4" class="indent">
838
				{html_radios output="online,local,dev,neu"|explode_str:',' values="online,local,dev,neu"|explode_str:',' name="env" separator="<br><br>" required}
839
				<input type="checkbox" name="open" value="1" id="openFile">
840
				</div>
841
			</div>
855 lars 842
		</div>
843
		<div id="demoNavigation">
844
			<input class="navigation_button" id="back" value="Back" type="reset" />
845
			<input class="navigation_button" id="next" value="Next" type="submit" />
846
		</div>
847
	</form>
848
</div>