Project

General

Profile

« Previous | Next » 

Revision 334

Added by stefan over 18 years ago

Changed link target selection. Now: self, top, new. Ticket #145

View differences:

trunk/wb/languages/EN.php
224 224
$TEXT['TARGET'] = 'Target';
225 225
$TEXT['NEW_WINDOW'] = 'New Window';
226 226
$TEXT['SAME_WINDOW'] = 'Same Window';
227
$TEXT['TOP_FRAME'] = 'Top Frame';
227 228
$TEXT['PAGE_LEVEL_LIMIT'] = 'Page Level Limit';
228 229
$TEXT['SUCCESS'] = 'Success';
229 230
$TEXT['ERROR'] = 'Error';
trunk/wb/admin/pages/settings.php
364 364
	$template->set_var('SEARCHING_DISABLED', ' selected');
365 365
}
366 366
// Select what the page target is
367
if($results_array['target'] == '_top') {
368
	$template->set_var('TOP_SELECTED', ' selected');
369
} elseif($results_array['target'] == '_blank') {
370
	$template->set_var('BLANK_SELECTED', ' selected');
367
switch ($results_array['target']) {
368
	case '_top':
369
		$template->set_var('TOP_SELECTED', ' selected');
370
		break;
371
	case '_self':
372
		$template->set_var('SELF_SELECTED', ' selected');
373
		break;
374
	case '_blank':
375
		$template->set_var('BLANK_SELECTED', ' selected');
376
		break;
371 377
}
378
	
372 379

  
373 380
// Insert language text
374 381
$template->set_var(array(
......
394 401
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT'],
395 402
								'TEXT_NEW_WINDOW' => $TEXT['NEW_WINDOW'],
396 403
								'TEXT_SAME_WINDOW' => $TEXT['SAME_WINDOW'],
404
								'TEXT_TOP_FRAME' => $TEXT['TOP_FRAME'],
397 405
								'TEXT_ADMINISTRATORS' => $TEXT['ADMINISTRATORS'],
398 406
								'TEXT_PRIVATE_VIEWERS' => $TEXT['PRIVATE_VIEWERS'],
399 407
								'TEXT_REGISTERED_VIEWERS' => $TEXT['REGISTERED_VIEWERS'],
trunk/wb/admin/pages/settings.html
129 129
	</td>
130 130
	<td>
131 131
		<select name="target" style="WIDTH: 100%;" value="{TARGET}" />
132
			<option value="_top">{TEXT_PLEASE_SELECT}...</option>
133 132
			<option value="_blank"{BLANK_SELECTED}>{TEXT_NEW_WINDOW}</option>
134
			<option value="_top"{TOP_SELECTED}>{TEXT_SAME_WINDOW}</option>
133
			<option value="_self"{SELF_SELECTED}>{TEXT_SAME_WINDOW}</option>
134
			<option value="_top"{TOP_SELECTED}>{TEXT_TOP_FRAME}</option>
135 135
		</select>
136 136
	</td>
137 137
</tr>
trunk/wb/modules/menu_link/modify.html
19 19
		{TEXT_TARGET}:
20 20
	</td>
21 21
	<td>
22
		<select name="target" style="width: 100%;" value="{TARGET}" />
23
			<option value="_top">{TEXT_PLEASE_SELECT}...</option>
22
		<select name="target" style="WIDTH: 100%;" value="{TARGET}" />
24 23
			<option value="_blank"{BLANK_SELECTED}>{TEXT_NEW_WINDOW}</option>
25
			<option value="_top"{TOP_SELECTED}>{TEXT_SAME_WINDOW}</option>
24
			<option value="_self"{SELF_SELECTED}>{TEXT_SAME_WINDOW}</option>
25
			<option value="_top"{TOP_SELECTED}>{TEXT_TOP_FRAME}</option>
26 26
		</select>
27 27
	</td>
28 28
</tr>
trunk/wb/modules/menu_link/modify.php
44 44
								'TEXT_TARGET' => $TEXT['TARGET'],
45 45
								'TEXT_NEW_WINDOW' => $TEXT['NEW_WINDOW'],
46 46
								'TEXT_SAME_WINDOW' => $TEXT['SAME_WINDOW'],
47
								'TEXT_TOP_FRAME' => $TEXT['TOP_FRAME'],
47 48
								'TEXT_SAVE' => $TEXT['SAVE'],
48 49
								'TEXT_CANCEL' => $TEXT['CANCEL'],
49 50
								'TEXT_PLEASE_SELECT' => $TEXT['PLEASE_SELECT']
50 51
								)
51 52
						);
52 53

  
53
// Select target
54
if($target == '_blank') {
55
	$template->set_var('BLANK_SELECTED', ' selected');
56
} elseif($target == '_top') {
57
	$template->set_var('TOP_SELECTED', ' selected');
54
// Select what the page target is
55
switch ($target) {
56
	case '_top':
57
		$template->set_var('TOP_SELECTED', ' selected');
58
		break;
59
	case '_self':
60
		$template->set_var('SELF_SELECTED', ' selected');
61
		break;
62
	case '_blank':
63
		$template->set_var('BLANK_SELECTED', ' selected');
64
		break;
58 65
}
59 66

  
60 67
// Parse template object

Also available in: Unified diff