Generalize content frame handling

pull/5742/merge
Aleksander Machniak 8 years ago
parent 570a0547a0
commit e00d8cdd61

@ -31,7 +31,8 @@
label="contactsearchform" buttontitle="findcontacts" options="search-menu" ariatag="h2" />
</div>
<div class="scroller">
<roundcube:object name="addresslist" id="contacts-table" class="listing iconized" noheader="true" role="listbox" data-list="contact_list" />
<roundcube:object name="addresslist" id="contacts-table" class="listing iconized" noheader="true"
role="listbox" data-list="contact_list" />
</div>
<div class="footer">
<div class="toolbar">

@ -14,7 +14,8 @@
label="foldersearchform" buttontitle="findfolders" options="search-filter" ariatag="h2" />
</div>
<div class="scroller">
<roundcube:object name="foldersubscription" form="subscriptionform" id="subscription-table" class="treelist listing folderlist iconized" />
<roundcube:object name="foldersubscription" form="subscriptionform" id="subscription-table"
class="treelist listing folderlist iconized" role="listbox" data-list="subscription_list" />
</div>
<div class="footer">
<roundcube:button command="create-folder" type="link" title="createfolder"

@ -12,7 +12,8 @@
<span id="aria-label-identitieslist" class="header-title"><roundcube:label name="identities" /></span>
</div>
<div class="scroller">
<roundcube:object name="identitieslist" id="identities-table" class="listing" noheader="true" role="listbox" />
<roundcube:object name="identitieslist" id="identities-table" class="listing" noheader="true"
role="listbox" data-list="identity_list" />
</div>
<div class="footer">
<roundcube:button command="add" type="link" title="newresponse"

@ -12,7 +12,8 @@
<span id="aria-label-responseslist" class="header-title"><roundcube:label name="responses" /></span>
</div>
<div class="scroller">
<roundcube:object name="responseslist" id="identities-table" class="listing" noheader="true" role="listbox" />
<roundcube:object name="responseslist" id="identities-table" class="listing" noheader="true"
role="listbox" data-list="responses_list" />
</div>
<div class="footer">
<roundcube:button command="add" type="link" title="newresponse"

@ -11,7 +11,8 @@
<span id="aria-label-prefsection" class="header-title"><roundcube:label name="preferences" /></span>
</div>
<div class="scroller">
<roundcube:object name="sectionslist" id="sections-table" class="listing iconized" noheader="true" />
<roundcube:object name="sectionslist" id="sections-table" class="listing iconized" noheader="true"
role="listbox" data-list="sections_list" />
</div>
</div>

@ -391,17 +391,19 @@ function rcube_elastic_ui()
// reset content frame, so we can load it again
rcmail.show_contentframe(false);
// or env.content_window.location.href = rcmail.env.blankpage; ?
// now we have to unselect selected row on the list
// TODO: do this with some magic, so it works for plugins UI
// e.g. we could store list widget reference in list container data
if (rcmail.env.task == 'settings' && !rcmail.env.action) {
rcmail.sections_list.clear_selection();
$('[data-list]', layout.list).each(function() {
var list = $(this).data('list');
if (rcmail[list]) {
if (rcmail[list].clear_selection) {
rcmail[list].clear_selection(); // list widget
}
else if (rcmail[list].select) {
rcmail[list].select(); // treelist widget
}
else if (rcmail.env.task == 'addressbook' && !rcmail.env.action) {
rcmail.contact_list.clear_selection();
}
});
};
// show menu widget

Loading…
Cancel
Save