Skip to content

Commit c0d94c5

Browse files
committed
remove wysiwyg
1 parent 6dad18e commit c0d94c5

File tree

3 files changed

+13
-32
lines changed

3 files changed

+13
-32
lines changed

app/Http/Controllers/Admin/FluentMonsterCrudController.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,12 +443,6 @@ protected function setupCreateOperation()
443443
->type('summernote')
444444
->label('Summernote editor')
445445
->tab('Big texts');
446-
447-
CRUD::field('wysiwyg')
448-
->type('ckeditor')
449-
->label('CKEditor - also called the WYSIWYG field')
450-
->tab('Big texts');
451-
452446
CRUD::field('tinymce')
453447
->type('tinymce')
454448
->label('TinyMCE')

app/Http/Controllers/Admin/MonsterCrudController.php

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MonsterCrudController extends CrudController
1616
use \Backpack\CRUD\app\Http\Controllers\Operations\ShowOperation;
1717
use \Backpack\CRUD\app\Http\Controllers\Operations\FetchOperation;
1818
use \Backpack\Pro\Http\Controllers\Operations\AjaxUploadOperation { ajaxUpload as traitAjaxUpload; }
19-
use \App\Http\Controllers\Admin\Operations\SMSOperation; //Custom Form Operation Example
19+
use Operations\SMSOperation; //Custom Form Operation Example
2020
use \Backpack\ActivityLog\Http\Controllers\Operations\ModelActivityOperation;
2121
use \Backpack\ActivityLog\Http\Controllers\Operations\EntryActivityOperation;
2222

@@ -320,13 +320,6 @@ public function setupShowOperation()
320320
'tab' => 'WYSIWYG Editors',
321321
]);
322322

323-
$this->crud->addColumn([
324-
'name' => 'wysiwyg',
325-
'type' => 'wysiwyg',
326-
'label' => 'Wysiwyg'.backpack_pro_badge(),
327-
'tab' => 'WYSIWYG Editors',
328-
]);
329-
330323
$this->crud->addColumn([
331324
'name' => 'features',
332325
'label' => 'Features'.backpack_pro_badge(),
@@ -734,7 +727,7 @@ protected function addCustomCrudFilters()
734727
],
735728
false, // the simple filter has no values, just the "Draft" label specified above
736729
function () { // if the filter is active (the GET parameter "draft" exits)
737-
$this->crud->addClause('where', 'checkbox', '1');
730+
$this->crud->addClause('where', 'checkbox', '1');
738731
}
739732
);
740733

@@ -755,7 +748,7 @@ function () { // if the filter is active (the GET parameter "draft" exits)
755748
],
756749
false,
757750
function ($value) { // if the filter is active
758-
$this->crud->addClause('where', 'text', 'LIKE', "%$value%");
751+
$this->crud->addClause('where', 'text', 'LIKE', "%$value%");
759752
}
760753
);
761754

@@ -769,7 +762,7 @@ function ($value) { // if the filter is active
769762
],
770763
false,
771764
function ($value) { // if the filter is active
772-
$range = json_decode($value);
765+
$range = json_decode($value);
773766
if ($range->from && $range->to) {
774767
$this->crud->addClause('where', 'number', '>=', (float) $range->from);
775768
$this->crud->addClause('where', 'number', '<=', (float) $range->to);
@@ -785,7 +778,7 @@ function ($value) { // if the filter is active
785778
],
786779
false,
787780
function ($value) { // if the filter is active, apply these constraints
788-
$this->crud->addClause('where', 'date', '=', $value);
781+
$this->crud->addClause('where', 'date', '=', $value);
789782
}
790783
);
791784

@@ -803,7 +796,7 @@ function ($value) { // if the filter is active, apply these constraints
803796
],
804797
false,
805798
function ($value) { // if the filter is active, apply these constraints
806-
$dates = json_decode($value);
799+
$dates = json_decode($value);
807800
$this->crud->addClause('where', 'date', '>=', $dates->from);
808801
$this->crud->addClause('where', 'date', '<=', $dates->to);
809802
}
@@ -816,7 +809,7 @@ function ($value) { // if the filter is active, apply these constraints
816809
], function () {
817810
return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
818811
}, function ($value) { // if the filter is active
819-
$this->crud->addClause('where', 'select2', $value);
812+
$this->crud->addClause('where', 'select2', $value);
820813
});
821814

822815
$this->crud->addFilter([ // select2_multiple filter
@@ -826,9 +819,9 @@ function ($value) { // if the filter is active, apply these constraints
826819
], function () {
827820
return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
828821
}, function ($values) { // if the filter is active
829-
foreach (json_decode($values) as $key => $value) {
830-
$this->crud->addClause('orWhere', 'select2', $value);
831-
}
822+
foreach (json_decode($values) as $key => $value) {
823+
$this->crud->addClause('orWhere', 'select2', $value);
824+
}
832825
});
833826

834827
$this->crud->addFilter(
@@ -841,7 +834,7 @@ function ($value) { // if the filter is active, apply these constraints
841834
],
842835
url('api/article-search'), // the ajax route
843836
function ($value) { // if the filter is active
844-
$this->crud->addClause('where', 'select2_from_ajax', $value);
837+
$this->crud->addClause('where', 'select2_from_ajax', $value);
845838
}
846839
);
847840
}
@@ -1721,12 +1714,6 @@ public static function getFieldsArrayForWysiwygEditorsTab()
17211714
'type' => 'tinymce',
17221715
'tab' => 'WYSIWYG Editors',
17231716
],
1724-
[ // Wysiwyg
1725-
'name' => 'wysiwyg',
1726-
'label' => 'Wysiwyg'.backpack_pro_badge(),
1727-
'type' => 'wysiwyg',
1728-
'tab' => 'WYSIWYG Editors',
1729-
],
17301717
];
17311718
}
17321719

app/Http/Controllers/Admin/ProductCrudController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ protected function setupCreateOperation()
9191
'tab' => 'Texts',
9292
]);
9393

94-
CRUD::addField([ // Wysiwyg
94+
CRUD::addField([ // summernote
9595
'name' => 'details',
9696
'label' => 'Details',
97-
'type' => 'wysiwyg',
97+
'type' => 'summernote',
9898
'tab' => 'Texts',
9999
]);
100100

0 commit comments

Comments
 (0)