OSB enhancements to date

This commit is contained in:
Deon George
2010-11-30 09:41:08 +11:00
parent 8715a2059b
commit ec6a542bc3
478 changed files with 23423 additions and 9309 deletions

View File

@@ -1,78 +1,70 @@
{ $block->display("core:top_clean") }
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
<!-- Display the form validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
{$block->display('core:alert_fields')}
{/if}
<!-- tinyMCE -->
<script type="text/javascript" src="includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="themes/{$THEME_NAME}/tinymce.js"></script>
<!-- Display the form to collect the input values -->
<form id="add" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%">
{translate module=product_translate}
field_name
{/translate}
</td>
<td width="65%">
<input type="text" name="product_translate_name" value="{$VAR.product_translate_name}" {if $product_translate_name == true}class="form_field_error"{/if}>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_translate}
field_description_short
{/translate}
</td>
<td width="65%">
<input type="text" name="product_translate_description_short" value="{$VAR.product_translate_description_short}" {if $product_translate_description_short == true}class="form_field_error"{/if} size="50">
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_translate}
field_description_full
{/translate}
</td>
<td width="65%">
<textarea name="product_translate_description_full" cols="50" rows="3" {if $product_translate_description_full == true}class="form_field_error"{/if}>{$VAR.product_translate_description_full}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%">
{translate module=product_translate}
field_email_template
{/translate}
</td>
<td width="65%">
<textarea name="product_translate_email_template" cols="50" rows="3" {if $product_translate_email_template == true}class="form_field_error"{/if}>{$VAR.product_translate_email_template}</textarea>
</td>
</tr>
<tr valign="top">
<td width="35%"></td>
<td width="65%">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
<input type="hidden" name="_page" value="product_translate:view">
<input type="hidden" name="_page_current" value="product_translate:add">
<input type="hidden" name="do[]" value="product_translate:add">
<input type="hidden" name="product_translate_product_id" value="{$VAR.product_translate_product_id}">
<input type="hidden" name="product_translate_language_id" value="{$VAR.product_translate_language_id}">
<input type="hidden" name="_escape" value="1">
<input type="hidden" name="_escape_next" value="1">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr valign="top">
<td style="width: 10%;">{osb f=tf field=name}</td>
<td><input type="text" name="product_translate_name" value="{$VAR.product_translate_name}" {if $product_translate_name == true}class="form_field_error"{/if}/></td>
</tr>
<tr valign="top">
<td style="width: 10%;">{osb f=tf field=description_short}</td>
<td><textarea name="product_translate_description_short" cols="50" rows="3" {if $product_translate_description_short == true}class="form_field_error"{/if}>{$VAR.product_translate_description_short|htmlspecialchars}</textarea></td>
</tr>
<tr valign="top">
<td style="width: 10%;">{osb f=tf field=description_full}</td>
<td><textarea name="product_translate_description_full" cols="50" rows="3" {if $product_translate_description_full == true}class="form_field_error"{/if}>{$VAR.product_translate_description_full|htmlspecialchars}</textarea></td>
</tr>
<tr valign="top">
<td style="width: 10%;">{osb f=tf field=email_template}</td>
<td><textarea name="product_translate_email_template" cols="50" rows="3" {if $product_translate_email_template == true}class="form_field_error"{/if}>{$VAR.product_translate_email_template}</textarea></td>
</tr>
<!-- @todo Unable to use include file='file:../core/add_tr_submit.tpl' the template dir is not set? -->
<tr valign="top">
<td>&nbsp;</td>
<td>
<input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/>
<input type="hidden" name="_page" value="{$meth.0}:view"/>
<input type="hidden" name="_page_current" value="{$VAR._page}"/>
<input type="hidden" name="do[]" value="{$meth.0}:{$meth.1}"/>
<script type="text/javascript">
<!--
if (document.getElementById('focus'))
document.getElementById('focus').focus();
//-->
</script>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<input type="hidden" name="product_translate_product_id" value="{$VAR.product_translate_product_id}"/>
<input type="hidden" name="product_translate_language_id" value="{$VAR.product_translate_language_id}"/>
{if $VAR._escape}
<input type="hidden" name="_escape" value="1"/>
{/if}
</div>
</form>

View File

@@ -1,121 +1,89 @@
{ $block->display("core:top_clean") }
{$block->display('core:top_clean')}
{literal}<!-- tinyMCE -->
<script language="javascript" type="text/javascript" src="includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript">
tinyMCE.init({
mode : "specific_textareas",
theme : "advanced",
plugins : "table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print",
theme_advanced_buttons1_add : "fontselect,fontsizeselect",
theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",
theme_advanced_buttons3_add_before : "tablecontrols,separator",
theme_advanced_buttons3_add : "iespell,media,advhr",
theme_advanced_toolbar_location : "bottom",
theme_advanced_toolbar_align : "center",
content_css : "themes/default/style.css",
plugin_insertdate_dateFormat : "%Y-%m-%d",
plugin_insertdate_timeFormat : "%H:%M:%S",
extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
relative_urls: 'true',
width : "100%"
});
</script>
<!-- /tinyMCE -->{/literal}
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{ $method->exe("product_translate","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{$method->exe($meth.0,'view')}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
<!-- Loop through each record -->
{foreach from=$product_translate item=product_translate}
<a name="{$product_translate.id}"></a>
<!-- Display the field validation -->
{if $form_validation}
{ $block->display("core:alert_fields") }
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
<!-- tinyMCE -->
<script type="text/javascript" src="includes/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="themes/{$THEME_NAME}/tinymce.js"></script>
<!-- Display each record -->
<form id="view" method="post" action="" enctype="multipart/form-data">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr valign="top">
<td style="width: 35%;"><b>{osb f=tf field=name}</b></td>
<td style="width: 65%;"><input type="text" name="product_translate_name" value="{$record.name}" size="32"/></td>
</tr>
<tr>
<td><b>{osb f=tf field=description_short}</b></td>
<td><input name="product_translate_description_short" rows="10" cols="80" value="{$record.description_short|htmlspecialchars}" size="50" /></td>
</tr>
</table>
<br/>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><b>{osb f=tf field=description_full}</b></td>
</tr>
<tr>
<td><textarea name="product_translate_description_full" rows="13" cols="80" class="mce_editable">{$record.description_full|htmlspecialchars}</textarea></td>
</tr>
</table>
<br/>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr valign="top">
<td style="width: 35%;"><b>{osb f=tf field=email_template}</b></td>
</tr>
<tr valign="top">
<td style="width: 65%;"><textarea name="product_translate_email_template" rows="3" cols="55" >{$record.email_template|htmlspecialchars}</textarea></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="6" cellpadding="1" class="row1">
<tr class="row1">
<!-- @todo Unable to use include file='file:../core/view_td_submit.tpl' the template dir is not set? -->
<td style="text-align: left;"><input type="submit" name="Submit" value="{t}Submit{/t}" class="form_button"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div>
<input type="hidden" name="_page" value="product_translate:edit"/>
<input type="hidden" name="product_translate_id" value="{$record.id}"/>
<input type="hidden" name="do[]" value="product_translate:update"/>
<input type="hidden" name="id" value="{$VAR.id}"/>
<input type="hidden" name="product_translate_product_id" value="{$record.product_id}"/>
<input type="hidden" name="product_translate_language_id" value="{$record.language_id}"/>
</div>
</form>
{/if}
<!-- Display each record -->
<form name="product_translate_view" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="2" cellpadding="1" class="row1">
<tr valign="top">
<td width="35%"> <b>
{translate module=product_translate}
field_name
{/translate}
</b> </td>
<td width="65%">
<input type="text" name="product_translate_name" value="{$product_translate.name}" size="32">
</td>
</tr>
<tr valign="top">
<td width="35%"> <b>
{translate module=product_translate}
field_email_template
{/translate}
<br>
<br>
<input type="submit" name="Submit2" value="{translate}submit{/translate}" class="form_button">
</b> </td>
<td width="65%">
<textarea name="product_translate_email_template" rows="3" cols="55" >{$product_translate.email_template}</textarea>
</td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td> <b>
{translate module=product_translate}
field_description_short
{/translate}
</b> </td>
</tr>
<tr>
<td>
<textarea name="product_translate_description_short" rows="10" cols="80" mce_editable="true">{$product_translate.description_short}</textarea>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td> <b>
{translate module=product_translate}
field_description_full
{/translate}
</b> </td>
</tr>
<tr>
<td>
<textarea name="product_translate_description_full" rows="13" cols="80" mce_editable="true">{$product_translate.description_full}</textarea>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">
<input type="submit" name="Submit" value="{translate}submit{/translate}" class="form_button">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<input type="hidden" name="_page" value="product_translate:edit">
<input type="hidden" name="product_translate_id" value="{$product_translate.id}">
<input type="hidden" name="do[]" value="product_translate:update">
<input type="hidden" name="id" value="{$VAR.id}">
<input type="hidden" name="product_translate_product_id" value="{$product_translate.product_id}">
<input type="hidden" name="product_translate_language_id" value="{$product_translate.language_id}">
</form>
{/foreach}
{/if}
{$block->display('core:bottom_clean')}

View File

@@ -1,81 +1,12 @@
{ $block->display("core:top_clean") }
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{$method->exe("product_translate","search_show")}
{if ($method->result == FALSE)}
{$block->display("core:method_error")}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{literal}
<script language="JavaScript">
<!-- START
var module = 'product_translate';
var p = '&_escape=y';
var IMAGE = '{/literal}{$NONSSL_IMAGE}{literal}';
var order = '{/literal}{$order}{literal}';
var sort1 = '{/literal}{$sort}{literal}';
var search_id = '{/literal}{$search_id}{literal}';
var page = {/literal}{$page}{literal};
var pages = '{/literal}{$pages}{literal}';
var results = '{/literal}{$results}{literal}';
var limit = '{/literal}{$limit}{literal}';
record_arr = new Array ({/literal}{$limit}{literal});
var i = 0;
// END -->
</script>
<SCRIPT SRC="themes/{/literal}{$THEME_NAME}{literal}/search.js"></SCRIPT>
{/literal}
<!-- SHOW THE SEARCH NAVIGATION MENU -->
<center><script language="JavaScript">document.write(search_nav_top());</script></center>
<!-- BEGIN THE RESULTS CONTENT AREA -->
<div id="search_results" onKeyPress="key_handler(event);">
<table id="main1" width="100%" border="0" cellspacing="0" cellpadding="0" class="table_background">
<form id="form1" name="form1" method="post" action="">
<tr>
<td>
<table id="main2" width="100%" border="0" cellspacing="1" cellpadding="2">
<!-- LOOP THROUGH EACH RECORD -->
{foreach from=$product_translate item=record}
<tr id="row{$record.id}" onClick="row_sel('{$record.id}',1);" onDblClick="window.location='?_page=product_translate:view&id={$record.id}&_escape=1,';" onMouseOver="row_mouseover('{$record.id}', 'row_mouse_over_select', 'row_mouse_over');" onMouseOut="row_mouseout('{$record.id}', '{$record._C}', 'row_select');" class="{$record._C}">
<td align="center" width="5%">
<input type="checkbox" name="record{$record.id}" value="{$record.id}" onClick="row_sel('{$record.id}',1,'{$record._C}');">
</td>
<td>&nbsp;
{$record.language_id}
</td>
<td>&nbsp;
{$record.product_id}
</td>
<td>&nbsp;{$record.name}</td>
</tr>
{literal}
<script language="JavaScript">row_sel('{/literal}{$record.id}{literal}', 0, '{/literal}{$record._C}{literal}'); record_arr[i] = '{/literal}{$record.id}{literal}'; i++; </script>
{/literal}
{/foreach}
<!-- END OF RESULT LOOP -->
</table>
</td>
</tr>
</form>
</table>
<br>
<center>
<input type="submit" name="Submit" value="{translate}view_edit{/translate}" onClick="mass_do('', module+':view&_escape=1', limit, module);" class="form_button">
<input type="submit" name="Submit" value="{translate}delete{/translate}" onClick="mass_do('delete', module+':search_show&search_id={$search_id}&page={$page}&order_by={$order}&{$sort}&_escape=1', limit, module);" class="form_button">
<input type="submit" name="Submit" value="{translate}select_all{/translate}" onClick="all_select(record_arr);" class="form_button">
<input type="submit" name="Submit" value="{translate}deselect_all{/translate}" onClick="all_deselect(record_arr);" class="form_button">
<input type="submit" name="Submit" value="{translate}range_select{/translate}" onClick="all_range_select(record_arr,limit);" class="form_button">
<br>
</center>
{include file='file:../core/search_show_pre.tpl'}
{$method->exe_noauth($meth.0,'tpl_search_show',$search_show)}
{include file='file:../core/search_show_post-1.tpl'}
{include file='file:../core/search_show_post-2.tpl'}
{/if}
</div>

View File

@@ -1,28 +1,34 @@
{ $block->display("core:top_clean") }
{assign var=meth value=':'|explode:$VAR._page}
<!-- {$meth.0}:{$meth.1} -->
{ $method->exe("product_translate","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{$method->exe($meth.0,$meth.1)}
{if ($method->result == false)}
{$block->display('core:method_error')}
{else}
{include file='file:../core/view_pre.tpl'}
{literal}<script language=javascript>
function editTranslations(product_id)
{
var language_id = document.product_translate_view.language_id.value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+
language_id+'&product_translate_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=edit&_next_page_none=add&name_id1=product_translate_product_id&val_id1='
+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
window.open(url,'ProductLanguage','scrollbars=yes,toolbar=no,status=no,width=700,height=650');
}
<!-- Display the field validation -->
{if $form_validation}
{$block->display('core:alert_fields')}
{/if}
function viewTranslations(product_id)
{
var language_id = document.getElementById('language_id_1').value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+
language_id+'&product_translate_product_id='+
product_id+'&_escape=1&_escape_next=1&_next_page_one=view&_next_page_none=add&name_id1=product_translate_product_id&val_id1='
+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
document.location = url;
}
</script>{/literal}
<script type="text/javascript">
<!--
{literal}
function editTranslations(product_id) {
var language_id = document.getElementById('language_id').value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+language_id+'&product_translate_product_id='+product_id+'&_escape=1&_escape_next=1&_next_page_one=edit&_next_page_none=add&name_id1=product_translate_product_id&val_id1='+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
window.open(url,'ProductLanguage','scrollbars=yes,toolbar=no,status=no,width=700,height=650');
}
function viewTranslations(product_id) {
var language_id = document.getElementById('language_id').value;
var url = '?_page=core:search_iframe&module=product_translate&product_translate_language_id='+language_id+'&product_translate_product_id='+product_id+'&_next_page_one=view&_next_page_none=add&name_id1=product_translate_product_id&val_id1='+product_id+'&name_id2=product_translate_language_id&val_id2='+language_id;
document.location = url;
}
{/literal}
// -->
</script>
<!-- Display each record -->
<form id="view" method="post" action="" enctype="multipart/form-data">
@@ -37,98 +43,52 @@ function viewTranslations(product_id)
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="3" cellpadding="1" class="row1">
<tr>
<td class="body"><b>
{ $list->menu_files("1", "language_id", $smarty.const.DEFAULT_LANGUAGE, "language", "", "_core.xml", "\" onChange=\"viewTranslations(`$product_translate.product_id`);") }
<a href="javascript:editTranslations({$product_translate.product_id});">Edit</a>
</b></td>
</tr>
</table>
<b> </b></td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2" align="center"><b> </b> </td>
</tr>
<td class="row2"><b>
{translate module=product_translate}
field_name
{/translate}
</b> </td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="5">&nbsp;</td>
<td width="98%">
{$product_translate.name}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2" align="center"><b> </b> </td>
</tr>
<tr>
<td class="row2"><b>
{translate module=product_translate}
field_description_short
{/translate}
</b></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="5">&nbsp;</td>
<td width="98%">
{$product_translate.description_short}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td width="65%" class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>
{translate module=product_translate}
field_description_full
{/translate}
</b></td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="body">
<tr>
<td width="5">&nbsp;</td>
<td width="98%">
{$product_translate.description_full}
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<tr>
<td class="body"><b>{$list->menu_files('','language_id',$record.language_id,'language','','_core.xml',"\" onchange=\"viewTranslations(`$record.product_id`);") } <a href="javascript:editTranslations({$record.product_id});">{t}Edit{/t}</a></b></td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=name}</b></td>
</tr>
<tr>
<td>{$record.name}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=description_short}</b></td>
</tr>
<tr>
<td>{$record.description_short}</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td class="row1">
<table width="100%" border="0" cellspacing="0" cellpadding="3" class="body">
<tr>
<td class="row2"><b>{osb f=tf field=description_full}</b></td>
</tr>
<tr>
<td>{$record.description_full}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
{/if}