Sort button in the drive

pull/1/head
yflory 5 years ago
parent c8bac778d5
commit 4cf775e613

@ -716,6 +716,9 @@
} }
} }
} }
.cp-app-drive-element-state {
display: none !important;
}
} }
} }
.cp-app-drive-element { .cp-app-drive-element {
@ -729,6 +732,9 @@
.cp-app-drive-element-type, .cp-app-drive-element-filler { .cp-app-drive-element-type, .cp-app-drive-element-filler {
display: none !important; display: none !important;
} }
.cp-app-drive-element-sort {
display: block !important;
}
} }
@media screen and (max-width: 740px) { @media screen and (max-width: 740px) {
@ -744,9 +750,6 @@
.cp-app-drive-element-header .cp-app-drive-element-state { .cp-app-drive-element-header .cp-app-drive-element-state {
display: none !important; display: none !important;
} }
.cp-app-drive-element-sort {
display: block !important;
}
} }
} }

@ -2157,6 +2157,11 @@ define([
e.stopPropagation(); e.stopPropagation();
var state = $innerblock.is(':visible'); var state = $innerblock.is(':visible');
$('.cp-dropdown-content').hide(); $('.cp-dropdown-content').hide();
var $c = $container.closest('.cp-toolbar-drawer-content');
$c.removeClass('cp-dropdown-visible');
if (!state) { $c.addClass('cp-dropdown-visible'); }
try { try {
$('iframe').each(function (idx, ifrw) { $('iframe').each(function (idx, ifrw) {
$(ifrw).contents().find('.cp-dropdown-content').hide(); $(ifrw).contents().find('.cp-dropdown-content').hide();

@ -311,14 +311,7 @@ define([
common: Common common: Common
}; };
var $block = exp.$language = UIElements.createDropdown(dropdownConfig); var $block = exp.$language = UIElements.createDropdown(dropdownConfig);
$block.find('button').attr('title', Messages.languageButtonTitle).click(function () { $block.find('button').attr('title', Messages.languageButtonTitle);
var state = $block.find('.cp-dropdown-content').is(':visible');
var $c = $block.closest('.cp-toolbar-drawer-content');
$c.removeClass('cp-dropdown-visible');
if (!state) {
$c.addClass('cp-dropdown-visible');
}
});
var isHovering = false; var isHovering = false;
var $aLanguages = $block.find('a'); var $aLanguages = $block.find('a');
@ -368,15 +361,7 @@ define([
common: Common common: Common
}; };
var $block = exp.$theme = UIElements.createDropdown(dropdownConfig); var $block = exp.$theme = UIElements.createDropdown(dropdownConfig);
$block.find('button').attr('title', Messages.themeButtonTitle).click(function () { $block.find('button').attr('title', Messages.themeButtonTitle);
// XXX copy-pasted code from configureLanguage. We can refactor this.
var state = $block.find('.cp-dropdown-content').is(':visible');
var $c = $block.closest('.cp-toolbar-drawer-content');
$c.removeClass('cp-dropdown-visible');
if (!state) {
$c.addClass('cp-dropdown-visible');
}
});
setTheme(lastTheme, $block); setTheme(lastTheme, $block);

Loading…
Cancel
Save