* fix edit-icon-modal selected.
This commit is contained in:
@@ -8,8 +8,8 @@ function handleThemeButtonClick(event)
|
||||
const $prev = $('.theme-checked');
|
||||
$prev.removeClass('theme-checked');
|
||||
$button.addClass('theme-checked');
|
||||
$button.html($prev.html());
|
||||
$prev.empty();
|
||||
$button.append(iconCheck);
|
||||
$icon.css('background-color', $button.css('background-color'));
|
||||
$icon.css('border', $button.css('border'));
|
||||
selectedTheme = $button.index();
|
||||
@@ -46,6 +46,19 @@ function handleNextStepClick()
|
||||
$('[name="toNext"]').prop('value', '1');
|
||||
}
|
||||
|
||||
function handleOpenModal()
|
||||
{
|
||||
const $button = $('#ai-edit-icon');
|
||||
const iconName = $button.find('svg').prop('id');
|
||||
const iconTheme = $button.css('background-color');
|
||||
const $container = $('.icon-setting-container');
|
||||
$container.find(`#${iconName}`).click();
|
||||
$container.find('.btn-icon').each(function()
|
||||
{
|
||||
if($(this).css('background-color') === iconTheme) $(this).click();
|
||||
});
|
||||
}
|
||||
|
||||
$(function()
|
||||
{
|
||||
$('#theme-buttons button').on('click', handleThemeButtonClick);
|
||||
@@ -53,4 +66,5 @@ $(function()
|
||||
$('#save-icon-button').on('click', handleSaveButtonClick);
|
||||
$('#save-miniprogram').on('click', handleSaveMiniProgramClick);
|
||||
$('#next-step').on('click', handleNextStepClick);
|
||||
$('#ai-edit-icon').on('click', handleOpenModal);
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* The create ai mini program file of ai module of ZenTaoPMS.
|
||||
*
|
||||
@@ -11,6 +10,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php'; ?>
|
||||
<?php js::set('iconCheck', $config->ai->miniPrograms->iconCheck); ?>
|
||||
<div id="mainContent" class="main-content" style="position: fixed; top: 66px; right: 16px; bottom: 16px; left: 16px;">
|
||||
<div style="width: 660px; margin: 0 auto;">
|
||||
<div style="display: flex; align-items: center; justify-content: flex-start; margin-bottom: 20px;">
|
||||
@@ -107,7 +107,6 @@
|
||||
echo "<button type='button' class='btn btn-icon' style='width: 32px; height: 32px; border-radius: 50%; background-color: $theme[0]; border: 1px solid $theme[1];'></button>";
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 32px;">
|
||||
|
||||
Reference in New Issue
Block a user