mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-02-20 01:21:20 +01:00
A little refactoring (folder_name2id())
This commit is contained in:
@@ -7913,6 +7913,13 @@ function rcube_webmail() {
|
||||
return id ? ref.html_identifier_decode(id.replace(/^rcmli/, '')) : null;
|
||||
};
|
||||
|
||||
this.folder_name2id = function (name) {
|
||||
if (!name) {
|
||||
return null;
|
||||
}
|
||||
return 'rcmli' + ref.html_identifier_encode(name);
|
||||
};
|
||||
|
||||
this.handle_folder_sorting_icons = function () {
|
||||
const folder_li = window.parent.rcmail.get_folder_li(ref.env.folder, null, true);
|
||||
const upIcon = $('#move-folder-up');
|
||||
@@ -8068,7 +8075,7 @@ function rcube_webmail() {
|
||||
}
|
||||
|
||||
// set ID, reset css class
|
||||
row.attr({ id: 'rcmli' + this.html_identifier_encode(id), class: class_name });
|
||||
row.attr({ id: this.folder_name2id(id), class: class_name });
|
||||
|
||||
if (!refrow || !refrow.length) {
|
||||
// remove old data, subfolders and toggle
|
||||
@@ -8264,7 +8271,7 @@ function rcube_webmail() {
|
||||
folder = ref.env.subscriptionrows[fname],
|
||||
newid = id + fname.slice(prefix_len_id);
|
||||
|
||||
this.id = 'rcmli' + ref.html_identifier_encode(newid);
|
||||
this.id = this.folder_name2id(newid);
|
||||
$('input[name="_subscribed[]"]', this).first().val(newid);
|
||||
folder[0] = name + folder[0].slice(prefix_len_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user