mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 23:06:08 -06:00
Merge pull request #467 from openclassify/dia
#1175 Watermark admin settings imp.
This commit is contained in:
commit
b6678505db
@ -0,0 +1,13 @@
|
|||||||
|
// Hide watermark_image by default
|
||||||
|
$(".watermark_image").hide();
|
||||||
|
|
||||||
|
$("select[name='watermark_type']").change((event) => {
|
||||||
|
let watermarkType = event.target.value;
|
||||||
|
if (watermarkType === 'text') {
|
||||||
|
$(".watermark_image").hide();
|
||||||
|
$(".watermark_text").show()
|
||||||
|
} else if (event.target.value === 'image') {
|
||||||
|
$(".watermark_image").show();
|
||||||
|
$(".watermark_text").hide()
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -3,11 +3,13 @@
|
|||||||
use Anomaly\Streams\Platform\Addon\AddonCollection;
|
use Anomaly\Streams\Platform\Addon\AddonCollection;
|
||||||
use Anomaly\Streams\Platform\Addon\AddonServiceProvider;
|
use Anomaly\Streams\Platform\Addon\AddonServiceProvider;
|
||||||
use Anomaly\Streams\Platform\Model\Location\LocationVillageEntryModel;
|
use Anomaly\Streams\Platform\Model\Location\LocationVillageEntryModel;
|
||||||
|
use Anomaly\Streams\Platform\Ui\Table\Event\TableIsQuerying;
|
||||||
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
use Visiosoft\AdvsModule\Adv\Contract\AdvRepositoryInterface;
|
||||||
use Visiosoft\AdvsModule\Adv\AdvRepository;
|
use Visiosoft\AdvsModule\Adv\AdvRepository;
|
||||||
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
use Anomaly\Streams\Platform\Model\Advs\AdvsAdvsEntryModel;
|
||||||
use Visiosoft\AdvsModule\Adv\AdvModel;
|
use Visiosoft\AdvsModule\Adv\AdvModel;
|
||||||
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
|
use Visiosoft\AdvsModule\Adv\Form\AdvFormBuilder;
|
||||||
|
use Visiosoft\AdvsModule\Listener\AddAdvsSettingsScript;
|
||||||
use Visiosoft\LocationModule\Village\Contract\VillageRepositoryInterface;
|
use Visiosoft\LocationModule\Village\Contract\VillageRepositoryInterface;
|
||||||
use Visiosoft\LocationModule\Village\VillageRepository;
|
use Visiosoft\LocationModule\Village\VillageRepository;
|
||||||
use Visiosoft\LocationModule\Village\VillageModel;
|
use Visiosoft\LocationModule\Village\VillageModel;
|
||||||
@ -262,9 +264,9 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
* @type array|null
|
* @type array|null
|
||||||
*/
|
*/
|
||||||
protected $listeners = [
|
protected $listeners = [
|
||||||
//Visiosoft\AdvsModule\Event\ExampleEvent::class => [
|
TableIsQuerying::class => [
|
||||||
// Visiosoft\AdvsModule\Listener\ExampleListener::class,
|
AddAdvsSettingsScript::class,
|
||||||
//],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -0,0 +1,18 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Listener;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Ui\Table\Event\TableIsQuerying;
|
||||||
|
|
||||||
|
class AddAdvsSettingsScript
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param TableIsQuerying $event
|
||||||
|
*/
|
||||||
|
public function handle(TableIsQuerying $event)
|
||||||
|
{
|
||||||
|
if (pathinfo(request()->url())['basename'] === "visiosoft.module.advs") {
|
||||||
|
$builder = $event->getBuilder();
|
||||||
|
$builder->addAsset('scripts.js', 'visiosoft.module.advs::js/settings.js');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user