minor fixes
This commit is contained in:
parent
7eabf070a8
commit
02569b83e6
@ -64,18 +64,15 @@ jQuery(document).ready(function ($) {
|
||||
return $(el).val() === value;
|
||||
}).data('input');
|
||||
|
||||
if ($modal.find('.picker').length === 0) {
|
||||
$modal.find('.upload').find('input, select').prop('disabled', false);
|
||||
if ($modal.find('.picker:visible').length === 0) {
|
||||
$('.slide-add-object-input')
|
||||
.addClass('hidden')
|
||||
.prop('disabled', true).prop('required', false)
|
||||
.filter('#slide-add-object-input-' + inputType)
|
||||
.removeClass('hidden')
|
||||
.prop('disabled', false).prop('required', true)
|
||||
;
|
||||
}
|
||||
|
||||
$('.slide-add-object-input')
|
||||
.addClass('hidden')
|
||||
.prop('disabled', true)
|
||||
.filter('#slide-add-object-input-' + inputType)
|
||||
.removeClass('hidden')
|
||||
.prop('disabled', false)
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
const inputSchedulerUpdate = function() {
|
||||
@ -213,14 +210,19 @@ jQuery(document).ready(function ($) {
|
||||
|
||||
$(document).on('click', '.picker button', function () {
|
||||
const $parent = $(this).parents('.modal-slide-add');
|
||||
$parent.find('.picker').remove();
|
||||
$parent.find('.upload').removeClass('hidden');
|
||||
$parent.find('.picker').addClass('hidden').find('select').prop('disabled', true);
|
||||
$parent.find('.upload').removeClass('hidden').find('input,select').prop('disabled', false);
|
||||
inputTypeUpdate();
|
||||
});
|
||||
|
||||
$(document).on('click', '.slide-add', function () {
|
||||
showModal('modal-slide-add');
|
||||
loadDateTimePicker($('.modal-slide-add .datetimepicker'))
|
||||
const $modal = $('.modal-slide-add:visible');
|
||||
loadDateTimePicker($modal.find('.datetimepicker'));
|
||||
$modal.find('.picker').removeClass('hidden').find('select').prop('disabled', false);
|
||||
$modal.find('.upload').addClass('hidden').find('input,select').prop('disabled', true);
|
||||
$modal.find('button[type=submit]').removeClass('hidden');
|
||||
$modal.find('.btn-loading').addClass('hidden');
|
||||
inputTypeUpdate();
|
||||
inputSchedulerUpdate();
|
||||
inputContentUpdate();
|
||||
|
||||
@ -129,6 +129,10 @@ class PluginStore:
|
||||
if variable.name in self._dead_variables_candidates:
|
||||
del self._dead_variables_candidates[variable.name]
|
||||
|
||||
# LANGS
|
||||
self._model_store.lang().load(directory=plugin.get_directory(), prefix=plugin.use_id())
|
||||
self._model_store.variable().reload()
|
||||
|
||||
if not self.is_plugin_enabled(plugin):
|
||||
return
|
||||
|
||||
@ -157,10 +161,6 @@ class PluginStore:
|
||||
"s" if len(hooks_registrations) > 1 else "",
|
||||
))
|
||||
|
||||
# LANGS
|
||||
self._model_store.lang().load(directory=plugin.get_directory(), prefix=plugin.use_id())
|
||||
self._model_store.variable().reload()
|
||||
|
||||
# WEB CONTROLLERS
|
||||
self.load_controllers(plugin)
|
||||
|
||||
@ -171,6 +171,6 @@ class PluginStore:
|
||||
|
||||
def is_plugin_enabled(self, plugin: ObPlugin) -> bool:
|
||||
var = self._model_store.variable().get_one_by_name(plugin.get_plugin_variable_name(self.DEFAULT_PLUGIN_ENABLED_VARIABLE))
|
||||
logging.info("[plugin] {} {}".format("🟢" if var.as_bool() else "⚫️", plugin.use_title()))
|
||||
logging.info("[plugin] {} {}".format("🟢" if var.as_bool() else "⚫️", self._model_store.lang().translate(plugin.use_title())))
|
||||
|
||||
return var.as_bool() if var else False
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
|
||||
<div class="form-group slide-content-id-group">
|
||||
<label for="slide-add-content-id">{{ l.slideshow_slide_form_label_content_id }}</label>
|
||||
<select name="content_id" type="text" id="slide-add-content-id" required="required">
|
||||
|
||||
</select>
|
||||
<div class="widget">
|
||||
<select name="content_id" type="text" id="slide-add-content-id" required="required"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user