Skip to content

Commit

Permalink
Исправлено подеючение select2
Browse files Browse the repository at this point in the history
Для полей изобржений подключен пакет flow.js
  • Loading branch information
butschster committed Feb 20, 2016
1 parent 886cb6b commit 5efaaa6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion resources/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ function resources_url($path)
->js(null, resources_url('js/datatables.min.js'), ['datatables'])
->with('datatables');

PackageManager::add(\SleepingOwl\Admin\FormItems\Image::class)
->with('flow.js');

PackageManager::add('libraries')
->js(null, resources_url('js/libraries.js'), ['jquery']);

Expand Down Expand Up @@ -73,7 +76,7 @@ function resources_url($path)
->js(null, resources_url('libs/noty/js/jquery.noty.packaged.min.js'), ['jquery']);

PackageManager::add('select2')
->js(null, resources_url('libs/select2/js/select2.full.min.js'), ['jquery'])
->js(null, resources_url('libs/select2/js/select2.full.min.js'), ['jquery', 'libraries'])
->css(null, resources_url('libs/select2/css/select2.min.css'));

PackageManager::add('Sortable')
Expand Down
2 changes: 1 addition & 1 deletion resources/views/default/formitem/multiselect.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="form-group {{ $errors->has($name) ? 'has-error' : '' }}">
<label for="{{ $name }}">{{ $label }}</label>
<div>
<select id="{{ $name }}" name="{{ $name }}[]" class="form-control multiselect" multiple="multiple">
<select id="{{ $name }}" name="{{ $name }}[]" class="form-control input-select" multiple="multiple">
@foreach ($options as $optionValue => $optionLabel)
<option value="{{ $optionValue }}" {!! isset($value) && in_array($optionValue, $value) ? 'selected="selected"' : '' !!}>{{ $optionLabel }}</option>
@endforeach
Expand Down
2 changes: 1 addition & 1 deletion resources/views/default/formitem/select.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="form-group {{ $errors->has($name) ? 'has-error' : '' }}">
<label for="{{ $name }}">{{ $label }}</label>
<div>
<select id="{{ $name }}" name="{{ $name }}" class="form-control multiselect" size="2" data-select-type="single" {!! ($nullable) ? 'data-nullable="true"' : '' !!}>
<select id="{{ $name }}" name="{{ $name }}" class="form-control input-select" size="2" data-select-type="single" {!! ($nullable) ? 'data-nullable="true"' : '' !!}>
@if ($nullable)
<option value=""></option>
@endif
Expand Down

0 comments on commit 5efaaa6

Please sign in to comment.