index.html 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <style>
  2. .jstree-default .jstree-disabled {
  3. color: #BBBBBB;
  4. }
  5. .label-grey {
  6. background-color: #BBBBBB;
  7. }
  8. .form-commonsearch .form-group {
  9. margin-left: 0;
  10. margin-right: 0;
  11. padding: 0;
  12. }
  13. form.form-commonsearch .control-label {
  14. padding-right: 0;
  15. }
  16. .tdtitle {
  17. margin-bottom: 5px;
  18. font-weight: 600;
  19. }
  20. #columntree {
  21. margin-left: -6px;
  22. }
  23. #columnbar .panel-heading {
  24. height: 55px;
  25. line-height: 25px;
  26. font-size: 14px;
  27. }
  28. #columnbar en {
  29. font-size: 12px;
  30. color: #BBBBBB;
  31. }
  32. @media (max-width: 1230px) {
  33. .fixed-table-toolbar .search .form-control {
  34. display: none;
  35. }
  36. }
  37. @media (min-width: 1200px) {
  38. }
  39. .archives-label span.label {
  40. font-weight: normal;
  41. }
  42. .archives-title {
  43. max-width: 400px;
  44. min-width: 200px;
  45. overflow: hidden;
  46. text-overflow: ellipsis;
  47. }
  48. .setflag label {
  49. font-weight: 400;
  50. }
  51. .nav > li.toggle-column {
  52. display: none;
  53. }
  54. .col-full-width .nav > li.toggle-column {
  55. display: inline-block;
  56. }
  57. #myTabContent {
  58. background-color: #fff;
  59. }
  60. #columnoperate > span {
  61. font-size: 14px;
  62. color: #777;
  63. }
  64. #columnoperate > span:first-child {
  65. margin-right: 10px;
  66. }
  67. #columnoperate > span label {
  68. font-weight: 400;
  69. }
  70. .row-eq-height {
  71. display: -webkit-box;
  72. display: -webkit-flex;
  73. display: -ms-flexbox;
  74. display: flex;
  75. }
  76. </style>
  77. <style data-render="darktheme">
  78. body.darktheme #myTabContent {
  79. background-color: #333;
  80. }
  81. body.darktheme .tagsinput {
  82. background-color: #3c3e3d;
  83. border-color: #444;
  84. color: #ccc;
  85. }
  86. body.darktheme .sim-tree a {
  87. color: #ccc;
  88. }
  89. body.darktheme .sim-tree .sim-icon-d:before {
  90. border-top-color: #ccc;
  91. }
  92. body.darktheme .sim-tree .sim-icon-r:before {
  93. border-left-color: #ccc;
  94. }
  95. </style>
  96. <div class="row row-eq-height">
  97. <div class="col-md-3 pr-0" id="columnbar">
  98. <div class="panel panel-default panel-intro" style="height: 100%;">
  99. <div class="panel-heading">
  100. <div class="panel-lead">
  101. <div class="pull-left">
  102. <em>{:__('Column list')}</em>
  103. </div>
  104. <div class="pull-right">
  105. <a href="javascript:;" class="btn btn-link btn-xs btn-column hidden-xs hidden-sm"><i class="fa fa-bars"></i></a>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="panel-body">
  110. <span class="text-muted"><input type="checkbox" name="" id="checkall" /> <label for="checkall"><small>{:__('Check all')}</small></label></span>
  111. <span class="text-muted"><input type="checkbox" name="" id="expandall" checked="" /> <label for="expandall"><small>{:__('Expand all')}</small></label></span>
  112. <div id="columntree"></div>
  113. </div>
  114. </div>
  115. </div>
  116. <script type="text/javascript">
  117. if (window.innerWidth < 768) {
  118. document.getElementById('columnbar').className = document.getElementById('columnbar').className.replace("pr-0", "hidden");
  119. }
  120. </script>
  121. <div class="col-xs-12 col-md-9" id="archivespanel">
  122. <div class="panel panel-default panel-intro" style="background: #f1f4f6;padding-top: 0;padding-bottom: 0;box-shadow: none;">
  123. <div class="panel-heading">
  124. <div class="panel-lead"><em>内容管理(Content Management)</em>用于管理产品中心、解决方案、资料下载、新闻中心栏目数据,启用英文后切换English管理英文数据</div>
  125. {if $switch_lang == '1'}
  126. <ul class="nav nav-tabs" data-field="lang">
  127. {foreach name="langList" item="vo"}
  128. <li class="{:$Think.get.lang === (string)$key ? 'active' : ''}"><a href="#t-{$key}" data-value="{$key}" data-toggle="tab" onclick="updateBoxStyle('{$key}')">{$vo}</a></li>
  129. {/foreach}
  130. </ul>
  131. {/if}
  132. </div>
  133. <div {if $switch_lang == '1'}class="box" id="SwitchColors"{/if}>
  134. <div id="myTabContent" class="tab-content" style="padding:15px;">
  135. <div class="tab-pane fade active in" id="one">
  136. <div class="widget-body no-padding">
  137. <div id="toolbar" class="toolbar">
  138. <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
  139. <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('wwh/archives/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
  140. <a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('wwh/archives/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
  141. <a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('wwh/archives/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
  142. <a href="javascript:;" class="btn btn-info btn-audit btn-disabled disabled {:$auth->check('wwh/archives/audit')?'':'hide'}" title="{:__('批量审核')}" ><i class="fa fa-check"></i> {:__('批量审核')}</a>
  143. </div>
  144. <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
  145. data-operate-edit="{:$auth->check('wwh/archives/edit')}"
  146. data-operate-del="{:$auth->check('wwh/archives/del')}"
  147. data-operate-faudit="{:$auth->check('wwh/archives/faudit')}"
  148. width="100%">
  149. </table>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. </div>
  157. <script>
  158. // 直接定义全局函数
  159. function updateBoxStyle(langId) {
  160. // 样式映射
  161. const styleMap = {
  162. '1': 'box-success',
  163. '2': 'box-warning'
  164. };
  165. // 清除旧样式
  166. document.getElementById('SwitchColors').classList.remove('box-success', 'box-warning');
  167. // 添加新样式
  168. document.getElementById('SwitchColors').classList.add(styleMap[langId] || 'box-success');
  169. console.log('当前语言:', langId, '应用样式:', styleMap[langId]);
  170. }
  171. // 初始化执行
  172. document.addEventListener('DOMContentLoaded', function() {
  173. // 获取当前激活的Tab
  174. const activeTab = document.querySelector('#lang-tabs li.active a');
  175. if (activeTab) {
  176. updateBoxStyle(activeTab.dataset.lang);
  177. }
  178. });
  179. </script>