support remote data in beta-test selectpicker (#529)

This commit is contained in:
Kevin Papst
2019-01-31 12:59:25 +01:00
committed by GitHub
parent 974806d145
commit 1b42aed34c
8 changed files with 6 additions and 7 deletions

View File

@@ -111,7 +111,11 @@ $(function() {
$select.append('<option value="' + obj.id + '">' + obj.name + '</option>');
});
// if we don't trigger the change, the other selects won't be resetted
$select.trigger('change');
// if the beta test kimai.theme.select_type is active, this will tell the selects to refresh
$('.selectpicker').selectpicker('refresh');
}
});
});

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,5 @@
{
"build/app.js": "/build/app.js?5b6a5a9160ea779a403e",
"build/app.js": "/build/app.js?7c66f34982e005389468",
"build/app.css": "/build/app.css?fc142c29c80f5dcdbc4c745af16509f6",
"build/images/blue@2x.png": "/build/images/blue@2x.png?2694acfd",
"build/images/blue.png": "/build/images/blue.png?96f8a905",

View File

@@ -48,7 +48,6 @@ class TimesheetToolbarForm extends AbstractToolbarForm
'entryState.running' => TimesheetQuery::STATE_RUNNING,
'entryState.stopped' => TimesheetQuery::STATE_STOPPED
],
//'attr' => ['class' => 'selectpicker', 'data-live-search' => false, 'data-width' => '100%']
]);
}

View File

@@ -75,7 +75,6 @@ class ActivityType extends AbstractType
'query_builder' => function (ActivityRepository $repo) {
return $repo->builderForEntityType();
},
//'attr' => ['class' => 'selectpicker', 'data-size' => 10, 'data-live-search' => true, 'data-width' => '100%']
]);
}

View File

@@ -36,7 +36,6 @@ class CustomerType extends AbstractType
},
'project_enabled' => false,
'project_visibility' => ProjectQuery::SHOW_VISIBLE,
//'attr' => ['class' => 'selectpicker', 'data-size' => 10, 'data-live-search' => true, 'data-width' => '100%']
]);
$resolver->setDefault('api_data', function (Options $options) {

View File

@@ -61,7 +61,6 @@ class ProjectType extends AbstractType
},
'activity_enabled' => false,
'activity_visibility' => ActivityQuery::SHOW_VISIBLE,
//'attr' => ['class' => 'selectpicker', 'data-size' => 10, 'data-live-search' => true, 'data-width' => '100%']
]);
$resolver->setDefault('api_data', function (Options $options) {

View File

@@ -31,7 +31,6 @@ class VisibilityType extends AbstractType
'yes' => VisibilityQuery::SHOW_VISIBLE,
'no' => VisibilityQuery::SHOW_HIDDEN,
],
//'attr' => ['class' => 'selectpicker', 'data-live-search' => false, 'data-width' => '100%']
]);
}