CaptainTang / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

AJAX: DateTime.removeTimeZoneOffset: A parameter is timestamp or Date #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add Events to timeline (eventSource.add(evt))
2. Click onevent in timeline.
3. Code in simile-ajax-bundle.js 1513: "A.getTime() is not a function"

What is the expected output? What do you see instead?
Expected dateobject but A is a timestamp

What version of the product are you using? On what operating system?
timeline 2.3.0 on linux with firefox 3.0.6

Please provide any additional information below.
Changed code in simile-ajax-bundle.js 1513 to:
SimileAjax.DateTime.removeTimeZoneOffset=function(A,B) {
    C = A; // date
    if (A.toString().search(" ") == -1) {
        A = new Date(C); // timestamp
    }
    return new
Date(A.getTime()+B*SimileAjax.DateTime.gregorianUnitLengths[SimileAjax.DateTime.
HOUR]);

};

Original issue reported on code.google.com by h...@crolox.nl on 11 Mar 2009 at 4:19

GoogleCodeExporter commented 9 years ago
Hi Hans,

Can you supply a problem example using the unbundled Ajax and Timeline 
libraries?

And can you provide an html/js file that triggers the error?

To use the unbundled Timeline and Ajax libraries

Change
    <script
src="http://api.simile-widgets.org/timeline/2.3.1/api/timeline-api.js?bundle=tru
e"
type="text/javascript"></script>
To
    <script> Timeline_ajax_url =
"http://api.simile-widgets.org/ajax/2.2.1/simile-ajax-api.js?bundle=false"</scri
pt>
    <script
src="http://api.simile-widgets.org/timeline/2.3.1/api/timeline-api.js?bundle=fal
se"
type="text/javascript"></script>

Thanks,

Larry

Original comment by larryklu...@gmail.com on 11 Mar 2009 at 5:22

GoogleCodeExporter commented 9 years ago

Original comment by larryklu...@gmail.com on 11 Mar 2009 at 5:23