Heimdall/resources/views/items/scripts.blade.php
2018-02-05 19:43:24 +00:00

20 lines
606 B
PHP

<script>
$( function() {
var availableTags = [
<?php
$supported = App\Item::supportedOptions();
foreach($supported as $sapp) {
echo '"'.$sapp.'",';
}
?>
];
$( "#appname" ).autocomplete({
source: availableTags,
select: function( event, ui ) {
$.post('/appload', { app: ui.item.value }, function(data) {
alert(data);
});
}
});
});
</script>