+ add misc/features page.

This commit is contained in:
Hao Sun
2021-09-09 12:33:51 +08:00
parent 6b3b5661db
commit f54cf01c04
7 changed files with 124 additions and 4 deletions

View File

@@ -852,3 +852,9 @@ function getLatestVersion()
$('#globalSearchInput').click();
$('#upgradeContent').toggle();
}
/** Show features dialog */
function showFeaturesDialog()
{
$.zui.modalTrigger.show({url: $.createLink('misc', 'features'), type: 'ajax', width: 900, showHeader: false})
}

View File

@@ -247,4 +247,12 @@ class misc extends control
$data = array('content' => $this->misc->getRemind(), 'title' => $this->lang->misc->remind);
$this->send(array('result' => 'success', 'data' => $data));
}
/**
* Features dialog.
*/
public function features()
{
$this->display();
}
}

View File

@@ -0,0 +1,20 @@
#features > header {text-align: center;}
#features > footer {text-align: center; padding-top: 18px; border-top: 1px solid #eee}
#featuresNav {display: inline-block; font-size: 15px; margin-bottom: 15px;}
#featuresNav > li > a {opacity: .5;}
#featuresNav > li > a:hover {opacity: 1;}
#featuresNav > li.active > a {background-color: transparent; font-weight: bold; opacity: .7;}
#featuresNav > li.active > a:hover {background-color: #f1f1f1; opacity: 1;}
#featuresCarousel {padding: 0 50px;}
#featuresCarousel .carousel-indicators {bottom: 0;}
#featuresCarousel .carousel-indicators li {border-color: #d8d8d8; background-color: #d8d8d8; width: 12px; height: 12px;}
#featuresCarousel .carousel-indicators li + li {margin-left: 10px;}
#featuresCarousel .carousel-indicators .active {border-color: #73b1df; background-color: #73b1df; }
#features [data-slide-to] {pointer-events: none;}
#features.enabled [data-slide-to] {pointer-events: auto;}
#features .btn-close-modal {display: none;}
#features.is-last-item .btn-slide-next {display: none;}
#features.is-last-item .btn-close-modal {display: inline-block;}

View File

@@ -0,0 +1,28 @@
$(function()
{
/* Support to slide to next by click btn */
$('#features').on('click', '.slide-feature-to-next', function()
{
$('#featuresCarousel').carousel('next');
});
$('#featuresCarousel').on('slide.zui.carousel', function(e)
{
var $next = $(e.relatedTarget);
var $items = $next.parent().children();
var index = $items.index($next);
var itemsCount = $items.length;
var isLastItem = index === itemsCount - 1;
var $features = $('#features');
var $nav = $('#featuresNav');
$nav.find('li.active').removeClass('active');
$nav.find('a[data-slide-to="' + index + '"]').parent().addClass('active');
$features.toggleClass('is-last-item', isLastItem);
if(isLastItem) $features.addClass('enabled');
});
$('#features').toggleClass('is-last-item', $('#features>.carousel-inner>.item').length < 2);
});

View File

@@ -81,8 +81,13 @@ $lang->misc->noticeRepair = "<h5>If you are not Administrator, contact your ZenT
</ol>";
$lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Detail';
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Detail';
$lang->misc->feature->introduction = 'New features';
$lang->misc->feature->tutorial = 'Novice tutorial';
$lang->misc->feature->brandBlueTheme = 'Bran new theme "Young Blue"';
$lang->misc->feature->nextStep = 'Next step';
$lang->misc->feature->close = 'Close';
$lang->misc->releaseDate['15.4'] = '2021-08-23';
$lang->misc->releaseDate['15.3'] = '2021-08-04';

View File

@@ -81,8 +81,13 @@ $lang->misc->noticeRepair = "<h5>普通用户请联系管理员进行修复</h5>
</ol>";
$lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '详情';
$lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '详情';
$lang->misc->feature->introduction = '新功能介绍';
$lang->misc->feature->tutorial = '新手引导教程';
$lang->misc->feature->brandBlueTheme = '全新青春蓝主题';
$lang->misc->feature->nextStep = '下一步';
$lang->misc->feature->close = '关闭';
$lang->misc->releaseDate['15.4'] = '2021-08-23';
$lang->misc->releaseDate['15.3'] = '2021-08-04';

View File

@@ -0,0 +1,48 @@
<?php include '../../common/view/header.lite.html.php';?>
<?php include '../../common/view/carousel.html.php';?>
<main id='features'>
<header>
<ul class='nav nav-simple' id='featuresNav'>
<li class='active'><a class='slide-feature-to' data-slide-to='0' href='#featuresCarousel'><?php echo $lang->misc->feature->introduction; ?></a></li>
<li><a class='slide-feature-to' data-slide-to='1' href='#featuresCarousel'><?php echo $lang->misc->feature->tutorial; ?></a></li>
<li><a class='slide-feature-to' data-slide-to='2' href='#featuresCarousel'><?php echo $lang->misc->feature->brandBlueTheme; ?></a></li>
</ul>
</header>
<div id='featuresCarousel' class='carousel slide' data-ride='carousel' data-interval='false'>
<ol class='carousel-indicators'>
<li data-target='#featuresCarousel' data-slide-to='0' class='active'></li>
<li data-target='#featuresCarousel' data-slide-to='1'></li>
<li data-target='#featuresCarousel' data-slide-to='2'></li>
</ol>
<div class='carousel-inner'>
<div class='item active' style='height: 400px'>
<div class='article-content'>
<img src='http://openzui.com/docs/img/slide1.jpg'>
<div style='position:relative'>
<p>禅道15系列功能介绍</p>
<div style='position:absolute;right:0;bottom:0'>
<a href="###">下载新版本功能介绍文档</a>
</div>
</div>
</div>
</div>
<div class='item' style='height: 400px'>
<img src='http://openzui.com/docs/img/slide2.jpg'>
<div class='carousel-caption'>
此页面包含整张图片,文字呈现在图片之上
</div>
</div>
<div class='item' style='height: 400px'>
<img alt='Third slide' src='http://openzui.com/docs/img/slide3.jpg'>
<div class='carousel-caption'></div>
</div>
</div>
</div>
<footer>
<button type='button' class='btn btn-primary btn-wide slide-feature-to-next btn-slide-next'><?php echo $lang->misc->feature->nextStep; ?></button>
<button type='button' data-dismiss='modal' class='btn btn-primary btn-wide btn-close-modal'><?php echo $lang->misc->feature->close; ?></button>
</footer>
</main>
<?php include '../../common/view/footer.lite.html.php';?>