/adei/ui

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/ui

« back to all changes in this revision

Viewing changes to js/url.js

  • Committer: Suren A. Chilingaryan
  • Date: 2008-10-30 01:27:40 UTC
  • mto: This revision was merged to the branch mainline in revision 116.
  • Revision ID: csa@dside.dyndns.org-20081030012740-svt0yigxj5uzwxyj
Few steps on source tree integration in javascript frontend

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function urlConcatenate(base, extra) {
 
2
    if (extra) {
 
3
        if (/\?/.exec(base)) return base + "&" + extra;
 
4
        else return base + "?" + extra;
 
5
    }
 
6
    return base;
 
7
}
 
8
 
 
9
function urlAddProperty(base, name, value) {
 
10
    if (/\?/.exec(base)) return base + "&" + name + "=" + value;
 
11
    else return base + "?" + name + "=" + value;
 
12
}
 
13
 
 
14
function urlJoinProps(props1, props2, props3, props4, props5) {
 
15
    var props = false;
 
16
    
 
17
    if (props1) {
 
18
        if (props) props += "&" + props1;
 
19
        else props = props1;
 
20
    }
 
21
 
 
22
    if (props2) {
 
23
        if (props) props += "&" + props2;
 
24
        else props = props2;
 
25
    }
 
26
 
 
27
    if (props3) {
 
28
        if (props) props += "&" + props3;
 
29
        else props = props3;
 
30
    }
 
31
 
 
32
    return props;    
 
33
}