/adei/trunk

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

« back to all changes in this revision

Viewing changes to js/infotab.js

  • Committer: Suren A. Chilingaryan
  • Date: 2020-01-13 11:01:10 UTC
  • Revision ID: csa@suren.me-20200113110110-mgl5rjtf815k0zgt
Encode/Decode all custom ADEI parameters

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
        var id = nodes[i].id;
130
130
        if (re.exec(id)) {
131
131
            adei.RegisterExtraProperty(id);
132
 
            adei.SetCustomProperties(id + "=" + nodes[i].value, false);
 
132
            adei.SetCustomProperties(id + "=" + encodeURIComponent(nodes[i].value), false);
133
133
        }
134
134
    }
135
135
 
139
139
        var id = nodes[i].id;
140
140
        if (re.exec(id)) {
141
141
            adei.RegisterExtraProperty(id, null);
142
 
            adei.SetCustomProperties(id + "=" + nodes[i].value, false);
 
142
            adei.SetCustomProperties(id + "=" + encodeURIComponent(nodes[i].value), false);
143
143
        }
144
144
    }
145
145
 
151
151
                if (a = re.exec(i)) {
152
152
                    var node = document.getElementById(i);
153
153
                    if (node) {
154
 
                        node.value = decodeURI(adei.config.cfg_extra.custom[i]);
 
154
                        node.value = decodeURIComponent(adei.config.cfg_extra.custom[i]);
155
155
                    }
156
156
                }
157
157
            }
231
231
        else val = 0;
232
232
    }
233
233
 
234
 
    adei.SetCustomProperties(id + "=" + val, false);
 
234
    if (typeof val == "boolean") {
 
235
        if (val) val = 1;
 
236
        else val = 0;
 
237
    }
 
238
 
 
239
    adei.SetCustomProperties(id + "=" + encodeURIComponent(val), false);
235
240
 
236
241
    this.displayed = true;
237
242
    this.Reload();