/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
1
function nope() {
2
}
3
78 by Suren A. Chilingaryan
Major javascript revision providing synchronous source/axis control updates in order to resolve Ticket #13
4
function objectClone(obj, skip) {
5
    if (typeof skip == "undefined") skip = new Array();
6
    
7
    var res = new Object;
8
    for (var i in obj) {
9
	if ((obj[i])&&(typeof obj[i] == "object")&&(skip.indexOf(i)<0))
10
	    res[i] = objectClone(obj[i]);
11
	else	    
12
	    res[i] = obj[i];
13
    }
14
    return res;
15
}
16
80 by Suren A. Chilingaryan
Few steps on source tree integration in javascript frontend
17
118 by Suren A. Chilingaryan
Missing javascript stuff from previous commit
18
function parseFloatArray(floats) {
19
    if (typeof floats != "object") floats = floats.split(",");
20
    for (var i=0;i<floats.length;i++) {
21
	floats[i] = parseFloat(floats[i]);
22
    }
23
    return floats;
24
}
25
26
function parseIntArray(floats) {
27
    if (typeof floats != "object") floats = floats.split(",");
28
    for (var i=0;i<floats.length;i++) {
29
	floats[i] = parseInt(floats[i]);
30
    }
31
    return floats;
32
}
33
34
function parseStringArray(floats) {
35
    if (typeof floats != "object") floats = floats.split(",");
36
    else {
37
	for (var i=0;i<floats.length;i++) {
38
	    floats[i] = floats[i].toString();
39
	}
40
    }
41
    return floats;
42
}
43
44
function parseArray(floats) {
45
    if (typeof floats != "object") floats = floats.split(",");
46
    return floats;
47
}
201 by Suren A. Chilingaryan
Fixup the search code which was unable to set more than one option and was completely failing for custom properties
48
252 by Suren A. Chilingaryan
Better notification mechanism in frontend, provide page geometry in props, allow to set custom properties without triggering update, support onload callback in UpdateDIV call
49
function objectToProps(props) {
50
    if (typeof props == "object") {
51
        var res = false;
52
        for (var i in props) {
53
	    if ((typeof props[i] != "object")&&(typeof props[i] != "function")) {
54
	        if (res) res += "&" + i + "=" + props[i];
55
	        else res = i + "=" + props[i];
56
	    }
57
        }
58
        return res;
59
    }
60
    
61
    return props;
62
}
63
201 by Suren A. Chilingaryan
Fixup the search code which was unable to set more than one option and was completely failing for custom properties
64
function htmlEntityDecode(str) {
65
    var ta=document.createElement("textarea");
66
    ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
67
    return ta.value;
68
}