Ignore:
Timestamp:
02/24/12 16:27:15 (13 years ago)
Author:
tjcschipper
Message:

Cartis z'n testversie is DONE!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/branches/Cartis/Tiles preview/pages/dashboardOverview.js

    r283 r290  
    22   
    33    mockup.api.drawGraph = function(input) {
    4        var graph = new Graph("graphsContainer");
    5        graph.init(input[0], input[1], input[2], input[3]);       
     4        var graph = new Graph("graphsContainer");
     5        debugger;
     6        for (var n = 0; n < mockup.api.graphs.graphObjects.length; n++) {
     7            var exGraph = mockup.api.graphs.graphObjects[n];
     8            // If this id already exists on the dashboard
     9            if (exGraph.getId() == input[0]) {
     10                input[0] = recursiveCheckName(input[0], exGraph.getId());
     11            }
     12        }
    613       
    7        mockup.api.graphs.graphObjects.push(graph);
     14        graph.init(input[0], input[1], input[2], input[3]);       
     15       
     16        mockup.api.graphs.graphObjects.push(graph);
     17    }
     18   
     19   
     20    function recursiveCheckName(name, name2) {
     21        if (name == name2) {
     22            var index= name.indexOf("_");
     23            if (index != -1) {
     24                var number = name.split("_")[1];
     25                number++;
     26                name = name.split("_")[0]+number;
     27            }
     28            else {
     29                name+= "_0";
     30            }
     31            name = recursiveCheckName(name, name2);
     32        }
     33                   
     34        return name;
    835    }
    936   
Note: See TracChangeset for help on using the changeset viewer.