Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:extensions:colorizer:documentation:customizations [2013/12/18 11:47] swarnat |
en:extensions:colorizer:documentation:customizations [2014/12/17 11:16] (current) swarnat |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== 3. special Modifications ====== | ====== 3. special Modifications ====== | ||
+ | <WRAP center round important 60%> | ||
+ | This only needs to be done in VtigerCRM 5.40! | ||
+ | It works out of the box in 6.x. | ||
+ | </WRAP> | ||
==== Non-English Languages and Readonly Users or Conditions in References === | ==== Non-English Languages and Readonly Users or Conditions in References === | ||
- | If you would like create Conditions with Reference Fields or have users in the vtigerCRM System, which couldn’t write fields, you have to make the following change: | + | If you would like create Conditions with Reference Fields or have users in the vtigerCRM System, which don't have write permission for records, you have to make the following change: |
+ | **Otherwise these Users won't see any colors in this read-only records.** | ||
- | == OPEN /SMARTY/TEMPLATES/DETAILVIEW.TPL == | + | == 1. OPEN /SMARTY/TEMPLATES/DETAILVIEW.TPL == |
- | == SEARCH == | + | == 2. SEARCH == |
<code smarty> | <code smarty> | ||
{if $EDIT_PERMISSION eq 'yes' && $display_type neq '2' && $_readonly eq '0'} | {if $EDIT_PERMISSION eq 'yes' && $display_type neq '2' && $_readonly eq '0'} | ||
Line 21: | Line 25: | ||
</code> | </code> | ||
- | 3. INSERT AFER THIS LINES | + | == 3. INSERT AFER THIS LINES == |
<code html> | <code html> | ||
<td style='display:none;width:0px;' id="colorizer_{$data.fldname}" uitype='{$data.ui}' vtValue='{$keyval|@htmlentities|replace:"'":""|replace:'"':""}'></td> | <td style='display:none;width:0px;' id="colorizer_{$data.fldname}" uitype='{$data.ui}' vtValue='{$keyval|@htmlentities|replace:"'":""|replace:'"':""}'></td> | ||
</code> | </code> | ||
+ | |||
+ | == 4. Repeat this modification also in /Smarty/Templates/Inventory/InventoryDetailView.tpl == | ||
+ | \\ | ||
+ | |||
+ | ==== Setup of dynamically changed color ==== | ||
+ | |||
+ | If you would see any colors directly after changes of a value in DetailView, you have to insert these two snippets into one vtiger Core file. | ||
+ | == 1. Open: /includes/js/dtlviewajax.js == | ||
+ | == 2. Search: == | ||
+ | <code js> | ||
+ | if(module == 'Users') { | ||
+ | data += "&form_token=" + (document.getElementsByName('form_token')[0].value); | ||
+ | } | ||
+ | </code> | ||
+ | == 3. Insert after this lines: == | ||
+ | <code js> | ||
+ | colorizerNewTagValue = tagValue; | ||
+ | </code> | ||
+ | == 4. Search: == | ||
+ | else if(response.responseText.indexOf(":#:SUCCESS")>-1) { | ||
+ | == 5. At the end of this block == | ||
+ | //(directly after $(“vtbusy_info”).style.display=”none”; )// | ||
+ | == INSERT: == | ||
+ | <code php> | ||
+ | /** SWARNAT EDIT START **/ | ||
+ | colorizer_after_change(fieldName, colorizerNewTagValue); | ||
+ | /** SWARNAT EDIT ENDE **/ | ||
+ | </code> | ||
+ | Now all settings will be applied directly. | ||
+ | \\ | ||
+ | |||