mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-08-27 16:01:14 +00:00
Add resolution_fit option in theme plugin.
This commit is contained in:
@@ -1 +1 @@
|
||||
20221221 12:11:59
|
||||
20221204 15:15:33
|
@@ -757,7 +757,7 @@
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b id="plugson_build_date">20221221 12:11:59</b>
|
||||
<b id="plugson_build_date">20221204 15:15:33</b>
|
||||
</div>
|
||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||
</footer>
|
||||
@@ -777,10 +777,10 @@
|
||||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||
<!-- jquery validate -->
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=103"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=106"></script>
|
||||
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=103"></script>
|
||||
<script src="/static/js/vtoy.js?v=103"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=106"></script>
|
||||
<script src="/static/js/vtoy.js?v=106"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
|
@@ -71,6 +71,50 @@
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
<div class="box box-primary box-solid" id='resolution_fit_div'>
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">resolution_fit
|
||||
<span id="id_span_desc_cn"> —— 按照分辨率过滤</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_radio_res_fit0" name="id_ctrl_radio_res_fit" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_radio_res_fit1" name="id_ctrl_radio_res_fit" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>当设置多个主题时,在随机选择时是否按照当前分辨率过滤。
|
||||
<code style="font-weight: bold;">0</code> 不过滤
|
||||
<code style="font-weight: bold;">1</code> 过滤 <br/>
|
||||
注意,这个选项必须在上面设置了多个主题配置文件,同时 "默认" 设置为 “随机选择” 时才有效,其他情况下均无效。<br/>
|
||||
关于这个选项的详细解释,请参考 <a href="https://www.ventoy.net/cn/plugin_theme.html#vtoy_theme_res_fit">resolution_fit 选项说明</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
Filter by current resolution when you set more than one themes.
|
||||
<code style="font-weight: bold;">0</code> No filter  
|
||||
<code style="font-weight: bold;">1</code> Filter <br/>
|
||||
You can refer <a href="https://www.ventoy.net/en/plugin_theme.html#vtoy_theme_res_fit">About resolution_fit</a> for details about this option.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
@@ -239,6 +283,8 @@
|
||||
} else {
|
||||
data.display_mode = 0;
|
||||
}
|
||||
|
||||
data.resolution_fit = parseInt($('input:radio[name=id_ctrl_radio_res_fit]:checked').val());
|
||||
}
|
||||
|
||||
function VtoySaveCurrentPage() {
|
||||
@@ -249,6 +295,7 @@
|
||||
method : 'save_theme',
|
||||
index: current_tab_index,
|
||||
display_mode: data.display_mode,
|
||||
resolution_fit: data.resolution_fit,
|
||||
gfxmode: data.gfxmode,
|
||||
default_file: data.default_file
|
||||
}, function(e) {
|
||||
@@ -269,6 +316,12 @@
|
||||
var $tbl = $("#id_theme_tbl_file tbody");
|
||||
$tbl.empty();
|
||||
|
||||
if (list.length > 1) {
|
||||
$('#resolution_fit_div').show();
|
||||
} else {
|
||||
$('#resolution_fit_div').hide();
|
||||
}
|
||||
|
||||
for (var i = 0; i < list.length; i++) {
|
||||
var $tr;
|
||||
td1 = '<td>' + (i + 1) + '</td>';
|
||||
@@ -365,6 +418,8 @@
|
||||
$('select[id=id_theme_sel_dismode').val('GUI');
|
||||
}
|
||||
|
||||
$('input:radio[name=id_ctrl_radio_res_fit]')[data.resolution_fit].checked = true;
|
||||
|
||||
FillThemeFileTable(data.filelist, data.default_file);
|
||||
FillThemeFontTable(data.fontslist);
|
||||
}
|
||||
@@ -515,6 +570,8 @@
|
||||
|
||||
$('select[id=id_theme_sel_gfxmode]').change(VtoySaveCurrentPage);
|
||||
$('select[id=id_theme_sel_dismode]').change(VtoySaveCurrentPage);
|
||||
$('#id_ctrl_radio_res_fit0').change(VtoySaveCurrentPage);
|
||||
$('#id_ctrl_radio_res_fit1').change(VtoySaveCurrentPage);
|
||||
|
||||
$('#id_tab_theme a[href="#tab_0"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_theme a[href="#tab_1"]').click(OnClickMultiModeTab);
|
||||
|
Reference in New Issue
Block a user