Subversion Repositories ezxajax_classattributes

Compare Revisions

Ignore whitespace Rev 1433 → Rev 1434

/trunk/extension/xajax_classattributes/design/standard/javascript/xajax_classattributes.js
135,6 → 135,7
// last attribute, move to top
attribute.parentNode.insertBefore( attribute, rows[0] );
attribute.parentNode.insertBefore( attributeHeader, attribute );
recalculatePlacement();
break;
}
else
143,6 → 144,7
var nextAttribute = rows[i+3];
attribute.parentNode.insertBefore( nextAttribute, attributeHeader );
attribute.parentNode.insertBefore( nextAttributeHeader, nextAttribute );
recalculatePlacement();
break;
}
}
154,6 → 156,7
// first attribute, move to bottom
attribute.parentNode.appendChild( attribute );
attribute.parentNode.insertBefore( attributeHeader, attribute );
recalculatePlacement();
break;
}
else
161,6 → 164,7
var previousAttributeHeader = rows[i-2];
attribute.parentNode.insertBefore( attribute, previousAttributeHeader );
attribute.parentNode.insertBefore( attributeHeader, attribute );
recalculatePlacement();
break;
}
}
168,3 → 172,17
}
}
}
 
function recalculatePlacement()
{
var attributesForm=document.getElementById( 'ClassEditForm' );
var priortyBox = attributesForm.elements;
j=1;
for(i=0;i<priortyBox.length;i++ )
{
if( (priortyBox[i].id).substring(0, 17 ) =='AttributePriority' )
{
priortyBox[i].value = j++;
}
}
}
/trunk/extension/xajax_classattributes/design/admin/templates/class/edit_xajax_attribute_cell_2.tpl
5,7 → 5,7
{* Attribute name. *}
<div class="block">
<label>{'Name'|i18n( 'design/admin/class/edit' )}:</label>
<input class="box" type="text" name="ContentAttribute_name[]" value="{$attribute.name|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" />
<input class="box" type="text" name="ContentAttribute_name[]" value="{$attribute.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" />
</div>
 
{* Attribute identifier. *}
/trunk/extension/xajax_classattributes/design/admin/templates/class/edit.tpl
47,13 → 47,13
{/section}
 
{* Main window *}
<form action={concat( $module.functions.edit.uri, '/', $class.id )|ezurl} method="post" name="ClassEdit">
<form action={concat( $module.functions.edit.uri, '/', $class.id, '/(language)/', $language_code )|ezurl} method="post" name="ClassEdit" id="ClassEditForm">
<input type="hidden" name="ContentClassHasInput" value="1" />
 
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
 
<h1 class="context-title">{$class.identifier|class_icon( 'normal', $class.name|wash )}&nbsp;{'Edit <%class_name> [Class]'|i18n( 'design/admin/class/edit',, hash( '%class_name', $class.name ) )|wash}</h1>
<h1 class="context-title">{$class.identifier|class_icon( 'normal', $class.name|wash )}&nbsp;{'Edit <%class_name> [Class]'|i18n( 'design/admin/class/edit',, hash( '%class_name', $class.nameList[$language_code] ) )|wash}</h1>
 
{* DESIGN: Mainline *}<div class="header-mainline"></div>
 
