Fix plugincontrols in no-js mode
This commit is contained in:
parent
c731c371d3
commit
b55689ebf4
@ -54,11 +54,6 @@ function serendipity_pluginListSort($x, $y) {
|
||||
*/
|
||||
function show_plugins($event_only = false, $sidebars = null)
|
||||
{
|
||||
static $opts = array(
|
||||
'event' => PLUGIN_ACTIVE,
|
||||
'eventh' => PLUGIN_INACTIVE
|
||||
);
|
||||
|
||||
global $serendipity;
|
||||
|
||||
$sql_filter = '';
|
||||
@ -93,7 +88,6 @@ function show_plugins($event_only = false, $sidebars = null)
|
||||
|
||||
$data['event_only'] = $event_only;
|
||||
if (!$event_only) {
|
||||
$data['event_only'] = false;
|
||||
$data['is_first'] = true;
|
||||
}
|
||||
|
||||
@ -174,15 +168,15 @@ function show_plugins($event_only = false, $sidebars = null)
|
||||
);
|
||||
}
|
||||
|
||||
static $event_opts = array(
|
||||
'event' => PLUGIN_ACTIVE,
|
||||
$event_opts = array(
|
||||
'event' => PLUGIN_ACTIVE,
|
||||
'eventh' => PLUGIN_INACTIVE,
|
||||
);
|
||||
);
|
||||
|
||||
if ($is_event) {
|
||||
$gopts =& $event_opts;
|
||||
if ($event_only) {
|
||||
$gopts = $event_opts;
|
||||
} else {
|
||||
$gopts =& $opts;
|
||||
$gopts = $opts;
|
||||
}
|
||||
|
||||
$data['placement'][$plugin_placement]['plugin_data'][$i]['sort_idx'] = $sort_idx;
|
||||
|
2
templates/2k11/admin/js/dragdrop.js
vendored
2
templates/2k11/admin/js/dragdrop.js
vendored
@ -12,7 +12,7 @@ $("document").ready(function() {
|
||||
|
||||
onDrop: function ($item, container, _super) {
|
||||
var placement = $item.parents('.pluginmanager_container').data("placement");
|
||||
$item.find('input[name$="placement]"]').val(placement);
|
||||
$item.find('select[name$="placement]"]').val(placement);
|
||||
$item.removeClass("dragged").removeAttr("style")
|
||||
$("body").removeClass("dragging")
|
||||
$.autoscroll.stop();
|
||||
|
@ -16,7 +16,6 @@
|
||||
<li id="{$plugin_data['css_key']}" class="pluginmanager_plugin pluginmanager_item_{cycle values="odd,even"}">
|
||||
<input type="hidden" name="serendipity[plugin][{$plugin_data['name']}][id]" value="{$plugin_data['name']}" />
|
||||
<input type="hidden" name="serendipity[plugin][{$plugin_data['name']}][position]" value="{$plugin_data@index}" />
|
||||
<input type="hidden" name="serendipity[plugin][{$plugin_data['name']}][placement]" value="{$plugin_placement['pid']}" />
|
||||
{if $plugin_data['is_plugin_editable']}
|
||||
<div class="form_check">
|
||||
<input id="remove_{$plugin_data['name']}" class="multidelete" name="serendipity[plugin_to_remove][]" type="checkbox" value="{$plugin_data['name']}" data-multidelid="{$plugin_data['css_key']}">
|
||||
@ -57,11 +56,8 @@
|
||||
|
||||
</li>
|
||||
<li class="pluginmanager_place nojs-controls">
|
||||
<select name="serendipity[placement][{$plugin_data['name']}]">
|
||||
<select name="serendipity[plugin][{$plugin_data['name']}][placement]">
|
||||
{foreach $plugin_data.gopts as $k => $v}
|
||||
{if {$plugin_data.is_plugin_editable} && $k == 'hide'}
|
||||
{continue}
|
||||
{/if}
|
||||
<option value="{$k}" {if $k == $plugin_data['placement']}selected="selected"{/if}>{$v}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
Loading…
x
Reference in New Issue
Block a user