[Cartoweb-users] StatsReports plugins : error in javascript

Bruno Friedmann bruno at ioda-net.ch
Tue May 19 14:17:14 EST 2009


Thank you Oliver, I will give it a try in some days.

As I'm reading, and understanding how it works, a question has emerged.

Do you think it would be a good idea to store all accounting inside a dedicated db
with one table for each project doing accounting.
I've a simple storage engine as file doing this (or as the db stats are made)
use the stats scripts against this db to populate the different project.

and after that, build a special project dedicated to have the reports
choosing them project by project ?



Oliver Christen wrote:
> I commited into cvs the missing js and template header elements and also
> completed the documentation. the elements in the body of the template
> still need to be added by hand, but thats explained in the doc.
> 
> regards
> Oliver
> 
> 
>> Thank you Oliver.
>>
>> I've also seen that this plugin doesn't support the traditionnale
>> {if}statsReports|default ...
>> to activate css/js div only if the plugin is active.
>>
>> I should hack it but if you goes to a review, I prefer let you done this.
>>
>>
>> Oliver Christen wrote:
>>> Hi Bruno
>>>
>>> indeed, I just had the same error a moment ago as im also installing
>>> that plugin in a new project
>>>
>>> it seems that plugin has not been used much since it was added...
>>>
>>> there is a missing javascript function and also some missing template
>>> elements.
>>>
>>> here is the missing function:
>>>
>>> function toggleGeneratedResult(action) {
>>>    if (action == 'show') {
>>>        $('generated_result').innerHTML = '';
>>>        $('generated_result').show();
>>>    } else {
>>>        $('generated_result').hide();
>>>    }
>>> }
>>>
>>> and the missing template elements (to put into the cartoclient.tpl):
>>>
>>> <div id="generated_result" name="generated_result" style="display:
>>> none"></div>
>>> and
>>> <div id="statscvslink"></div>
>>>
>>> I will complet the documentation and add the missing elements into cvs
>>> after a few tests
>>>
>>> regards
>>> Oliver
>>>
>>> ----- Original Message ----- From: "Bruno Friedmann" <bruno at ioda-net.ch>
>>> To: <cartoweb-users at lists.maptools.org>
>>> Sent: Monday, May 18, 2009 11:42 AM
>>> Subject: [Cartoweb-users] StatsReports plugins : error in javascript
>>>
>>>
>>>> When we try to get the result there's an error coming from javascript
>>>>
>>>> Updating GUI for plugin StatsReports
>>>> Error: An error occured in Plugins StatsReports
>>>> Error: Message:
>>>>
>>>> ReferenceError:
>>>> toggleGeneratedResult is not defined
>>>>
>>>> in file:
>>>> http://mycw/statsReports/js/statsReports.js
>>>>
>>>> on line:
>>>> 34
>>>>
>>>>
>>>> toggleGeneratedResult('hide');
>>>>
>>>>
>>>> Did someone has already a working installation ?
>>>>
>>>>
>>>>


-- 

     Bruno Friedmann




More information about the Cartoweb-users mailing list