62,7 → 62,10
{* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content">
 
<div class="context-information">
<p class="date">{'Last modified'|i18n( 'design/admin/class/edit' )}:&nbsp;{$class.modified|l10n( shortdatetime )},&nbsp;{$class.modifier.contentobject.name|wash}</p>
<p class="modified">{'Last modified'|i18n( 'design/admin/class/edit' )}:&nbsp;{$class.modified|l10n( shortdatetime )},&nbsp;{$class.modifier.contentobject.name|wash}</p>
{def $locale = fetch( 'content', 'locale', hash( 'locale_code', $language_code ) )}
<p class="translation">{$locale.intl_language_name}&nbsp;<img src="{$language_code|flag_icon}" alt="{$language_code}" style="vertical-align: middle;" /></p>
{undef $locale}
</div>
 
<div class="context-attributes">
82,7 → 85,7
{* Object name pattern. *}
<div class="block">
<label>{'Object name pattern'|i18n( 'design/admin/class/edit' )}:</label>
<input class="box" type="text" name="ContentClass_contentobject_name" size="30" value="{$class.contentobject_name|wash}" title="{'Use this field to configure how the name of the objects are generated (also applies to nice URLs). Type in the identifiers of the attributes that should be used. The identifiers must be enclosed in angle brackets. Text outside angle brackets will be included as is.'|i18n( 'design/admin/class/edit' )}" />
<input class="box" type="text" id="className" name="ContentClass_name" size="30" value="{$class.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the class. The name field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" />
</div>
 
{* Container. *}
92,7 → 95,32
<input type="checkbox" name="ContentClass_is_container_checked" value="{$class.is_container}" {section show=$class.is_container|eq( 1 )}checked="checked"{/section} title="{'Use this checkbox to allow instances of the class to have sub items. If checked, it will be possible to create new sub-items. If not checked, the sub items will not be displayed.'|i18n( 'design/admin/class/edit' )}" />
</div>
 
{* Class Default Sorting *}
<div class="block">
<label>{'Default sorting of children'|i18n( 'design/admin/class/edit' )}:</label>
{def $sort_fields=fetch( content, available_sort_fields )
$title='Use these controls to set the default sorting method for the sub items of instances of the content class.'|i18n( 'design/admin/class/edit' ) }
<input type="hidden" name="ContentClass_default_sorting_exists" value="1" />
<select name="ContentClass_default_sorting_field" title="{$title}">
{foreach $sort_fields as $sf_key => $sf_item}
<option value="{$sf_key}" {if eq( $sf_key, $class.sort_field )}selected="selected"{/if}>{$sf_item}</option>
{/foreach}
</select>
<select name="ContentClass_default_sorting_order" title="{$title}">
<option value="0"{if eq($class.sort_order, 0)} selected="selected"{/if}>{'Descending'|i18n( 'design/admin/class/edit' )}</option>
<option value="1"{if eq($class.sort_order, 1)} selected="selected"{/if}>{'Ascending'|i18n( 'design/admin/class/edit' )}</option>
</select>
{undef $sort_fields $title}
</div>
 
{* Object availablility. *}
<div class="block">
<label>{'Default object availability'|i18n( 'design/standard/class/edit' )}:</label>
<input type="hidden" name="ContentClass_always_available_exists" value="1" />
<input type="checkbox" name="ContentClass_always_available"{if $class.always_available|eq(1)} checked="checked"{/if} title="{'Use this checkbox to set the default availability for the objects of this class. The availablility controls wether an object should be shown even if it does not exist in one of the languages specified by the "SiteLanguageList" setting. If this is the case, the system will use the main language of the object.'|i18n( 'design/admin/class/edit' )|wash}" />
</div>
 
<div class="block">
{section show=$attributes}
<input type="button" class="button" id="CollapseButton" value="{'Collapse all'|i18n( 'design/admin/class/edit' )}" onclick="javascript:toggleEvenRows('AttributesTable',false);" /> <input type="button" class="button" id="ExpandButton" value="{'Expand all'|i18n( 'design/admin/class/edit' )}" onclick="javascript:toggleEvenRows('AttributesTable',true);" />
{section-else}
111,6 → 139,7
<div class="listbutton">
<input type="image" src={'button-move_down.gif'|ezimage} alt="{'Down'|i18n( 'design/admin/class/edit' )}" name="MoveDown_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" {if $hasXajaxAccess}onclick="javascript:var result=xajax_moveClassAttribute( {$Attributes.item.id}, 1 );return !result;"{/if} />&nbsp;
<input type="image" src={'button-move_up.gif'|ezimage} alt="{'Up'|i18n( 'design/admin/class/edit' )}" name="MoveUp_{$Attributes.item.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" {if $hasXajaxAccess}onclick="javascript:var result=xajax_moveClassAttribute( {$Attributes.item.id}, 0 );return !result;"{/if} />
<input size="2" type="text" name="ContentAttribute_priority[]" value="{$Attributes.number}" id="AttributePriority_{$Attributes.item.id}" />
</div>
</th>
</tr>
126,7 → 155,7
{* Attribute name. *}
<div class="block">
<label>{'Name'|i18n( 'design/admin/class/edit' )}:</label>
<input class="box" type="text" name="ContentAttribute_name[]" value="{$Attributes.item.name|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" />
<input class="box" type="text" name="ContentAttribute_name[]" value="{$Attributes.item.nameList[$language_code]|wash}" title="{'Use this field to set the informal name of the attribute. This field can contain whitespaces and special characters.'|i18n( 'design/admin/class/edit' )}" />
</div>
 
{* Attribute identifier. *}
/trunk/extension/xajax_classattributes/design/admin/templates/class/edit_xajax_attribute_header_3.tpl
3,6 → 3,7
<div class="listbutton">
<input type="image" src={'button-move_down.gif'|ezimage} alt="{'Down'|i18n( 'design/admin/class/edit' )}" name="MoveDown_{$attribute.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" {if $hasXajaxAccess}onclick="javascript:var result=xajax_moveClassAttribute( {$attribute.id}, 1 );return !result;"{/if} />&nbsp;
<input type="image" src={'button-move_up.gif'|ezimage} alt="{'Up'|i18n( 'design/admin/class/edit' )}" name="MoveUp_{$attribute.id}" title="{'Use the order buttons to set the order of the class attributes. The up arrow moves the attribute one place up. The down arrow moves the attribute one place down.'|i18n( 'design/admin/class/edit' )}" {if $hasXajaxAccess}onclick="javascript:var result=xajax_moveClassAttribute( {$attribute.id}, 0 );return !result;"{/if} />
<input size="2" type="text" name="ContentAttribute_priority[]" value="{$number}" />
</div>
 
{/default}