Commit Graph
8 Commits
Author SHA1 Message Date
ccauw 051adc7b36 [-] BO : bug in BO translations when Windows OS
[-] BO : bug in BO translations when Windows OS

Impossible to translate the strings of the back office in the directory override/controllers/admin/...
under windows environment.

The statement " $parent_class = explode(DIRECTORY_SEPARATOR,..) " returns wrong result under windows environment. because the path name has '/' and '\' chars.

$parent_class contains bad values and the string "override" is not found.
2013-04-29 16:00:55 +03:00
ccauw 8331ab0c1a [-]BO : bug color parameter in List
[-]BO : bug color parameter in List

In field list, if there is another field with 'color' => 'color_field', (and color_field column in the select), the background color is always the value of field list column 'color', never 'color_field'

the lines:
			{block name="td_content"}
				...
				{if isset($params.color) && isset($tr[$params.color])}
					<span class="color_field" style="background-color:{$tr.color};...
				{/if}

must be:
			{block name="td_content"}
				...
				{if isset($params.color) && isset($tr[$params.color])}
					<span class="color_field" style="background-color:{$tr[$params.color])};...
				{/if}

In the fields list, for display list, there is :
'osname' => array(
	'title' => $this->l('Status'),
	'color' => 'color',
	...
),
'color parameter gives the name of column in _List to be used as color background.
Currently, it is the same 'color' parameter which is used for one field and the row: (ex:osname)
		<span class="color_field" style="background-color:{$tr.color};...

But if there is another field with 'color' => 'color_field', (and color_field in the select), the background color is always 'color', never 'color_field'
That can be fixed with :
		<span class="color_field" style="background-color:{$tr[$params.color])};...

So the background color of the row (if colorOnBackground = true) and one row's field will be the value of the column given by 'color'=>'color', and The background color of others fields will be the value of the column given by their parameter 'color'=>'<color_field>'

$this->_select = '..color ..., ... color_field2 ...';

$this->fields_list = array(
		'field1' => array(
			'title' => $this->l('Status'),
			'color' => 'color',			// will also be the bg color of the row
			...
		),
		'field2' => array(
			'title' => $this->l('Status'),
			'color' => 'color_field2',
			...
		),
		'field2' => array(
			'title' => $this->l('Status'),
			'color' => 'color_field3',
			...
		),
2013-04-28 16:01:55 +03:00
ccauw f7ef4e0350 [*] BO : Add block "override_form_extra" in helper
[*] BO : Add block "override_form_extra" in list_header.tpl


{if !$simple_header}

<form method="post" action="{$action}" class="form">



	{block name="override_form_extra"}{/block}




In AdminXxxxController, If we display list which are filtered by "variable" like

index.php?controller=AdminXxxx&variable=val&token=...

When using pagination or columns filters, the controller is called without our variable.

There are two methods to retrieve our variable: cookie or form Post.

To use the second opportunity, we need to put hidden input "variable" in the form.

So we need à block in the form to override.
2013-04-16 16:21:23 +03:00
ccauw 205e21ba16 [*] BO : Add block "override_form_extra" in helper
[*] BO : Add block "override_form_extra" in list_header.tpl


{if !$simple_header}

<form method="post" action="{$action}" class="form">



	{block name="override_form_extra"}{/block}




In AdminXxxxController, If we display list which are filtered by "variable" like

index.php?controller=AdminXxxx&variable=val&token=...

When using pagination or columns filters, the controller is called without our variable.

There are two methods to retrieve our variable: cookie or form Post.

To use the second opportunity, we need to put hidden input "variable" in the form.

So we need à block in the form to override.
2013-04-16 16:21:23 +03:00
ccauw 5b13f6aa7e [*] BO : Add block "override_form_extra"
Add block "override_form_extra" in list_header.tpl


{if !$simple_header}

<form method="post" action="{$action}" class="form">



	{block name="override_form_extra"}{/block}




In AdminXxxxController, If we display list which are filtered by "variable" like

index.php?controller=AdminXxxx&variable=val&token=...

When using pagination or columns filters, the controller is called without our variable.

There are two methods to retrieve our variable: cookie or form Post.

To use the second opportunity, we need to put hidden input "variable" in the form.

So we need à block in the form to override.
2013-04-16 16:09:26 +03:00
ccauw e5508af99a [*] BO : Add block "override_form_extra"
Add block "override_form_extra" in list_header.tpl


{if !$simple_header}

<form method="post" action="{$action}" class="form">



	{block name="override_form_extra"}{/block}




In AdminXxxxController, If we display list which are filtered by "variable" like

index.php?controller=AdminXxxx&variable=val&token=...

When using pagination or columns filters, the controller is called without our variable.

There are two methods to retrieve our variable: cookie or form Post.

To use the second opportunity, we need to put hidden input "variable" in the form.

So we need à block in the form to override.
2013-04-16 16:09:26 +03:00
ccauw 7711c710d4 [*] BO : Add block "close_td" in list_content.tpl
[*] BO : Add block "close_td" in list_content.tpl

{block name="td_content"}
.....
{/block}
{block name="close_td"}

{/block}

So now we can override "td" and "/td" tags.
So we can create

"td" "a" ... content.... "/a" "/td"

when overriding the block open-td and close-td
and we can use "a" tag with "href" rather than "onclick" to create view links in the list.
And the user can choose to open the link in another tab or window.
2013-04-15 20:19:10 +03:00
ccauw 6e58a24325 [*] BO : Add block "close_td" in list_content.tpl
[*] BO : Add block "close_td" in list_content.tpl

{block name="td_content"}
.....
{/block}
{block name="close_td"}

{/block}

So now we can override "td" and "/td" tags.
So we can create

"td" "a" ... content.... "/a" "/td"

when overriding the block open-td and close-td
and we can use "a" tag with "href" rather than "onclick" to create view links in the list.
And the user can choose to open the link in another tab or window.
2013-04-15 20:19:10 +03:00