encode user and list in ui set calls
This commit is contained in:
parent
86b6f47c9f
commit
e5d4a75358
2 changed files with 7 additions and 7 deletions
|
@ -149,7 +149,7 @@ oml.ui.folders = function() {
|
|||
})
|
||||
.bindEvent({
|
||||
toggle: function(data) {
|
||||
oml.UI.set('showFolder.' + user.name, !data.collapsed);
|
||||
oml.UI.set('showFolder.' + oml.UI.encode(user.name), !data.collapsed);
|
||||
}
|
||||
})
|
||||
.bindEvent(
|
||||
|
@ -196,7 +196,7 @@ oml.ui.folders = function() {
|
|||
!userLists.length ? user + ':'
|
||||
: Ox.last(userLists).id
|
||||
)};
|
||||
Ox.extend(set, 'showFolder.' + user, true);
|
||||
Ox.extend(set, 'showFolder.' + oml.UI.encode(user), true);
|
||||
}
|
||||
oml.UI.set(set);
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ oml.ui.folders = function() {
|
|||
if (index < users.length - 1) {
|
||||
oml.UI.set(Ox.extend(
|
||||
{find: getFind(users[index + 1].name + ':')},
|
||||
'showFolder.' + users[index + 1].name,
|
||||
'showFolder.' + oml.UI.encode(users[index + 1].name),
|
||||
true
|
||||
));
|
||||
}
|
||||
|
|
|
@ -903,15 +903,15 @@ oml.renameUser = function(data) {
|
|||
newFind = Ox.clone(ui.find, true);
|
||||
ui._users[index].name = data.name;
|
||||
ui._users[index].nickname = data.nickname;
|
||||
set['showFolder.' + name] = null;
|
||||
set['showFolder.' + data.name] = ui.showFolder[name];
|
||||
set['showFolder.' + oml.UI.encode(name)] = null;
|
||||
set['showFolder.' + oml.UI.encode(data.name)] = ui.showFolder[name];
|
||||
Ox.forEach(ui.lists, function(value, key) {
|
||||
var split = key.split(':'),
|
||||
username = split[0],
|
||||
listname = split.slice(1).join(':');
|
||||
if (username == name) {
|
||||
set['lists.' + key] = null;
|
||||
set['lists.' + data.name + ':' + listname] = value;
|
||||
set['lists.' + oml.UI.encode(key)] = null;
|
||||
set['lists.' + oml.UI.encode(data.name + ':' + listname)] = value;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue