+ 禅道15系列功能介绍
+diff --git a/module/index/js/index.js b/module/index/js/index.js index 251de06f99..79d2a515e4 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -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}) +} diff --git a/module/misc/control.php b/module/misc/control.php index 2736f69ed8..9b6254ecf9 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -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(); + } } diff --git a/module/misc/css/features.css b/module/misc/css/features.css new file mode 100644 index 0000000000..0873d230b7 --- /dev/null +++ b/module/misc/css/features.css @@ -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;} diff --git a/module/misc/js/features.js b/module/misc/js/features.js new file mode 100644 index 0000000000..817754fba1 --- /dev/null +++ b/module/misc/js/features.js @@ -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); +}); diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 127891589c..d8aee15a61 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -81,8 +81,13 @@ $lang->misc->noticeRepair = "