custom Javascript location?

Author Message

Daniele Conci

Wednesday 05 January 2011 3:47:31 am

Hi everyone!

i'm handling an ezpublish website, which has a custom factbox with a template. Inside the custom template code there are function calls to a Javascript, but i'm not able to find the location of this file. I need to find it to edit the functions them-self, but the previous developer is not available actually.

Do you have any suggestions about how locate this Javascript file? the "find *.js" didn't find anything!

Best regards

Daniele

andre müller

Wednesday 05 January 2011 4:04:15 am

if you're sure it's a javascript call and not a template operator call, find it the browser source code and check pagelayout template or the template including the factbox..or do a search by the javascript function..or the js is in an external source..

Daniele Conci

Wednesday 05 January 2011 5:24:35 am

"

if you're sure it's a javascript call and not a template operator call, find it the browser source code and check pagelayout template or the template including the factbox..or do a search by the javascript function..or the js is in an external source..

"

the template of the factbox has this piece of code about Javascript call:

{*?template charset=utf-8?*}

 

 

<div class="factbox object-{if is_set($align)}{$align}{else}left{/if}">

 

<div class="border-box factbox-header">

 

<div class="border-tl"><div class="border-tr"><div class="border-tc"></div></div></div>

 

<div class="border-ml"><div class="border-mr"><div class="border-mc">

 

<div class="box-content">

 

 

<h2>{if is_set($title)}{$title}{/if} </h2>

 

 

</div>

 

</div></div></div>

 

</div>

 

<div class="border-box factbox-content">

 

<div class="border-ml"><div class="border-mr"><div class="border-mc">

 

<div class="box-content">

 

 

{$content}

 

 

<form name="mutuo" method="post" action="">

 

 

<p style="margin-left: 5px;">

 

<label>Somma da assicurare</label>

 

<input type="text" maxlength="7" onfocus="javascript:ripristina(this);" value="" class="login"/>

 

<label>Durata del mutuo</label>

 

<input type="text" size="5" maxlength="2" id="anni_banca" name="anni_banca" value="" class="login"/>

 

<a class="btt_entra" href="javascript: calcola_mutuo_banca();" style="position: absolute; margin-top: 2px; margin-left: 20px;">CALCOLA</a>

 

</p>

 

<div>

 

</div>

 

<div>

 

</div>

 

</form>

 

 

</div>

 

</div></div></div>

 

<div class="border-bl"><div class="border-br"><div class="border-bc"></div></div></div>

 

</div>

 

</div>

Thus, the function name looks to be "calcola_mutuo_banca()", but i'm still not able to locate the source! :/ :/

Edi Modrić

Wednesday 05 January 2011 5:40:25 am

Hi Daniele,

You can do a search in files to see where "calcola_mutuo_banca" is mentioned.

The easiest way to do it is through shell with the following command

find . -exec grep -H -n 'calcola_mutuo_banca' {} \;

It should list every file where the text is mentioned, hopefully one of them is your .js

eZ Publish certified developer

http://ez.no/certification/verify/350658

Daniele Conci

Wednesday 05 January 2011 6:06:55 am

"

Hi Daniele,

You can do a search in files to see where "calcola_mutuo_banca" is mentioned.

The easiest way to do it is through shell with the following command

find . -exec grep -H -n 'calcola_mutuo_banca' {} \;

It should list every file where the text is mentioned, hopefully one of them is your .js

"

awesome Edi, i found it!!!

Thanks again!

solved!

Edi Modrić

Thursday 06 January 2011 10:57:36 am

Glad I could help you :)

eZ Publish certified developer

http://ez.no/certification/verify/350658

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 05:07:36
Script start
Timing: Jan 18 2025 05:07:36
Module start 'layout'
Timing: Jan 18 2025 05:07:36
Module start 'content'
Timing: Jan 18 2025 05:07:37
Module end 'content'
Timing: Jan 18 2025 05:07:37
Script end

Main resources:

Total runtime1.1080 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0044 589.0313152.6250
Module start 'layout' 0.00440.0027 741.656339.4531
Module start 'content' 0.00711.0994 781.1094657.0234
Module end 'content' 1.10640.0016 1,438.132816.1641
Script end 1.1080  1,454.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2679160.0002
Check MTime0.00130.1128160.0001
Mysql Total
Database connection0.00060.057810.0006
Mysqli_queries1.002090.4273680.0147
Looping result0.00070.0623660.0000
Template Total1.073796.920.5369
Template load0.00200.181620.0010
Template processing1.071796.719520.5358
Template load and register function0.00010.009910.0001
states
state_id_array0.00150.136610.0015
state_identifier_array0.00160.147820.0008
Override
Cache load0.00200.18471510.0000
Sytem overhead
Fetch class attribute can translate value0.00100.088630.0003
Fetch class attribute name0.00110.103070.0002
XML
Image XML parsing0.00080.071130.0003
class_abstraction
Instantiating content class attribute0.00000.001580.0000
General
dbfile0.00130.1164160.0001
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
47content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
39content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 98
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs