* finish task #5585.

This commit is contained in:
wangyidong
2019-05-28 11:20:30 +08:00
parent 5aa8b55e66
commit c83902cb92
2 changed files with 10 additions and 6 deletions
+10 -4
View File
@@ -1,5 +1,11 @@
$(function()
{
var blockTitle = '';
$(document).on('change', '#blockParams #paramstype', function()
{
$('#blockParams').find('#title').val(blockTitle + ' - ' + $(this).find('option:selected').html());
});
var $form = $('#blockAdminForm');
$form.find('.chosen').chosen();
@@ -16,6 +22,9 @@ $(function()
$form.addClass('form-inited');
$blockParams.find('input:first').focus();
if($blockParams.find('#actionLink').size() > 0) $form.attr('action', $blockParams.find('#actionLink').val());
blockTitle = $blockParams.find('#title').val();
if($('#blockParams #paramstype').length > 0) $blockParams.find('#title').val(blockTitle + ' - ' + $('#blockParams #paramstype').find('option:selected').html());
};
// 获取 html 和 rss 区块参数
@@ -29,10 +38,7 @@ $(function()
$.get(createLink('block', 'set', 'id=' + blockID + '&type=' + type), function(data)
{
updateParams(data);
if (type === 'welcome')
{
$blockParams.find('#title').closest('.form-group').hide();
}
if(type === 'welcome') $blockParams.find('#title').closest('.form-group').hide();
});
};
-2
View File
@@ -247,5 +247,3 @@ $(function()
refreshBlock($(this).closest('.panel'));
});
});