Skip to content
Snippets Groups Projects
Commit 288b6d40 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

make singleselect check for gravity wish, and make it south for default quota

parent 997653fd
No related branches found
No related tags found
No related merge requests found
......@@ -2,10 +2,14 @@
$.fn.singleSelect = function () {
return this.each(function (i, select) {
var input = $('<input/>'),
gravity = $(select).attr('data-gravity'),
inputTooltip = $(select).attr('data-inputtitle');
if (inputTooltip){
input.attr('title', inputTooltip);
}
if (typeof gravity === 'undefined') {
gravity = 'n'
}
select = $(select);
input.css('position', 'absolute');
input.css({
......@@ -35,7 +39,7 @@
input.css(select.offset());
input.show();
if ($.fn.tipsy){
input.tipsy({gravity: 'n', trigger: 'manual'});
input.tipsy({gravity: gravity, trigger: 'manual'});
input.tipsy('show');
}
select.css('background-color', 'white');
......
......@@ -6,7 +6,7 @@
<!-- Default storage -->
<span><?php p($l->t('Default Quota'));?></span>
<?php if((bool) $_['isAdmin']): ?>
<select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>">
<select id='default_quota' data-inputtitle="<?php p($l->t('Please enter storage quota (ex: "512 MB" or "12 GB")')) ?>" data-gravity="s">
<option <?php if($_['default_quota'] === 'none') print_unescaped('selected="selected"');?> value='none'>
<?php p($l->t('Unlimited'));?>
</option>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment