Skip to content

Commit 8bb9f7f

Browse files
committed
Revert dependency stuff
1 parent 03f450e commit 8bb9f7f

File tree

4 files changed

+1
-31
lines changed

4 files changed

+1
-31
lines changed

controller/main.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public function handle()
168168
'DESC' => $this->language->lang('SKELETON_QUESTION_COMPONENT_' . strtoupper($component) . '_UI'),
169169
'DESC_EXPLAIN' => $this->language->is_set('SKELETON_QUESTION_COMPONENT_' . strtoupper($component) . '_EXPLAIN') ? $this->language->lang('SKELETON_QUESTION_COMPONENT_' . strtoupper($component) . '_EXPLAIN') : '',
170170
'VALUE' => $this->request->variable('component_' . $component, $details['default']),
171-
'DEPENDS' => $details['dependencies'],
172171
]);
173172

174173
$this->data['components'][$component] = $this->get_user_input('component_' . $component, $details['default']);

styles/prosilver/template/editor.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -37,29 +37,6 @@
3737
$elem.components.prop('checked', $(this).hasClass('markall'));
3838
});
3939

40-
// Auto-mark components that are dependencies
41-
$elem.components.each(function() {
42-
const $component = $(this);
43-
const depends = $component.data('depends');
44-
45-
if (!depends) {
46-
return;
47-
}
48-
49-
const dependIds = depends.split(',').map(id => id.trim());
50-
51-
$component.on('change', function() {
52-
if (this.checked) {
53-
dependIds.forEach(dependId => {
54-
const $dependency = $('#' + dependId);
55-
if ($dependency.length && !$dependency.prop('checked')) {
56-
$dependency.prop('checked', true);
57-
}
58-
});
59-
}
60-
});
61-
});
62-
6340
// Validate vendor/extension names on field blur
6441
$elem.form.on('blur', '#vendor_name, #extension_name', function() {
6542
$(this).checkNames();

styles/prosilver/template/skeleton_body.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,7 @@ <h3 class="skeleton-components">{{ lang('SKELETON_COMPONENT_GROUP_' ~ group) }}<
106106
<div>
107107
<span aria-label="{{ component.DESC_EXPLAIN }}" class="tooltipped tooltipped-e tooltipped-multiline">
108108
<label for="{{ component.NAME }}">
109-
<input class="components"
110-
type="checkbox"
111-
name="{{ component.NAME }}"
112-
id="{{ component.NAME }}"
113-
{% if component.VALUE %}checked="checked"{% endif %}
114-
{% if component.DEPENDS %}data-depends="{{ component.DEPENDS | map(d => 'component_' ~ d) | join(',') }}"{% endif %} />
109+
<input class="components" type="checkbox" name="{{ component.NAME }}" id="{{ component.NAME }}"{% if component.VALUE %} checked="checked"{% endif %} />
115110
<strong>{{ component.DESC }}</strong>
116111
</label>
117112
</span>

tests/controller/main_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ public function test_handle($status_code, $page_content)
248248
'DESC' => 'SKELETON_QUESTION_COMPONENT_PHPLISTENER_UI',
249249
'DESC_EXPLAIN' => 'SKELETON_QUESTION_COMPONENT_PHPLISTENER_EXPLAIN',
250250
'VALUE' => true,
251-
'DEPENDS' => [],
252251
]]
253252
)
254253
;

0 commit comments

Comments
 (0)