diff --git a/module/action/css/trash.css b/module/action/css/trash.css deleted file mode 100755 index 2c21a2cced..0000000000 --- a/module/action/css/trash.css +++ /dev/null @@ -1,14 +0,0 @@ -.table-footer .table-actions {width: auto; visibility: visible; opacity: 1;} -.table-footer .table-actions .text {line-height: 28px;} -#mainContent table tbody tr td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} - -#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff} - -.dropdown-menu .btn-active-text:hover .text:after {border-bottom: 0px;} -#querybox #searchform{border-bottom: 1px solid #ddd; margin-bottom: 20px;} -td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; margin-bottom: 0px;} -.flex span.label-danger {margin-left: 5px; min-width: 50px;} -[lang^=en] .flex span.label-danger {min-width: 52px;} -[lang^=de] .flex span.label-danger {min-width: 58px;} -[lang^=fr] .flex span.label-danger {min-width: 63px;} -.c-name > .text-ellipsis {text-overflow: clip;} diff --git a/module/admin/css/index.css b/module/admin/css/index.css deleted file mode 100755 index 5b09c1f991..0000000000 --- a/module/admin/css/index.css +++ /dev/null @@ -1,107 +0,0 @@ -/* atomic class */ -.flex {display: flex;} -.align-center {align-items: center;} -.justify-between {justify-content: space-between;} -.title-color {color: #313C52} -.font-13 {font-size: 13px;} -.border-gray {border: 1px solid #E3E4E9;} -.h-56 {height: 56px;} -.h-40 {height: 40px;} -.pl-16 {padding-left: 16px;} -.px-16 {padding: 0 16px;} -.mb-16 {margin-bottom: 16px;} -.mr-16 {margin-right: 16px;} -.mx-16 {margin: 0 16px;} -.pd-3 {padding: 3px;} -.pb-3 {padding-bottom: 3px;} -.pr-4 {padding-right: 4px;} -.mt-6 {margin-top: 6px;} -.font-18 {font-size: 18px;} -.font-20 {font-size: 20px;} -.font-24 {font-size: 24px;} -.radius-4 {border-radius: 4px;} -.white-nowrap {white-space: nowrap;} -.w-full {width: 100%;} - -#notice {margin: -20px -20px 20px; padding: 20px;} -#zentaoLinks {margin-top: 20px;} -#zentaoLinks .panel .panel-heading {padding: 6px 10px;} -.main-content.admin {padding: 0;} -.admin {display: flex; background: unset; box-shadow: none;} -.admin h4 {color: #0B0F18;} -.admin > .main {flex: 1 1 70%;} -.admin > .side {flex: 1 1 30%; margin-left: 16px; padding-right: 16px;} -.panel-title {padding: 10px 0px;} -.panel {padding-left: 16px;} -.settings.panel, .plug.panel {margin-bottom: 16px;} -.main > .panel {padding-right: 8px;} -div.setting-box[data-id=platform] div.flex {white-space: nowrap;} -div.setting-box[data-id=platform] > button.btn {padding-right: 5px;} - -.settings-list {display: flex; flex-wrap: wrap; padding: 0 4px 16px 4px;} -.settings-list > .setting-box {border: unset; flex: 0 1 20%; padding: 8px;} -.settings-list > .setting-box > button.btn {padding: 5px 10px; height: 100%; width: 100%; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; white-space: unset; text-align: unset; border: 1px solid rgba(227, 228, 233, 0.6)} -.settings-list > .setting-box > .btn:hover {background: unset;} -.settings-list > .setting-box > .btn[disabled] {cursor: not-allowed; pointer-events: unset;} -.settings-list > .setting-box > .btn[disabled] > a, -.settings-list > .setting-box > .btn[disabled] a.setting-help, -.settings-list > .setting-box > .btn[disabled] p.setting-desc {pointer-events: none;} -.settings-list > .setting-box > .btn > h4 {padding-right: 5px;} -.settings-list > .setting-box > .btn > h4 > div {gap: 3px;} -.settings-list > .setting-box > .btn > h4 > img {padding-right: 8px; padding-bottom: 3px; width: 32px; height: 27px;} -.settings-list > .setting-box > .btn > .setting-desc {padding-bottom: 16px; line-height: 25px; height: 50px; overflow: hidden;} -.settings-list.lite-setting > .setting-box {flex: 1 1 30%;} - -.plugin-list {display: flex; flex-wrap: wrap; padding: 12px 4px 4px 4px;} -.plugin-list > .plugin-item {flex: 1 1 26%; padding: 16px 10px; border: 1px solid #EDEEF2; border-radius: 4px; margin-right: 10px; margin-bottom: 16px; width: 0px; cursor: pointer;} -.plugin-list > .plugin-item .ext-download {float: right; padding: 6px 0px;} -.plugin-list > .plugin-item > .plug-title {height: 16px; overflow: hidden;} -.plugin-list > .plugin-item .extension-desc {overflow: hidden; height: 16px;} - -.bottom.flex > .panel, .side.panel {margin-bottom: 0;} -.bottom.flex > .official {flex: 1 1 30%; margin-right: 16px; padding: 40px 16px 16px 16px; display: flex; flex-direction: column; position: relative;} -.bottom.flex > .publicClass {flex: 1 1 60%;} - -.official {justify-content: center;} -.official > .panel-title {position: absolute; top: 0px;} -.official-img {background-image: url('static/images/wechat.jpg'); background-repeat: no-repeat; background-size: contain; flex: 1 1 30%; aspect-ratio: 1 / 1; background-position: center;} -.official-content {flex: 0 0 60%; display: flex; flex-direction: column; padding-left: 10px; padding-top: 15px;} -.official-content > .content {color: #838A9D; font-size: 12px; line-height: 22px; padding-top: 6px;} -.official-content > .title {color: #313C52; font-size: 13px; line-height: 14px;} -.panel-link {color: #313c52; padding-left: 10px; font-size: 13px;} -.panel-link > a {border-bottom: 1px solid;} - -.classList > .classItem {flex: 1 1 30%; margin: 5px 5px 16px 5px; border: 1px solid rgba(227, 228, 233, 0.6); border-radius: 4px; padding-bottom: 5px; align-items: center;} -.classItem > .imgBack {flex: 1 1 50%;} -.classItem > .imgBack > .classImg {background-repeat: no-repeat; background-size: contain; aspect-ratio: 16 / 9; background-position: center; margin: 0; border-top-left-radius: 4px; border-top-right-radius: 4px;} -.classItem > .classContent {flex: 1 1 50%; padding: 5px; font-size: 14px; color: #0B0F18; text-align: center; overflow: hidden; height: 24px; margin-bottom: 6px; font-weight: 700;} -.more {float: right; padding-right: 12px; font-weight: normal; color: #9EA3B0;} -.panel.publicClass {padding: 0 10px;} -.icon.follow-us {font-size: 20px; padding-left: 10px;} - -.setting-help {color: #9EA3B0; padding-left: 5px;} -.setting-help > a {font-size: 15px;} -[lang^='zh'] .setting-help {padding-top: 0;} -.pointer-none {pointer-events: none;} - -/* css for without internet */ -.main.without-internet {display: flex; flex-wrap: wrap;} -.main.without-internet > .plug.panel {flex: 1 1 60%; margin-bottom: unset; margin-right: 16px;} -.main.without-internet > .bottom {flex: 1 1 30%;} -.main.without-internet > .bottom > .official.panel {margin-right: unset;} -.main.without-internet > .bottom > .official.panel > .main-panel {flex-direction: row-reverse;} - -/* css in side */ -#mainContent > .side.panel {height: 100%;} -.time-block {background: #EDEEF2; padding:2px 4px; border-radius: 4px; color: #0B0F18; font-size: 15px; margin: 0 4px;} -.dynamic-block {height: 74px; padding: 12px 16px; display: flex; justify-content: space-between; position: relative; line-height: 20px; border-top: 1px solid #E3E4E9;} -.dynamic-content {height: 50px; line-height: 25px; overflow: hidden;} -.dynamic-time {white-space: nowrap; position: absolute; right: 12px; bottom: 12px; padding-left: 10px; padding-right: 12px; background: white; color: #5E626D;} -.time-count {letter-spacing: 1px;} - -.patch-block {padding: 10px 16px 12px; line-height: 20px; border-top: 1px solid #E3E4E9;} -.patch-content {height: 40px; overflow: hidden;} - -.upgrade-block {padding: 6px 16px; line-height: 20px; border-top: 1px solid #E3E4E9;} -.upgrade-content {height: 20px; padding-left: 20px; position: relative; margin: 5px 0;} -.upgrade-content:before {content: ' '; width: 8px; height: 8px; background: #E3E4E9; border-radius: 50%; position: absolute; left: 0px; top: 5px;} diff --git a/module/admin/css/setmodule.css b/module/admin/css/setmodule.css deleted file mode 100755 index 023128a06d..0000000000 --- a/module/admin/css/setmodule.css +++ /dev/null @@ -1,3 +0,0 @@ -.group-item {display: block; width: 140px; float: left; font-size: 14px;} -.group-item .checkbox-inline label {padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;} -.table-condensed td, .table-condensed th {padding: 10px;} diff --git a/module/admin/js/checkweak.js b/module/admin/js/checkweak.js deleted file mode 100755 index 294858376c..0000000000 --- a/module/admin/js/checkweak.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $("#mainHeader #navbar li[data-id='system']").addClass('active'); -}) diff --git a/module/admin/js/index.js b/module/admin/js/index.js deleted file mode 100644 index fa27bd7e50..0000000000 --- a/module/admin/js/index.js +++ /dev/null @@ -1,15 +0,0 @@ -$(function() -{ - $(document).on('click', '.setting-box > button', function() - { - location.href = $(this).attr('data-link'); - }).on('click', '.setting-box a', function(e) - { - e.stopPropagation(); - }).on('click', '.plugin-item', function() - { - window.open($(this).data('link')); - }); - - if(!hasInternet && !isIntranet) $.get(createLink('admin', 'ajaxSetZentaoData')); -}); diff --git a/module/admin/js/log.js b/module/admin/js/log.js deleted file mode 100755 index 16d78c9ee7..0000000000 --- a/module/admin/js/log.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $('#modulemenu .nav li[data-id=api]').addClass('active'); -}); diff --git a/module/admin/js/safe.js b/module/admin/js/safe.js deleted file mode 100755 index 8021d722bd..0000000000 --- a/module/admin/js/safe.js +++ /dev/null @@ -1,16 +0,0 @@ -$(function() -{ - $("#mainHeader #navbar li[data-id='system']").addClass('active'); -}) - -/** - * When changeWeask change. - * - * @param bool changeWeak - * @access public - * @return void - */ -function changeWeakChange(changeWeak) -{ - $('#mainContent .table td.notice:first').html(changeWeak == 1 ? adminLang.safe.noticeWeakMode : adminLang.safe.noticeMode); -} diff --git a/module/admin/js/setmodule.js b/module/admin/js/setmodule.js deleted file mode 100755 index ad652ec11e..0000000000 --- a/module/admin/js/setmodule.js +++ /dev/null @@ -1,23 +0,0 @@ -$(function() -{ - $("input[name^='module']").change(function() - { - const name = $(this).attr('name'); - if($(this).prop('checked')) - { - $("input[name='" + name + "'][type=hidden]").val('1').attr('disabled', 'disabled'); - } - else - { - $("input[name='" + name + "'][type=hidden]").val('0').attr('disabled', false); - } - }); - $('input[name=allChecker]').change(function() - { - $(this).closest('tr').find("input[name^='module']").prop('checked', $(this).prop('checked')).change(); - }); - $('#allChecker').change(function() - { - $('input[name=allChecker]').prop('checked', $(this).prop('checked')).change(); - }); -}) diff --git a/module/api/css/create.css b/module/api/css/create.css deleted file mode 100644 index bc3e56d84c..0000000000 --- a/module/api/css/create.css +++ /dev/null @@ -1,20 +0,0 @@ -#paramDiv .input-group { - padding: 3px; -} -#paramDiv .form-control { - display: table-cell; - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.table-row { - margin-bottom: 10px; -} -.col-custom { - margin-bottom: 10px; -} -.paramTool { - margin: 5px 0; -} \ No newline at end of file diff --git a/module/api/css/createlib.css b/module/api/css/createlib.css deleted file mode 100644 index 6d28a95d3c..0000000000 --- a/module/api/css/createlib.css +++ /dev/null @@ -1,6 +0,0 @@ -.modal-dialog {width: 75%;} -form {margin-bottom: 100px;} -table {width: 90% !important;} -#whiteListBox div.input-group {margin-bottom: 2px;} -#whiteListBox .input-group:last-child {margin-top: 10px;} -#aclBox > th {vertical-align: top; padding-top: 18px;} diff --git a/module/api/css/edit.css b/module/api/css/edit.css deleted file mode 100644 index bc3e56d84c..0000000000 --- a/module/api/css/edit.css +++ /dev/null @@ -1,20 +0,0 @@ -#paramDiv .input-group { - padding: 3px; -} -#paramDiv .form-control { - display: table-cell; - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.table-row { - margin-bottom: 10px; -} -.col-custom { - margin-bottom: 10px; -} -.paramTool { - margin: 5px 0; -} \ No newline at end of file diff --git a/module/api/css/editlib.css b/module/api/css/editlib.css deleted file mode 100644 index a6a00155ce..0000000000 --- a/module/api/css/editlib.css +++ /dev/null @@ -1 +0,0 @@ -#whiteListBox .input-group:last-child {margin-top: 10px;} diff --git a/module/api/css/index.css b/module/api/css/index.css deleted file mode 100644 index 9c0cc48254..0000000000 --- a/module/api/css/index.css +++ /dev/null @@ -1,32 +0,0 @@ -.cell {padding: 0;} -.no-content {width: 100px; height: 100px; margin: 0 auto;} -.notice {text-align: center; padding-left: 15px; padding-top: 20px;} -.no-content-button {text-align: center; padding-top: 20px;} -.no-content-button a:nth-child(2) {margin-left: 20px;} - -.apiList .detail .detail-title {padding-left: 5px; list-style: none;} -.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;} -.detail ul {position: relative;} -.tail-info {position: absolute; right: 0; padding-left: 10px; padding-top: 1px;} -.tail-info, .doc-title, span.item {background: #fff;} -span.item>a {padding-left: 6px;} -span.dotted-line+a {display: block;} -#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;} -.doc-title ,.item{display: inline-block !important; position: relative; padding-right: 10px; max-width:80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} -#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;} - -.sortable-sorting .module-name > a {cursor: move;} -.sortable-sorting li >.tree-group {opacity: .5;} -.sortable-sorting li:before {opacity: .3;} -.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;} -.sortable-sorting .drop-here .tree-group > * {opacity: .1;} -.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;} -.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;} -.is-sorting > li:before {opacity: 1;} -.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;} -.is-sorting > li ul {display: none!important;} -li.drag-shadow ul {display: none!important;} -.apiList {height: 100%;} - -#queryBox #groupAndOr {min-width: 60px;} -.tree li>.list-toggle {left: -4px;} diff --git a/module/api/css/releases.css b/module/api/css/releases.css deleted file mode 100644 index c9bcc1d090..0000000000 --- a/module/api/css/releases.css +++ /dev/null @@ -1,6 +0,0 @@ -.c-date {width: 150px;} -.c-actions {width: 60px;} - -tbody tr td {white-space: nowrap; overflow: hidden; text-overflow: clip;} -#mainContent {max-height: 400px;} -#releaseListForm {margin-bottom: 20px;} diff --git a/module/api/css/struct.css b/module/api/css/struct.css deleted file mode 100644 index 3537885d92..0000000000 --- a/module/api/css/struct.css +++ /dev/null @@ -1,5 +0,0 @@ -.col-attr {vertical-align: middle; margin-bottom: 8px;} -.tree {padding-left: 30px!important;} -.leftBar > .btn {margin-right: 0px;} -.leftBar > .divider {color: #D9D9D9;} -.leftBar > .page-title > .text {font-weight: 400;} diff --git a/module/api/css/view.css b/module/api/css/view.css deleted file mode 100644 index c4faa5b1e8..0000000000 --- a/module/api/css/view.css +++ /dev/null @@ -1,13 +0,0 @@ -.flex-content #content {flex: auto; overflow-y: auto; height: calc(100vh - 125px);} -.flex-content #history {flex: 0 0 302px; position: relative; overflow: auto;} -.flex-content #history > #closeBtn {position: absolute; right: 10px; top: 10px;} - -#content .detail-content.article-content::-webkit-scrollbar, -#outlineMenu::-webkit-scrollbar, -#history::-webkit-scrollbar {height: 0px; width: 0px; background: transparent;} -#content .detail-content.article-content::-moz-scrollbar, -#outlineMenu::-moz-scrollbar, -#hostory::-moz-scrollbar {height: 0px; width: 0px; background: transparent;} -.main-col iframe {min-height: unset;} -.bottom-btn-tree {display: none;} -.main-col .doc-title .actions a > span {color: #9EA3B0;} diff --git a/module/api/js/createlib.js b/module/api/js/createlib.js deleted file mode 100644 index bdc608f4cb..0000000000 --- a/module/api/js/createlib.js +++ /dev/null @@ -1,15 +0,0 @@ -$(function() -{ - $('#apiForm').ajaxForm({ - success: (data) => { - if (data.result == 'success') { - if (data.locate) { - window.parent.location.href = data.locate - } - $.zui.closeModal() - } - } - }) - - toggleLibType(libType); -}); diff --git a/module/api/js/createstruct.js b/module/api/js/createstruct.js deleted file mode 100644 index 20d57ab789..0000000000 --- a/module/api/js/createstruct.js +++ /dev/null @@ -1,13 +0,0 @@ -new Vue({ - el: '#app', - data: function () { - return { - attr: '' - } - }, - methods: { - changeAttr(val) { - this.attr = JSON.stringify(val) - } - } -}) \ No newline at end of file diff --git a/module/api/js/edit.js b/module/api/js/edit.js deleted file mode 100644 index 50ca3eb7f8..0000000000 --- a/module/api/js/edit.js +++ /dev/null @@ -1,105 +0,0 @@ -$(function() -{ - $('#top-submit').click(function() - { - $(this).addClass('disabled'); - $('form').submit(); - }) -}) -var app = new Vue({ - el: '#apiApp', - data: { - header: [], - queryP: [], - body: "", - response: "", - params: "", - defaultHeader: {field: '', required: '', desc: ''}, - attr: [], - attrType: 'formData', - api - }, - created() { - this.header.push({...this.defaultHeader}) - this.queryP.push({...this.defaultHeader}) - if(api) { - if(api.params.header && api.params.header.length > 0) this.header = api.params.header - if(api.params.query && api.params.query.length > 0) this.queryP = api.params.query - if(api.params.params && api.params.params.length > 0) this.attr = api.params.params - if(api.params.paramsType) this.attrType = api.params.paramsType - this.setParams(); - } - }, - watch: { - header: { - handler() { - this.setParams(); - }, - deep: true - }, - queryP: { - handler() { - this.setParams() - }, - deep: true - }, - body: { - handler() { - this.setParams() - }, - deep: true - }, - attrType: { - handler() { - this.setParams() - }, - deep: true - } - }, - methods: { - changeAttr(val) { - this.body = val - }, - changeType(val) { - this.attrType = val - }, - changeRes(val) { - val = this.filterParams(val) - this.response = JSON.stringify(val) - }, - setParams() { - const header = this.filterParams(this.header) - const body = this.filterParams(this.body) - const queryP = this.filterParams(this.queryP) - const params = { - header: header, - params: body, - paramsType: this.attrType, - query: queryP, - } - this.params = JSON.stringify(params); - }, - filterParams(data) { - const res = [] - if(data && data.length > 0) { - data.forEach(item => { - if(item.field && item.field.length > 0) { - res.push(item) - } - }) - } - return res - }, - del(data, key) { - if(data.length <= 1) { - return - } - data.splice(key, 1) - }, - add(data, key, t) { - if(t == "header" || t == 'query') { - data.splice(key + 1, 0, {...this.defaultHeader}) - } - } - } -}) diff --git a/module/api/js/editstruct.js b/module/api/js/editstruct.js deleted file mode 100644 index c4a9ace338..0000000000 --- a/module/api/js/editstruct.js +++ /dev/null @@ -1,18 +0,0 @@ -new Vue({ - el: '#app', - data: function () { - return { - attr: '', - struct: { - ...struct, - attribute: struct.attribute, - structType: struct.type - } - } - }, - methods: { - changeAttr(val) { - this.attr = JSON.stringify(val) - }, - } -}) diff --git a/module/api/js/struct.js b/module/api/js/struct.js deleted file mode 100644 index c7d1236757..0000000000 --- a/module/api/js/struct.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $('.main-table .table').css('cursor', 'default'); -}) diff --git a/module/api/js/view.js b/module/api/js/view.js deleted file mode 100644 index b446307d5d..0000000000 --- a/module/api/js/view.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Display the document in full screen. - * - * @access public - * @return void - */ -function fullScreen() -{ - var element = document.getElementById('content'); - var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; - if(requestMethod) - { - var afterEnterFullscreen = function() - { - $('#mainActions').removeClass('hidden'); - $('#content').addClass('scrollbar-hover'); - $('#content .actions').addClass('hidden'); - $('#content .file-image .right-icon').addClass('hidden'); - $('#content .detail').eq(1).addClass('hidden'); - $.cookie('isFullScreen', 1); - }; - - var whenFailEnterFullscreen = function(error) - { - $.cookie('isFullScreen', 0); - }; - - try - { - var result = requestMethod.call(element); - if(result && (typeof result.then === 'function' || result instanceof window.Promise)) - { - result.then(afterEnterFullscreen).catch(whenFailEnterFullscreen); - } - else - { - afterEnterFullscreen(); - } - } - catch (error) - { - whenFailEnterFullscreen(error); - } - } - - $('.main-col iframe').css('min-height', $(window).height() + 'px'); -} - -/** - * Exit full screen. - * - * @access public - * @return void - */ -function exitFullScreen() -{ - $('#mainActions').addClass('hidden'); - $('#content').removeClass('scrollbar-hover'); - $('#content .actions').removeClass('hidden'); - $('#content .file-image .right-icon').removeClass('hidden'); - $('#content .detail').eq(1).removeClass('hidden'); - $('.main-col iframe').css('min-height', '380px'); - $.cookie('isFullScreen', 0); -} - -document.addEventListener('fullscreenchange', function (e) -{ - if(!document.fullscreenElement) exitFullScreen(); -}); - -document.addEventListener('webkitfullscreenchange', function (e) -{ - if(!document.webkitFullscreenElement) exitFullScreen(); -}); - -document.addEventListener('mozfullscreenchange', function (e) -{ - if(!document.mozFullScreenElement) exitFullScreen(); -}); - -document.addEventListener('msfullscreenChange', function (e) -{ - if(!document.msfullscreenElement) exitFullScreen(); -}); - -$(function() -{ - $(document).keydown(function(event) - { - if($.cookie('isFullScreen') == 1) - { - if(event.keyCode == 37) $('#prevPage').click(); - if(event.keyCode == 39) $('#nextPage').click(); - } - }); - - if($.cookie('isFullScreen') == 1) fullScreen(); - - $('.menu-actions > a').click(function() - { - $(this).parent().hasClass('open') ? $(this).css('background', 'none') : $(this).css('background', '#f1f1f1'); - }) - - $('.menu-actions > a').blur(function() {$(this).css('background', 'none');}) - - /* Update doc content silently on switch doc version, story #40503 */ - $('body').on('click', '.api-version-menu a, #mainActions .container a', function(event) - { - var $tmpDiv = $('
'); - $tmpDiv.load($(this).data('url') + ' #mainContent', function() - { - $('#content').html($tmpDiv.find('#content').html()); - $('#sidebarContent').html($tmpDiv.find('#sidebarContent').html()); - $('#actionbox .histories-list').html($tmpDiv.find('#actionbox .histories-list').html()); - if($.cookie('isFullScreen') == 1) fullScreen(); - $('#content [data-ride="tree"]').tree(); - $('#outline li.has-list').addClass('open in'); - $('#outline li.has-list>i+ul').prev('i').remove(); - }); - }).on('click', '.comment-edit-form .btn-hide-form', function() - { - $('.comment-edit-form #submit').attr('disabled', false); - }).on('click', '#docVersionMenu.diff > .drop-body > li', function(e) - { - e.stopPropagation(); - }).on('click', '#docVersionMenu #changeBtn', function(e) - { - $('#docVersionMenu').addClass('diff'); - e.stopPropagation(); - }).on('click', '#hisTrigger', function() - { - var $history = $('#history'); - var $icon = $(this); - if($history.hasClass('hidden')) - { - $history.removeClass('hidden'); - $icon.addClass('text-primary'); - } - else - { - $history.addClass('hidden'); - $icon.removeClass('text-primary'); - } - }).on('click', '#closeBtn', function() - { - $('#history').addClass('hidden'); - $('#hisTrigger').removeClass('text-primary'); - }); - - $('#history').append(''); - - $('#history').find('.btn.pull-right').removeClass('pull-right'); - - $('.comment-edit-form').ajaxForm({ - success: function(data) { - location.reload(); - } - }) -}); diff --git a/module/backup/css/index.css b/module/backup/css/index.css deleted file mode 100644 index 1374aad8d6..0000000000 --- a/module/backup/css/index.css +++ /dev/null @@ -1 +0,0 @@ -.errorFiles {text-align: left; padding: 5px;} diff --git a/module/backup/css/setting.css b/module/backup/css/setting.css deleted file mode 100644 index 5c9d008801..0000000000 --- a/module/backup/css/setting.css +++ /dev/null @@ -1 +0,0 @@ -.checkbox-primary label {height: auto;} diff --git a/module/backup/js/index.js b/module/backup/js/index.js deleted file mode 100644 index f60d964d97..0000000000 --- a/module/backup/js/index.js +++ /dev/null @@ -1,91 +0,0 @@ -$(function () -{ - $('.backup').click(function() - { - if (backupError) - { - alert(backupError); - return; - } - var that = this; - $(that).toggleClass('loading'); - $(that).text(getSpaceLoading); - link = createLink('backup', 'ajaxGetDiskSpace'); - $.get(link, function (data) - { - $(that).toggleClass('loading'); - $(that).text(startBackup); - if (data) - { - if (data.needSpace > data.freeSpace) - { - alertTips = alertTips.replace('NEED_SPACE', (data.needSpace / (1024 * 1024 * 1024)).toFixed(2)); - $('#spaceConfirm').find('p').text(alertTips); - $('#spaceConfirm').modal('show', 'center'); - } - else - { - backupData(); - } - } - }, 'json'); - }); - - $('.rmPHPHeader').click(function () { - $('#waiting .modal-body #backupType').html(rmPHPHeader); - $('#waiting .modal-content #message').hide(); - $('#waiting').modal('show'); - }); - - $('.restore').click(function () - { - url = $(this).attr('href'); - bootbox.confirm(confirmRestore, function (result) - { - if (result) - { - $('#waiting .modal-body #backupType').html(restore); - $('#waiting .modal-content #message').hide(); - $('#waiting').modal('show'); - - $.getJSON(url, function (response) - { - $('#waiting').modal('hide'); - bootbox.alert(response.message); - }); - } - else - { - return location.reload(); - } - }); - - return false; - }); -}); - -function backupData() { - var timeID = null; - $.ajax({ - url: $('.backup').attr('data-link'), - success: function (data) { - clearInterval(timeID); - $('#waiting .modal-body #message').append(data); - setTimeout(function () {return location.reload();}, 2000); - }, - error: function (request, textstatus, error) { - clearInterval(timeID); - if (textstatus == 'timeout') $('#waiting .modal-body #message').append("

" + backupTimeout + '

'); - setTimeout(function () {return location.reload();}, 2000); - } - }); - - $('#waiting .modal-body #backupType').html(backup); - $('#waiting').modal('show'); - - timeID = setInterval(function () { - $.get(createLink('backup', 'ajaxGetProgress'), function (data) { - $('#waiting .modal-content #message').html(data); - }); - }, 1000); -} diff --git a/module/block/css/dashboard.css b/module/block/css/dashboard.css deleted file mode 100644 index fa091d4202..0000000000 --- a/module/block/css/dashboard.css +++ /dev/null @@ -1,33 +0,0 @@ -body {padding-bottom: 20px;} -.nav > li > .btn {padding: 0 5px; line-height: 24px; margin: 3px; color: #3C4353;} -.nav > li > .btn.btn-primary {color: #fff;} -.nav .icon-more {font-size: 14px;} -.block-statistic .nav-stacked {overflow: auto; max-height: 220px;} -#dashboard .col-side {width: 450px; max-width: 450px;} -#dashboard .panel-body {max-height: 400px; overflow: auto;} -#dashboard .panel-body.has-table {padding-top: 0;} -#dashboard .panel-move-handler {position: absolute; top: 0; left: 0; right: 50px; height: 40px; z-index: 10; cursor: move;} -#dashboard .panel-heading {cursor: move; padding-right: 75px;} -@media (min-width: 992px) -{ - #dashboard > .row {display: table; width: 100%; margin: 0;} - #dashboard > .row > .col-main, - #dashboard > .row > .col-side {display: table-cell; float: none; padding: 0; vertical-align: top;} - #dashboard > .row > .col-main {padding-right: 10px;} - #dashboard > .row > .col-side {padding-left: 10px;} -} -#dashboard.sortable-sorting .panel {margin-bottom: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.075), 0 2px 6px 0 rgba(0,0,0,.075); height: 46px;} -#dashboard.sortable-sorting .panel > * {display: none;} -#dashboard.sortable-sorting .panel:before {display: block; content: attr(data-name); padding: 12px 20px; font-weight: bold; font-size: 14px; color: #3c4353; opacity: 1 !important; text-align: left; visibility: visible;} -#dashboard.sortable-sorting .panel.dragging {visibility: visible; background: transparent; background: rgba(0,0,0,.075); box-shadow: inset 0 2px 6px rgba(0,0,0,.075);} -#dashboard.sortable-sorting .panel.dragging:before {color: #bbb;} -#dashboard.sortable-sorting .panel.drag-shadow {box-shadow: 0 1px 3px rgba(0,0,0,.175), 0 3px 8px 0 rgba(0,0,0,.175);} - -#dashboard .block-sm .hide-in-sm {display: none;} -#dashboard .block-dynamic .panel-body {overflow-x: hidden;} -.modal-body {padding: 10px 20px 20px 20px;} - -#dashboard .block-scrumoverview .table {margin-bottom: 12px;} -#dashboard .block-scrumoverview .table thead tr th {padding-left: 0; text-align: right; border-bottom: unset;} -#dashboard .block-scrumoverview .table tbody tr td {padding-left: 0;} -#dashboard .block-scrumoverview .table tbody tr th {text-align: right;} diff --git a/module/block/js/dashboard.js b/module/block/js/dashboard.js deleted file mode 100644 index 63f476ff44..0000000000 --- a/module/block/js/dashboard.js +++ /dev/null @@ -1,314 +0,0 @@ -/** - * Delete block. - * - * @param int $index - * @access public - * @return void - */ -function deleteBlock(index) -{ - if(confirm(config.confirmRemoveBlock)) - { - $.getJSON(createLink('block', 'delete', 'index=' + index + '&module=' + module), function(data) - { - if(data.result != 'success') - { - alert(data.message); - return false; - } - else - { - window.location.reload(true); - } - }); - } -} - -/** - * Sort blocks. - * - * @param array $orders format is {'blockid' : 1, 'block1' : 2} - * @param function $callback - * @access public - * @return void - */ -function sortBlocks(newOrders, callback) -{ - $.getJSON(createLink('block', 'sort', 'orders=' + newOrders.join(',') + '&module=' + module), callback); -} - -/** - * Resize block - * @param string $blockId - * @param function $callback - * @access public - * @return void - */ -function resizeBlock(blockID, width, callback) -{ - $.getJSON(createLink('block', 'resize', 'id=' + blockID + '&type=horizontal&data=' + width), function(data) - { - callback && callback(); - refreshBlock($('#block' + blockID)); - }); -} - -/** - * refreshBlock - * - * @param object $panel - * @param function afterRefresh - * @access public - * @return void - */ -function refreshBlock($panel, afterRefresh) -{ - var url = $panel.data('url'); - $panel.addClass('load-indicator loading'); - $.ajax({url: url, dataType: 'html'}).done(function(data) - { - var $data = $(data); - if($data.hasClass('panel')) $panel.empty().append($data.children()); - else if($panel.find('#assigntomeBlock').length) $panel.find('#assigntomeBlock').empty().append($data.children()); - else - { - $panel.children('.panel-move-handler,style,script').remove(); - $panel.find('.panel-body,.empty-tip').first().replaceWith($data); - $panel.find('.iframe').initIframeModal(); - } - $panel.find('.progress-pie').progressPie(); - if($.isFunction(afterRefresh)) - { - afterRefresh.call(this, - { - result: true, - data: data, - $panel: $panel - }); - } - $panel.find('.tablesorter').sortTable(); - $panel.find('.chosen').chosen(); - $panel.children('.table-header-fixed').remove(); - initTableHeader($panel); - $(".sparkline").sparkline(); - }).fail(function() - { - $panel.addClass('panel-error'); - if($.isFunction(afterRefresh)) - { - afterRefresh.call(this, - { - result: false, - $panel: $panel - }); - } - }).always(function() - { - $panel.removeClass('load-indicator loading'); - }); -} - -/** - * Init table header - * @access public - * @return void - */ -function initTableHeader($wrapper) -{ - ($wrapper || $('#dashboard')).find('.panel-body > table.table-fixed-head').each(function() - { - var $table = $(this); - var $tabPane = $table.closest('.tab-pane'); - if ($tabPane.length && !$tabPane.hasClass('active')) - { - $('[data-tab][href="#' + $tabPane.attr('id') + '"]').one('shown.zui.tab', function() - { - initTableHeader($tabPane); - }); - return; - } - - var $panel = $tabPane.length ? $tabPane : $table.closest('.panel'); - - if(!$table.length || !$table.children('thead').length || ($panel.find('#assigntomeBlock').length && $panel.find('#assigntomeBlock > div').length > 1)) return; - var isFixed = $panel.find('.panel-body').height() < $table.outerHeight(); - - $panel.toggleClass('with-fixed-header', isFixed); - var $header = $panel.children('.table-header-fixed').toggle(isFixed); - if(!isFixed) - { - $table.find('thead').css('visibility', 'visible'); - return; - } - var tableWidth = $table.width(); - var $oldTableHead = $table.find('thead'); - var updateTh = function() - { - $header.find('thead').empty().append($oldTableHead.find('tr').clone()); - }; - if(!$header.length) - { - $header = $('
').css('right', $panel.width() - tableWidth - 20); - $oldTableHead.find('th').each(function(idx) - { - $(this).attr('data-idx', idx); - }); - $header.find('.table').addClass($table.attr('class')).append($oldTableHead.css('visibility', 'hidden').clone().css('visibility', 'visible')); - $panel.addClass('with-fixed-header').append($header); - var $heading = $panel.children('.panel-heading'); - if($heading.length) $header.css('top', $heading.outerHeight()); - if($table.hasClass('tablesorter')) - { - $header.on('mousedown mouseup', 'th[data-idx]', function(e) - { - var $th = $(this); - $oldTableHead.find('th[data-idx="' + $th.data('idx') + '"]').trigger(e); - if(e.type === 'mouseup') - { - setTimeout(updateTh, 10); - setTimeout(updateTh, 200); - } - }); - } - } - else - { - updateTh(); - } - - var timeoutCall = null; - $table.parent().off('scroll.initTableHeader').on('scroll.initTableHeader', function() - { - clearTimeout(timeoutCall); - var $tableContainer = $(this); - timeoutCall = setTimeout(function() { - $panel.toggleClass('table-scrolled', $tableContainer.scrollTop() > 0); - }, 200); - }); - }); -} - -/** - * Check refresh progress - * @param object $dashboard - * @access public - * @return void - */ -function checkRefreshProgress($dashboard, doneCallback) -{ - if($dashboard.find('.panel-loading').length) setTimeout(function() {checkRefreshProgress($dashboard, doneCallback);}, 500); - else doneCallback(); -} -/** - * Hidden block. - * - * @param index $index - * @access public - * @return void - */ -function hiddenBlock(index) -{ - $.getJSON(createLink('block', 'delete', 'index=' + index + '&module=' + module + '&type=hidden'), function(data) - { - if(data.result != 'success') - { - alert(data.message); - return false; - } - - $('#dashboard #block' + index).addClass('hidden'); - }) -} - -/** - * Block initialization. - * - * @access public - * @return void - */ -$(function() -{ - initTableHeader(); - $(window).on('resize', function() - { - initTableHeader(); - }); - - // Init dashboard - var sortMessager = new $.zui.Messager({close: false}); - $('#dashboard').sortable( - { - selector: '.panel', - trigger: '.panel-heading:not(.not-move-handler),.panel-move-handler', - containerSelector: '.col-main,.col-side', - canMoveHere: function($ele, $target) - { - var fixedCol = $ele.data('fixed'); - var $targetCol = $target.closest('.col-main,.col-side'); - var targetCol = $targetCol.hasClass('col-main') ? 'main' : 'side'; - if($ele.hasClass('block-guide') && targetCol != 'main') return false; - if(fixedCol) - { - if(targetCol !== fixedCol) - { - !sortMessager.isShow && sortMessager.show(fixedCol === 'main' ? config.cannotPlaceInRight : config.cannotPlaceInRight); - return false; - } - else - { - sortMessager.isShow && sortMessager.hide(); - } - return true; - } - }, - start: function() - { - $('body').css('overflow', 'hidden'); - }, - finish: function(e) - { - $('body').css('overflow', 'auto'); - var newOrders = []; - var isSideCol = e.element.parent().is('.col-side'); - e.list.each(function(index, data) - { - newOrders.push(data.item.data('id')); - }); - sortBlocks(newOrders, function() - { - resizeBlock(e.element.data('id'), isSideCol ? 4 : 8); - }); - - e.element.toggleClass('block-sm', isSideCol); - }, - always: function(){sortMessager.isShow && sortMessager.hide();} - }).on('click', '.refresh-panel', function() - { - refreshBlock($(this).closest('.panel')); - }); -}); - -/** - * Reload roadmap. - * - * @param int productID - * @param int roadMapID - * @access public - * @return void - */ -function reloadRoadmap(productID, roadMapID) -{ - $.ajax( - { - url: createLink('block', 'printScrumroadmapBlock', 'productID=' + productID + '&roadMapID=' + roadMapID), - dataType: "html", - async: false, - data: {productID: productID, roadMapID: roadMapID}, - type: 'post', - success: function(data) - { - $("#roadMap" + roadMapID).html(data); - $("#" + roadMapID).chosen(); - } - }) -} diff --git a/module/block/js/preference.js b/module/block/js/preference.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/branch/css/batchedit.css b/module/branch/css/batchedit.css deleted file mode 100644 index 825aadf755..0000000000 --- a/module/branch/css/batchedit.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-desc {width : 600px;} -.c-defult {width: 100px;} diff --git a/module/branch/css/manage.css b/module/branch/css/manage.css deleted file mode 100644 index b5f2deac74..0000000000 --- a/module/branch/css/manage.css +++ /dev/null @@ -1,14 +0,0 @@ -.c-desc {width: 500px;} -.c-order {width: 70px;} -.c-check {width: 40px} - -a.setDefault {padding-left: 8px !important} - -td.branchName > span.text-ellipsis {display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;} -td.branchName > span {vertical-align: middle;} - -#mergeBranch .form-actions {padding-top: 20px;} -.modal-body {padding-top: 0;} -.tips {background-color: #ffffff; max-width: 650px; display: flex; padding: 14px;} -.icon-exclamation-sign.icon {align-self: center; color: #2667E3; font-size: 24px; opacity: 1;} -#marginTips {max-width: 585px; margin-left: 10px;} diff --git a/module/branch/js/batchedit.js b/module/branch/js/batchedit.js deleted file mode 100644 index 09c71a7f3a..0000000000 --- a/module/branch/js/batchedit.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Can set default branch. - * - * @param obj $obj - * @access public - * @return void - */ -function canSetDefaultBranch(obj) -{ - if(obj.value == 'active') - { - if(canSetDefault) $(obj).closest('tr').find("input[name^='default']").removeAttr('disabled'); - } - else - { - $(obj).closest('tr').find("input[name^='default']").removeAttr('checked').attr('disabled', 'disabled'); - } -} diff --git a/module/branch/js/manage.js b/module/branch/js/manage.js deleted file mode 100644 index fcb2b66915..0000000000 --- a/module/branch/js/manage.js +++ /dev/null @@ -1,180 +0,0 @@ -function addItem(obj) -{ - var $inputgroup = $(obj).closest('.input-group').clone(); - $inputgroup.find('input').val(''); - $(obj).closest('.input-group').after($inputgroup); -} - -function deleteItem(obj) -{ - if($(obj).closest('#newbranches').find("input[id^='newbranch']").size() <= 1) return; - $(obj).closest('.input-group').remove(); -} - -$(function() -{ - $('#branchTableList').addClass('sortable').sortable( - { - reverse: orderBy === 'order_desc', - selector: 'tr', - dragCssClass: 'drag-row', - trigger: $('#branchTableList').find('.sort-handler').length ? '.sort-handler' : null, - - canMoveHere: function($ele, $target) - { - return $target.data('id') != 0; - }, - - finish: function(e) - { - var branches = ''; - e.list.each(function() - { - branches += $(this.item).data('id') + ','; - }); - - $.post(createLink('branch', 'sort'), {'branches': branches, 'orderBy': orderBy}); - } - }); - - //$('td.c-name.flex').mouseenter(function() - //{ - // $(this).find('.setDefault').removeClass('hidden'); - // if($(this).find('span.label-primary').length > 0) - // { - // $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 50px)'); - // } - // else - // { - // $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 120px)'); - // } - //}).mouseleave(function() - //{ - // $(this).find('.setDefault').addClass('hidden'); - // if($(this).find('span.label-primary').length > 0) - // { - // $(this).find('span.text-ellipsis').css('max-width', 'calc(100% - 50px)'); - // } - // else - // { - // $(this).find('span.text-ellipsis').css('max-width', '100%'); - // } - //}); - - $("input[id*='branchIDList']").change(function() - { - $("input[id*='branchIDList']").each(function() - { - if($(this).prop('checked') && ($(this).closest('tr').data('status') === 'closed' || $(this).closest('tr').data('id') == '0')) - { - $("a[href='#mergeBranch']").hide(); - return false; - } - - $("a[href='#mergeBranch']").show(); - }) - }); - - $('#createBranch').change(function() - { - if($(this).prop('checked')) - { - $('#targetBranch').attr('disabled', true).trigger('chosen:updated'); - - var newBranchName = '' + branchLang.name + ""; - var newBranchDesc = '' + branchLang.desc + ""; - $(this).closest('tr').after(newBranchName + newBranchDesc); - } - else - { - $('#targetBranch').attr('disabled', false).trigger('chosen:updated'); - - $('#name').closest('tr').remove(); - $('#desc').closest('tr').remove(); - } - }); - - $("#merge").click(function() - { - var mergedBranchIDList = []; - var mergedBranchName = ''; - - $("input:checkbox[name^='branchIDList']:checked").each(function() - { - mergedBranchIDList.push($(this).val()); - mergedBranchName += ',' + $(this).closest('tr').find('.branchName').attr('title'); - }); - mergedBranchName = mergedBranchName.substr(1); - mergedBranchIDList = mergedBranchIDList.join(','); - - $.get(createLink('branch', 'ajaxGetTargetBranches', "productID=" + productID + "&mergedBranches=" + mergedBranchIDList), function(data) - { - $('#targetBranch').replaceWith(data); - $('#targetBranch_chosen').remove(); - $('#targetBranch').chosen(); - - if($('#createBranch').prop('checked')) $('#targetBranch').attr('disabled', true).trigger('chosen:updated') - }) - }) - - $('#saveButton').on('click', function() - { - var mergedBranchIDList = []; - var mergedBranchName = ''; - var targetBranchName = $('#targetBranch_chosen').find('span').text(); - - $("input:checkbox[name^='branchIDList']:checked").each(function() - { - mergedBranchIDList.push($(this).val()); - mergedBranchName += ',' + $(this).closest('tr').find('.branchName').attr('title'); - }); - - mergedBranchName = mergedBranchName.substr(1); - targetBranchName = $('#createBranch').prop('checked') ? $('#name').val() : targetBranchName; - - var confirmMergeMessage = branchLang.confirmMerge.replace(/(.*)mergedBranch(.*)targetBranch(.*)/, "$1" + mergedBranchName + "$2" + targetBranchName + "$3"); - - var isChecked = $('#createBranch').attr('checked') ? 1 : 0; - if(isChecked && $('#name').val() == '') - { - alert(branchLang.nameNotEmpty); - return false; - } - - var branchNames = Object.values(branchPairs); - if(isChecked && branchNames.indexOf($('#name').val()) !== -1) - { - alert(branchLang.existName); - return false; - } - - if(confirm(confirmMergeMessage)) - { - var postData = {'name' : $('#name').val(), 'desc' : $('#desc').val(), 'createBranch' : isChecked, 'mergedBranchIDList' : mergedBranchIDList, 'targetBranch' : $('#targetBranch').val()}; - $.ajax( - { - url: createLink('branch', 'mergeBranch', 'productID=' + productID), - dataType: 'json', - method: 'post', - data: postData, - success: function(data) - { - if(data.result == 'fail') - { - alert(data.message.name) - return false; - } - else - { - $('#mergeBranch').modal('hide'); - window.location.reload(); - } - } - }) - } - else - { - window.location.reload(); - } - }); -}) diff --git a/module/bug/css/batchactivate.css b/module/bug/css/batchactivate.css deleted file mode 100644 index 808c59e64b..0000000000 --- a/module/bug/css/batchactivate.css +++ /dev/null @@ -1,4 +0,0 @@ -.c-id {width: 40px !important;} -.c-title {width: 160px;} -.c-assigned {width: 160px;} -.c-build {width: 160px;} diff --git a/module/bug/css/batchcreate.css b/module/bug/css/batchcreate.css deleted file mode 100644 index eaa1b26799..0000000000 --- a/module/bug/css/batchcreate.css +++ /dev/null @@ -1,11 +0,0 @@ -#importLinesModal .modal-dialog {width: 80%;} - -.c-id {width: 50px !important;} -.c-branch, .c-module, .c-os {width: 120px;} -.c-execution {width: 130px;} -.c-build, .c-browser, .c-keywords {width: 100px;} -.c-steps {width: 150px;} -.c-pri, .c-severity {width: 80px;} -.c-actions {width: 60px;} -[lang^=de] .c-build, [lang^=fr] .c-build {width: 115px} -@media screen and (max-width: 1366px) {[lang^=de] .c-build, [lang^=fr] .c-build {width: 110px}} diff --git a/module/bug/css/batchedit.css b/module/bug/css/batchedit.css deleted file mode 100644 index 3b9c06964d..0000000000 --- a/module/bug/css/batchedit.css +++ /dev/null @@ -1,9 +0,0 @@ -.duplicate-input {border-left-width: 0; border-radius: 0 2px 2px 0; padding-left: 9px;} -.duplicate-input:focus {border-left-width: 1px; padding-left: 8px;} - -.c-id {width: 50px !important;} -.c-branch, .c-module, .c-os {width: 120px;} -.c-execution {width: 130px;} -.c-build, .c-browser, .c-keywords {width: 100px;} -.c-steps, .c-title, .c-plan, .c-assigned, .c-resolution {width: 150px;} -.c-pri, .c-severity {width: 80px;} diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css deleted file mode 100644 index 557dba00db..0000000000 --- a/module/bug/css/browse.css +++ /dev/null @@ -1,36 +0,0 @@ -.table-footer {z-index: 1;} -.closed, .closed a {color: gray; text-decoration:line-through;} -.resolved, .resolved a {color: #8EC21F; text-decoration: none;} -.tree .closed, .tree .closed a {color: #003366; text-decoration: none;} -#bugForm .setting {height: 25px;} - -.datatable-wrapper .table-datatable .datatable-row td {height: 37px;} - -#createActionMenu .dropdown-menu {width: 100%;} - -.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;} -.dropdown-menu > .menu-search .input-group {width: 100%;} -.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666;} -.dropdown-menu > .menu-search .form-control {border: none !important; box-shadow: none !important; border-top: 1px solid #ddd !important;} -.dropdown-menu > li > a {text-align: left;} -.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto;} -.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;} -.dropdown-list > li > a:hover, -.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} - -th.c-confirmed {text-align: center;} -.c-severity {overflow: hidden; white-space: nowrap;} -.c-keywords {overflow: hidden; white-space: nowrap;} -.c-id {text-overflow: ellipsis; white-space: nowrap;} -.c-toTask {overflow: hidden; white-space: nowrap;} - -.body-modal #mainMenu>.btn-toolbar {width: auto;} - -body {margin-bottom: 25px;} -#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;} -#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;} -.btn-group a i.icon-plus {font-size: 16px;} -.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);} -.btn-group button.dropdown-toggle.btn-primary {padding:6px;} -#bugForm tbody tr td .label {max-width: 100px; text-overflow: unset;} -[lang^='de'] th.c-confirmed {width: 100px !important;} diff --git a/module/bug/css/create.css b/module/bug/css/create.css deleted file mode 100644 index 5eb52b5f0a..0000000000 --- a/module/bug/css/create.css +++ /dev/null @@ -1,63 +0,0 @@ -html[lang='en'] #moduleIdBox .input-group-addon {padding: 5px 23px;} -html[lang='en'] #deadlineTd .input-group-addon {padding: 5px 18px;} -html[lang='zh-cn'] #keywordsAddonLabel, .task {width: 77px;} -html[lang='zh-tw'] #keywordsAddonLabel, .task {width: 77px;} -html[lang='fr'] #keywordsAddonLabel, .task {width: 61px;} -html[lang='de'] #keywordsAddonLabel, .task {width: 73px;} - -.ke-toolbar .ke-outline[data-name='savetemplate'] {display: block;} -.ke-outline .ke-icon-savetemplate {background-image: url(theme/default/images/kindeditor/save.gif); background-position: center; width: 56px; height: 20px;} - -/* template box */ - -.bootbox-prompt .modal-dialog {width: 500px; margin-top: 10%;} - -#buildBoxActions {padding-left: 15px;} - -#module + .chosen-container-single .chosen-single, -#task + .chosen-container-single .chosen-single, -#openedBuild + .chosen-container-multi .chosen-choices {border-top-left-radius: 0; border-bottom-left-radius: 0;} -#openedBuild + .chosen-container-multi .chosen-choices, -#mailto + .chosen-container-multi .chosen-choices {border-top-right-radius: 0; border-bottom-right-radius: 0;} - -.dropdown-pris > .btn {background-color: #fff; text-shadow: none;} - -#contactListGroup .chosen-container-single a {border-left-width: 0px;} - -.minw-80px {min-width: 80px;} - -.colorpicker.input-group-btn > .btn {border-right: none;} - -.input-group-addon.w-90px {min-width: 90px;} -.input-group .input-group-btn .btn {padding: 6px 12px;} -.input-group .chosen-container {min-width: 80px;} -#all {border-left: none;} - -.pri-selector > .btn {padding: 5px 8px !important; width: 100%;} -.pri-selector > .dropdown-menu {padding: 10px;} - -.title-group.required:after {display: none;} -.title-group.required > .required:after {display: block; right: 29px; top: 5px;} -.title-group .chosen-container {width: 1% !important; min-width: 70px;} -.title-group #severity + .chosen-container > .chosen-single {border-radius: 0 !important;} -.title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important;} -#mainContent .center-block {padding-bottom: 40px;} - -#typeBox {width: 180px;} -#typeBox .required:after {right: 1px;} -#osBox .required:after {right: 1px;} -#osBox {width: 190px;} -#projectBox .required:after {right: 1px;} -#branch_chosen {min-width: 90px;} -#branch_chosen.chosen-container-active .chosen-single{border-left-color: #2e7fff !important;} -#notifyEmailTd .input-group-addon, #deadlineTd .input-group-addon {border-radius: 2px 0px 2px 0px !important;} - -#feedback.input-group + #notifyEmailLabel {position: relative; width: 50%; left: 48%;} -#executionLabel {display: inline; position: relative; width: 50%; left: 37%;} -#projectLabel {display: inline;} -#openedBuildLabel {display: inline; position: relative; width: 50%; left: 14%;} -#bugTypeInputGroup > .table-col {width: 40% !important;} - -.pri-text > .label-pri {padding: 2px 6px;} -.table .bug-type td, .table .bug-type th {vertical-align: top !important;} -.table .bug-type th {padding-top: 14px;} diff --git a/module/bug/css/edit.css b/module/bug/css/edit.css deleted file mode 100644 index ebd0b1eec4..0000000000 --- a/module/bug/css/edit.css +++ /dev/null @@ -1,9 +0,0 @@ -.col-side .chosen-container .chosen-drop {width: 216px !important;} -.col-side .chosen-container {width: 218px !important;} -.col-side .chosen-container[id^="openedBuild"] {width: 172px !important;} -.col-side .chosen-container[id^="resolvedBuild"] {width: 172px !important;} -.chosen-choices li.search-choice {word-break: break-all;} -#linkBugBox > li {margin-left: -56px;} -#branch {width: 95px;} -#storyIdBox .chosen-auto-max-width {width: 215px !important;} -.form-group {margin-left: 10px; margin-right: 10px;} diff --git a/module/bug/css/linkbugs.css b/module/bug/css/linkbugs.css deleted file mode 100644 index 8daa5a760b..0000000000 --- a/module/bug/css/linkbugs.css +++ /dev/null @@ -1,2 +0,0 @@ -.main-table {height: 80% !important} -#mainContent {min-height: 400px;} diff --git a/module/bug/css/report.css b/module/bug/css/report.css deleted file mode 100644 index d19342cc19..0000000000 --- a/module/bug/css/report.css +++ /dev/null @@ -1,10 +0,0 @@ -.table-bordered caption {border: 1px solid #ddd;} -.table-bordered tr > th:first-child, .table-bordered tr > td:first-child {border-left: 1px solid #ddd !important;} -.table-bordered tr > th:last-child, .table-bordered tr > td:last-child {border-right: 1px solid #ddd !important;} - -.col-side {width: 250px;} - -.panel-heading > strong > span {float: right; color: #29a8cd;} - -.checkboxes {margin-bottom: 10px;} -.checkboxes .checkbox-primary {margin-bottom: 5px;} diff --git a/module/bug/css/resolve.css b/module/bug/css/resolve.css deleted file mode 100644 index f8f2cf68b7..0000000000 --- a/module/bug/css/resolve.css +++ /dev/null @@ -1 +0,0 @@ -.chosen-container[id^="buildExecution"] {max-width: 160px; border-radius: 0;} diff --git a/module/bug/css/view.css b/module/bug/css/view.css deleted file mode 100644 index c85c0cb3c5..0000000000 --- a/module/bug/css/view.css +++ /dev/null @@ -1,13 +0,0 @@ -.content .stepTitle {display: block; color: green; margin: 0px;} -.table-fixed td {white-space: unset;} -.table-data tr > td {word-break: break-all; word-wrap: break-word;} -.side-col .cell {padding: 0px;} -.tab-pane table {border: 1px solid #ddd; border-top: none;} -.btn-edit-comment {z-index: 100;} -.select-project-modal .modal-body {right: 15px;} -.osContent, .browserContent {margin: 0 0 5px;} -.browserContent {margin-left: -4px;} -.resolution {white-space: nowrap; overflow: hidden;} -.link-commit {overflow: hidden; white-space: nowrap; margin-right: 5px;} -.main-actions .btn-toolbar{display: inline-flex; flex-wrap: wrap;} -#legendBasicInfo td .label-severity {margin-left: -5px;} diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js deleted file mode 100644 index 4247c145a4..0000000000 --- a/module/bug/js/batchcreate.js +++ /dev/null @@ -1,165 +0,0 @@ -$(function() -{ - removeDitto();//Remove 'ditto' in first row. - - var $titleCol = $('#batchCreateForm table thead tr th.c-title'); - if($titleCol.width() < 150) $titleCol.width(150); - - $('#customField').click(function() - { - hiddenRequireFields(); - }); - - /* Implement a custom form without feeling refresh. */ - $('#formSettingForm .btn-primary').click(function() - { - saveCustomFields('batchCreateFields', 10, $titleCol, 150); - return false; - }); - - $('#dropMenu').css('z-index', 9999); -}) - -/** - * Set opened builds. - * - * @param string $link - * @param int $index - * @access public - * @return void - */ -function setOpenedBuilds(link, index) -{ - $.get(link, function(builds) - { - var row = $('#buildBox' + index).closest('tbody').find('tr').size() - do - { - var selected = $('#buildBox' + index).find('select').val(); - $('#buildBox' + index).html(builds); - $('#buildBox' + index).find('select').val(selected); - $('#pickerDropMenu-pk_openedBuild' + index).remove(); - $('#openedBuilds' + index).next('.picker').remove(); - $('#buildBox' + index + ' select').removeClass('select-3'); - $('#buildBox' + index + ' select').addClass('select-1'); - $('#buildBox' + index + ' select').attr('name','openedBuilds[' + index + '][]'); - $('#buildBox' + index + ' select').attr('id','openedBuilds' + index); - $('#buildBox' + index + ' select').picker({optionRender: markReleasedBuilds, dropWidth: 'auto'}); - - index++; - if($('#executions' + index).val() != 'ditto') break; - }while(index < row) - }); -} - -/** - * Set lane. - * - * @param int $regionID - * @param int $num - * @access public - * @return void - */ -function setLane(regionID, num) -{ - laneLink = createLink('kanban', 'ajaxGetLanes', 'regionID=' + regionID + '&type=bug&field=lanes&i=' + num); - $.get(laneLink, function(lanes) - { - if(!lanes) lanes = ''; - $('#lanes' + num).replaceWith(lanes); - $("#lanes" + num + "_chosen").remove(); - $("#lanes" + num).next('.picker').remove(); - $("#lanes" + num).chosen(); - }); -} - -/** - * Load execution builds. - * - * @param int $productID - * @param int $executionID - * @param int $index - * @access public - * @return void - */ -function loadExecutionBuilds(productID, executionID, index) -{ - var branch = $('#branches' + index).val() ? $('#branches' + index).val() : 0; - if(executionID == 'ditto') - { - for(var i = index - 1; i > 0, executionID == 'ditto'; i--) - { - executionID = $('#executions' + i).val(); - } - } - - if(executionID != 0) - { - link = createLink('build', 'ajaxGetExecutionBuilds', 'executionID=' + executionID + '&productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index); - } - else - { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch); - } - - setOpenedBuilds(link, index); -} - -$(document).on('click', '.chosen-with-drop', function() -{ - var select = $(this).prev('select'); - if($(select).val() == 'ditto') - { - var index = $(select).closest('td').index(); - var row = $(select).closest('tr').index(); - var table = $(select).closest('tr').parent(); - var value = ''; - for(i = row - 1; i >= 0; i--) - { - value = $(table).find('tr').eq(i).find('td').eq(index).find('select').val(); - if(value != 'ditto') break; - } - $(select).val(value); - $(select).trigger("chosen:updated"); - } -}) -$(document).on('mousedown', 'select', function() -{ - if($(this).val() == 'ditto') - { - var index = $(this).closest('td').index(); - var row = $(this).closest('tr').index(); - var table = $(this).closest('tr').parent(); - var value = ''; - for(i = row - 1; i >= 0; i--) - { - value = $(table).find('tr').eq(i).find('td').eq(index).find('select').val(); - if(value != 'ditto') break; - } - $(this).val(value); - } -}) - -$(document).keydown(function(event) -{ - if((event.ctrlKey || event.altKey) && event.keyCode == 38) - { - event.stopPropagation(); - event.preventDefault(); - selectFocusJump('up'); - } - else if((event.ctrlKey || event.altKey) && event.keyCode == 40) - { - event.stopPropagation(); - event.preventDefault(); - selectFocusJump('down'); - } - else if(event.keyCode == 38) - { - inputFocusJump('up'); - } - else if(event.keyCode == 40) - { - inputFocusJump('down'); - } -}); diff --git a/module/bug/js/batchedit.js b/module/bug/js/batchedit.js deleted file mode 100644 index 0a1a84995c..0000000000 --- a/module/bug/js/batchedit.js +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Set duplicate field. - * - * @param string $resolution - * @access public - * @return void - */ -function setDuplicate(resolution, bugID) -{ - if(resolution == 'duplicate') - { - $('#duplicateBugBox' + bugID).show(); - } - else - { - $('#duplicateBugBox' + bugID).hide(); - } -} - -$(document).ready(removeDitto());//Remove 'ditto' in first row. - -$(document).on('click', '.chosen-with-drop', function(){oldValue = $(this).prev('select').val();})//Save old value. - -/* Set ditto value. */ -$(document).on('change', 'select', function() -{ - if($(this).val() == 'ditto') - { - var index = $(this).closest('td').index(); - var row = $(this).closest('tr').index(); - var tbody = $(this).closest('tr').parent(); - - if($(this).attr('name').indexOf('resolutions') != -1) - { - index = $(this).closest('tr').closest('td').index(); - row = $(this).closest('tr').closest('td').parent().index(); - tbody = $(this).closest('tr').closest('td').parent().parent(); - } - - var value = ''; - for(i = row - 1; i >= 0; i--) - { - value = tbody.children('tr').eq(i).find('td').eq(index).find('select').val(); - if(value != 'ditto') break; - } - - isPlans = $(this).attr('name').indexOf('plans') != -1; - - if(isPlans) - { - var valueStr = ',' + $(this).find('option').map(function(){return $(this).val();}).get().join(',') + ','; - if(valueStr.indexOf(',' + value + ',') != -1) - { - $(this).val(value); - } - else - { - alert(dittoNotice); - $(this).val(oldValue); - } - } - else - { - $(this).val(value); - } - - $(this).trigger("chosen:updated"); - $(this).trigger("change"); - } -}) - -$(function() -{ - $('#subNavbar li[data-id="bug"]').addClass('active'); - - $('#customField').click(function() - { - hiddenRequireFields(); - }); - - var firstResolution = $('select[id^="resolutions"]').eq(0); - var maxAutoDropWidth = document.body.scrollWidth + ($(firstResolution)[0].offsetWidth / 2) - $(firstResolution)[0].getBoundingClientRect().right; - initPicker = function($element) - { - var picker = $element.data('zui.picker'); - var originOptions = picker.options; - - if(picker) picker.destroy(); - - var addOptions = - { - disableEmptySearch : true, - dropWidth : 'auto', - maxAutoDropWidth : maxAutoDropWidth, - searchDelay : 1000, - onReady: function(event) - { - $(event.picker.$container).addClass('required'); - } - } - var options = $.extend({}, originOptions, addOptions); - $element.picker(options); - }; - - $('select[id^="duplicateBugs"]').each(function(){ - initPicker($(this)); - }); -}); diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js deleted file mode 100644 index 5c32f9e35b..0000000000 --- a/module/bug/js/browse.js +++ /dev/null @@ -1,34 +0,0 @@ -$(function() -{ - setTitleWidth(); - - /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ - $(".sidebar-toggle").click(function() - { - $("#sidebarHeader").toggle("fast"); - }); - if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); - - $('#bugList').on('change', "[name='bugIDList[]']", checkClosed); -}); - -/** - * Closed bugs are not assignable. - * - * @access public - * @return void - */ -function checkClosed() -{ - var disabledAssigned = $('#bugList tr.checked .c-assignedTo a').length > 0 ? true : false; - $('#bugList tr.checked .c-assignedTo a').each(function() - { - if(!$(this).hasClass('disabled')) - { - disabledAssigned = false; - return false; - } - }); - - $('#mulAssigned').prop('disabled', disabledAssigned); -} diff --git a/module/bug/js/create.js b/module/bug/js/create.js deleted file mode 100644 index f1ab732b9d..0000000000 --- a/module/bug/js/create.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Load assignedTo and stories of module. - * - * @access public - * @return void - */ -function loadModuleRelated() -{ - var moduleID = $('#module').val(); - var productID = $('#product').val(); - var storyID = $('#story').val(); - setAssignedTo(moduleID, productID); - setStories(moduleID, productID, storyID); -} - -/** - * Set lane. - * - * @param int $regionID - * @access public - * @return void - */ -function setLane(regionID) -{ - laneLink = createLink('kanban', 'ajaxGetLanes', 'regionID=' + regionID + '&type=bug&field=lane'); - $.get(laneLink, function(lane) - { - if(!lane) lane = ""; - $('#lane').replaceWith(lane); - $("#lane" + "_chosen").remove(); - $("#lane").next('.picker').remove(); - $("#lane").chosen(); - }); -} - -$(function() -{ - var productID = $('#product').val(); - var moduleID = $('#module').val(); - var assignedto = $('#assignedTo').val(); - changeProductConfirmed = true; - oldStoryID = $('#story').val() || 0; - oldExecutionID = 0; - oldOpenedBuild = ''; - oldTaskID = $('#oldTaskID').val() || 0; - - if(parseInt($('#execution').val())) - { - loadExecutionRelated($('#execution').val()); - } - else if(parseInt($('#project').val())) - { - loadProjectBuilds($('#project').val()); - loadProjectTeamMembers($('#project').val()); - } - else - { - if(!assignedto) setTimeout(function(){setAssignedTo(moduleID, productID)}, 500); - } - - notice(); - - $('[data-toggle=tooltip]').tooltip(); - - /* Adjust size of bug type input group. */ - var adjustBugTypeGroup = function() - { - var $group = $('#bugTypeInputGroup'); - var width = ($group.parent().width()), addonWidth = 0; - var $controls = $group.find('.chosen-single'); - $group.children('.input-group-addon').each(function() - { - addonWidth += $(this).outerWidth(); - }); - var bestWidth = Math.floor((width - addonWidth)/$controls.length); - $controls.css('width', bestWidth); - var lastWidth = width - addonWidth - bestWidth * ($controls.length - 1); - $controls.last().css('width', lastWidth); - }; - adjustBugTypeGroup(); - $(window).on('resize', adjustBugTypeGroup); - - /* Init pri and severity selector. */ - $('#severity, #pri').on('change', function() - { - var $select = $(this); - var $selector = $select.closest('.pri-selector'); - var value = $select.val(); - $selector.find('.pri-text').html($selector.data('type') === 'severity' ? '' : '' + value + ''); - }); - - /* Get steps template. */ - var stepsTemplate = editor['steps'].html(); - - /* Judgment of required items for steps. */ - $('#submit').on('click', function() - { - var steps = editor['steps'].html(); - if(stepsRequired !== false && (steps == stepsTemplate || steps == editor.steps.templateHtml) && isStepsTemplate) - { - bootbox.alert(stepsNotEmpty); - return false; - } - }); -}); - -$(window).unload(function() -{ - if(blockID) window.parent.refreshBlock($('#block' + blockID)); -}); diff --git a/module/bug/js/edit.js b/module/bug/js/edit.js deleted file mode 100644 index 21fb7a4ada..0000000000 --- a/module/bug/js/edit.js +++ /dev/null @@ -1,118 +0,0 @@ -$(function() -{ - loadModuleRelated(); - - initPicker = function($element) - { - var picker = $element.data('zui.picker'); - var originOptions = picker.options; - - if(picker) picker.destroy(); - - var options = $.extend({}, originOptions, {searchDelay : 1000}); - $element.picker(options); - }; - - initPicker($('#case')); - initPicker($('#duplicateBug')); - - - resolution = $('#resolution').val(); - if(resolution == 'fixed') - { - $('#resolvedBuildBox').change(function() - { - if($('#resolvedBuild').val() != oldResolvedBuild) - { - confirmResult = confirm(confirmUnlinkBuild); - if(!confirmResult) - { - var resolvedBuildPicker = $('#resolvedBuild').data('zui.picker'); - resolvedBuildPicker.setValue(oldResolvedBuild); - } - } - }); - } - - $('#duplicateBug').picker( - { - disableEmptySearch : true, - dropWidth : 'auto', - maxAutoDropWidth : document.body.scrollWidth + document.getElementById('resolution').offsetWidth - document.getElementById('resolution').getBoundingClientRect().right - }); - - $('#linkBugsLink').click(function() - { - var bugIdList = ''; - $('#linkBugsBox input').each(function() - { - bugIdList += $(this).val() + ','; - }); - - var link = createLink('bug', 'linkBugs', 'bugID=' + bugID + '&bySearch=&excludeBugs=' + bugIdList, '', true); - - var modalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '95%', url: link}); - modalTrigger.show(); - }); - - var $pkResolvedBuild = $('#pk_resolvedBuild-search'); - $pkResolvedBuild.closest('.picker').css('width', $pkResolvedBuild.closest('td').width() - $pkResolvedBuild.closest('td').find('.input-group-btn').width()); -}); - -/** - * Set duplicate field. - * - * @param string $resolution - * @access public - * @return void - */ -function setDuplicate(resolution) -{ - if(resolution == 'duplicate') - { - $('#duplicateBugBox').show(); - } - else - { - $('#duplicateBugBox').hide(); - } -} - -/** - * Get story or task list. - * - * @param string $module - * @access public - * @return void - */ -function getList(module) -{ - productID = $('#product').val(); - executionID = $('#execution').val(); - storyID = $('#story').val(); - taskID = $('#task').val(); - if(module == 'story') - { - link = createLink('search', 'select', 'productID=' + productID + '&executionID=' + executionID + '&module=story&moduleID=' + storyID); - $('#storyListIdBox a').attr("href", link); - } - else - { - link = createLink('search', 'select', 'productID=' + productID + '&executionID=' + executionID + '&module=task&moduleID=' + taskID); - $('#taskListIdBox a').attr("href", link); - } -} - -/** - * load stories of module. - * - * @access public - * @return void - */ -function loadModuleRelated() -{ - moduleID = $('#module').val(); - productID = $('#product').val(); - storyID = $('#story').val(); - setStories(moduleID, productID, storyID); -} diff --git a/module/bug/js/report.js b/module/bug/js/report.js deleted file mode 100644 index cd26d766af..0000000000 --- a/module/bug/js/report.js +++ /dev/null @@ -1,19 +0,0 @@ -$(function() -{ - var resizeChartTable = function() - { - $('.table-wrapper').each(function() - { - var $this = $(this); - $this.css('max-height', $this.closest('.table-row.chart-row').find('.chart-wrapper').outerHeight()); - }); - }; - resizeChartTable(); - $(window).resize(resizeChartTable); -}); - -function changeChartType(type) -{ - $('form').attr('action', createLink('bug', 'report', 'productID=' + productID + '&browseType=' + browseType + '&branchID=' + branchID + '&moduleID=' + moduleID + '&chartType=' + type)); - $('form').find('#submit').click(); -} diff --git a/module/bug/js/resolve.js b/module/bug/js/resolve.js deleted file mode 100644 index 2dc1d67371..0000000000 --- a/module/bug/js/resolve.js +++ /dev/null @@ -1,66 +0,0 @@ -function setDuplicate(resolution) -{ - if(resolution == 'duplicate') - { - $.ajaxSettings.async = false; - $.get(createLink('bug', 'ajaxGetProductBugs', 'projectID=' + productID + '&bugID=' + bugID),function(data) - { - $('#duplicateBug').replaceWith(data); - $('#pk_duplicateBug-search').parent().parent().remove(); - $('#duplicateBug').picker( - { - disableEmptySearch : true, - dropWidth : 'auto' - }); - }); - $.ajaxSettings.async = true; - $('#duplicateBugBox').show(); - } - else - { - $('#duplicateBugBox').hide(); - } -} - -$(function() -{ - /* Fix bug #3227. */ - var requiredFields = config.requiredFields; - if(requiredFields.indexOf('resolvedBuild') == -1) - { - resolvedBuildTd = $('#resolvedBuild').closest('td'); - $('#resolution').change(function() - { - if($(this).val() == 'fixed') - { - resolvedBuildTd.addClass('required'); - } - else - { - resolvedBuildTd.removeClass('required'); - } - }); - } - - $('#createBuild').change(function() - { - if($(this).prop('checked')) - { - $('#resolvedBuildBox').addClass('hidden'); - $('#newBuildBox').removeClass('hidden'); - $('#newBuildExecutionBox').removeClass('hidden'); - } - else - { - $('#resolvedBuildBox').removeClass('hidden'); - $('#newBuildBox').addClass('hidden'); - $('#newBuildExecutionBox').addClass('hidden'); - } - }) - - $('#duplicateBug').picker( - { - disableEmptySearch : true, - dropWidth : 'auto' - }); -}) diff --git a/module/bug/js/view.js b/module/bug/js/view.js deleted file mode 100644 index ffa5dbe343..0000000000 --- a/module/bug/js/view.js +++ /dev/null @@ -1,58 +0,0 @@ -$(document).ready(function() -{ - limitIframeLevel(); - if(config.onlybody == 'yes') $('.main-actions').css({width: '100%', minWidth: '100%'}); -}); - -$('#tostory').click(function() -{ - if(!confirm(confrimToStory)) return false; -}); - -/** - * Load Product executions in html. - * - * @param int productID - * @param int projectID - * @access public - * @return void - */ -function loadProductExecutions(productID, projectID) -{ - var link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID +'&branch=' + branchID + '&number=&executionID=0&from=bugToTask'); - - $('#executionBox').load(link, function() - { - $select = $(this).find('select'); - $tr = $(this).closest('tr'); - $tr.removeClass('hidden'); - if($select.data('multiple') == 0) - { - $tr.addClass('hidden'); - $select.find('option:last').prop('selected', true); - } - $select.chosen(); - }); -} - -$('#toTaskButton').on('click', function() -{ - var projectID = $('#taskProjects').val(); - var executionID = $('#execution').val(); - var executionID = executionID ? executionID : 0; - - if(projectID && executionID != 0) - { - $('#cancelButton').click(); - var link = createLink('task', 'create', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=0&todoID=0&extra=projectID=' + projectID + '&bugID=' + bugID); - window.parent.$.apps.open(link, $('#execution').data('multiple') == 0 ? 'project' : 'execution'); - } - else if(projectID == 0) - { - alert(errorNoProject); - } - else - { - alert(errorNoExecution); - } -}); diff --git a/module/build/css/create.css b/module/build/css/create.css deleted file mode 100644 index 9bc04f46aa..0000000000 --- a/module/build/css/create.css +++ /dev/null @@ -1 +0,0 @@ -#noProduct {display: inline-block; width: 110%;} diff --git a/module/build/css/view.css b/module/build/css/view.css deleted file mode 100644 index 500f9fcc2b..0000000000 --- a/module/build/css/view.css +++ /dev/null @@ -1,27 +0,0 @@ -.linkBox #queryBox .search-form .form-actions {padding-bottom: 5px;} -.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;} -#unlinkStoryList, #unlinkBugList {border-top: 1px solid #cbd0db;} -.page-title .dropdown-menu {top: 20px; left: 170px; max-height:300px; overflow:auto;} -.page-title .text>a {font-weight: 700;} - -.body-modal #mainContent {min-height: 200px;} -td.article-content{overflow:auto !important;} -td.c-build{white-space: nowrap; overflow:hidden;} -th.c-user,td.c-user{text-align:left;} - -#stories th, #stories td{padding-left:16px;padding-right:16px;} -#stories .c-build{width:160px; text-align:left} -#stories .c-estimate{width:90px; text-align:right} -#stories .c-status{width:120px} -#stories .c-stage{width:130px; text-align:left;} -#bugs .c-status{width:100px;} -#bugs .c-build{width:160px; text-align:left} -#bugs .c-user{width:120px;} -#bugs .c-date{width:130px;} -#bugs .c-actions-1{width:60px;} -#generatedBugs .c-id {width:60px;} -#generatedBugs .c-severity {width:70px;} -#generatedBugs .c-status {width:100px;} -#generatedBugs .c-build {width:160px; text-align:left} -#generatedBugs .c-user {width:100px;} -#generatedBugs .c-date {width:120px;} diff --git a/module/build/js/create.js b/module/build/js/create.js deleted file mode 100644 index 83002b4ade..0000000000 --- a/module/build/js/create.js +++ /dev/null @@ -1,115 +0,0 @@ -$().ready(function() -{ - $(document).on('click', '#lastBuildBtn', function() - { - $('#name').val($(this).text()).focus(); - }); - - $(document).on('change', '#product, #branch', function() - { - var projectID = $('#project').val(); - var productID = $('#product').val(); - $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) - { - if(data) $('#buildBox').html(data); - $('#builds').attr('data-placeholder', multipleSelect).chosen(); - }); - - $.get(createLink('product', 'ajaxGetProductById', 'produtID=' + productID), function(data) - { - $('#branchBox').closest('tr').find('th').text(data.branchName); - }, 'json'); - }); - - $('input[name=isIntegrated]').change(function() - { - var projectID = $('#project').val(); - var executionID = $('#execution').val(); - - if($(this).val() == 'no') - { - $('#execution').closest('tr').show(); - $('#buildBox').closest('tr').hide(); - loadProducts(executionID); - } - else - { - $('#execution').closest('tr').hide(); - $('#buildBox').closest('tr').show(); - - $.ajaxSettings.async = false; - loadProducts(projectID); - var productID = $('#product').val(); - $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) - { - if(data) $('#buildBox').html(data); - $('#builds').attr('data-placeholder', multipleSelect).chosen(); - }); - $.ajaxSettings.async = true; - } - }); - $('#product').change(); - - $('[data-toggle="popover"]').popover(); -}); - -/** - * Load products. - * - * @param int $executionID - * @access public - * @return void - */ -function loadProducts(executionID) -{ - $('#product').remove(); - $('#product_chosen').remove(); - $('#branch').remove(); - $('#branch_chosen').remove(); - $('#noProduct').remove(); - executionID = executionID ? executionID : 0; - $.get(createLink('product', 'ajaxGetProducts', 'executionID=' + executionID), function(data) - { - if(data) - { - if(data.indexOf("required") != -1) - { - $('#productBox').addClass('required'); - } - else - { - $('#productBox').removeClass('required'); - } - - $('#productBox').append(data); - $('#product').chosen(); - - $.get(createLink('product', 'ajaxGetProductById', 'produtID=' + $("#product").val()), function(data) - { - $('#branchBox').closest('tr').find('th').text(data.branchName); - }, 'json'); - - loadBranches($("#product").val()); - } - }); - - loadLastBuild(); -} - -/** - * Load last build - * - * @access public - * @return void - */ -function loadLastBuild() -{ - var isIntegrated = $('input[name=isIntegrated]:checked').val(); - var projectID = $('#project').val(); - var executionID = $('#execution').val(); - if(isIntegrated == 'yes') executionID = 0; - $.get(createLink('build', 'ajaxGetLastBuild', 'projectID=' + projectID + '&executionID=' + executionID), function(data) - { - $('#lastBuildBox').html(data); - }); -} diff --git a/module/build/js/edit.js b/module/build/js/edit.js deleted file mode 100644 index 885275d499..0000000000 --- a/module/build/js/edit.js +++ /dev/null @@ -1,50 +0,0 @@ -$().ready(function() -{ - var oldExecutionID = $('#execution').val(); - $(document).on('change', '#product, #branch', function() - { - var productID = $('#product').val(); - - if(executionID) - { - loadExecutions(oldExecutionID); - } - else - { - $.get(createLink('build', 'ajaxGetProjectBuilds', 'projectID=' + projectID + '&productID=' + productID + '&varName=builds&build=&branch=all&index=&needCreate=&type=noempty,notrunk,separate,singled&extra=multiple'), function(data) - { - if(data) $('#buildBox').html(data); - $('#builds').attr('data-placeholder', multipleSelect).chosen(); - }); - } - - var newBranch = $('#branch').val() ? $('#branch').val().toString() : ''; - $.get(createLink('build', 'ajaxGetBranch', 'buildID=' + buildID + '&newBranch=' + newBranch), function(unlinkBranch) - { - if(unlinkBranch != '') - { - var result = confirm(unlinkBranch) ? true : false; - if(!result) - { - $('#branch').val(oldBranch[buildID].split(',')); - $('#branch').trigger("chosen:updated"); - } - } - }); - - $.get(createLink('product', 'ajaxGetProductById', 'produtID=' + productID), function(data) - { - $('#branchBox').closest('tr').find('th').text(data.branchName); - }, 'json'); - }); -}); - -function loadExecutions(oldExecutionID) -{ - var productID = $('#product').val(); - var branchID = $('#branch').length > 0 ? $('#branch').val() : 0; - $('#executionsBox').load(createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=0&branch=' + branchID + '&number=&executionID=' + oldExecutionID), function() - { - $('#executionsBox #execution').chosen().removeAttr('onchange'); - }); -} diff --git a/module/build/js/view.js b/module/build/js/view.js deleted file mode 100644 index b5fad596d4..0000000000 --- a/module/build/js/view.js +++ /dev/null @@ -1,104 +0,0 @@ -function showLink(buildID, type, param) -{ - var method = type == 'story' ? 'linkStory' : 'linkBug'; - if(typeof(param) == 'undefined') param = '&browseType=' + type + '¶m=0'; - loadURL(createLink(currentModule, method, 'buildID=' + buildID + param), type); - - $('.actions').find("a[href*='" + type + "']").addClass('hidden'); -} - -/** - * Load URL. - * - * @param string $url - * @param string $type - * @access public - * @return void - */ -function loadURL(url, type) -{ - $.get(url, function(data) - { - var $pane = $(type == 'story' ? '#stories' : '#bugs'); - $pane.find('.main-table').hide(); - var $linkBox = $pane.find('.linkBox'); - $linkBox.html(data).removeClass('hidden'); - $linkBox.find('[data-ride="table"]').table(); - $linkBox.find('[data-ride="pager"]').pager(); - $linkBox.find('[data-ride="pager"] li a.pager-item').click(function() - { - loadURL($(this).attr('href'), type); - return false; - }); - $linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').off('click'); - $linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').click(function() - { - line = $linkBox.find('[data-ride="pager"]').attr('data-link-creator'); - line = line.replace('{recPerPage}', $(this).attr('data-size')).replace('{page}', $linkBox.find('[data-ride="pager"]').attr('data-page')); - $.cookie($linkBox.find('[data-ride="pager"]').attr('data-page-cookie'), $(this).attr('data-size'), {expires:config.cookieLife, path:config.webRoot}); - loadURL(line, type); - return false; - }); - $.toggleQueryBox(true, $linkBox.find('#queryBox')); - }); -} - -$(function() -{ - if(link == 'true') showLink(buildID, type, param); - var infoShowed = false; - $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) - { - var href = $(e.target).attr('href'); - var tabPane = $(href + '.tab-pane'); - if(tabPane.size() == 0) return; - var formID = tabPane.find('.linkBox').find('form:last'); - if(formID.size() == 0) formID = tabPane.find('form:last'); - - if(href == '#buildInfo' && !infoShowed) - { - var $tr = $('#buildInfo .detail-content .table-data tbody tr:first'); - width = $tr.width() - $tr.find('th').width(); - $('#buildInfo img').each(function() - { - if($(this).parent().prop('tagName').toLowerCase() == 'a') $(this).unwrap(); - setImageSize($(this), width, 0); - }); - - infoShowed = true; - } - }); -}) - -/** - * Delete item use ajax. - * - * @param string url - * @param string replaceID - * @param string notice - * @access public - * @return void - */ -function ajaxDelete(url, replaceID, notice) -{ - if(confirm(notice)) - { - $.ajax( - { - type: 'GET', - url: url, - dataType: 'json', - success: function(data) - { - if(data.result == 'success') - { - location.reload(); - } - else if(data.result == 'fail' && typeof(data.message) == 'string') - { - bootbox.alert(data.message); - } - } - }); - } -} diff --git a/module/caselib/css/batchcreatecase.css b/module/caselib/css/batchcreatecase.css deleted file mode 100644 index 0005cbe651..0000000000 --- a/module/caselib/css/batchcreatecase.css +++ /dev/null @@ -1,2 +0,0 @@ -#batchCreateForm .input-group .colorpicker {z-index: 2;} -#batchCreateForm .input-group .colorpicker.open {z-index: 5;} \ No newline at end of file diff --git a/module/caselib/css/browse.css b/module/caselib/css/browse.css deleted file mode 100644 index f5376a5fae..0000000000 --- a/module/caselib/css/browse.css +++ /dev/null @@ -1,17 +0,0 @@ -.w-220px {width: 220px;} -#caseList tr th, #caseList tr td {white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} - -#createActionMenu .dropdown-menu {width: 100%;} - -.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;} -.dropdown-menu > .menu-search .input-group {width: 100%;} -.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666;} -.dropdown-menu > .menu-search .form-control {border: none !important; box-shadow: none !important; border-top: 1px solid #ddd !important;} -.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto;} -.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;} -.dropdown-list > li > a:hover, -.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} - -.datatable-menu {display: none;} - -.pl-5px {padding-left: 5px;} diff --git a/module/caselib/css/createcase.css b/module/caselib/css/createcase.css deleted file mode 100644 index 26318033a6..0000000000 --- a/module/caselib/css/createcase.css +++ /dev/null @@ -1,53 +0,0 @@ -#steps .step-id {text-align: center; vertical-align: middle; font-weight: bold;} -#steps .step-item-id {background-color: transparent; border: none; display: none; width: 30px; padding-left: 0; text-align: right; padding-right: 8px;} -#steps .checkbox-inline input[type="checkbox"] {top: -2px;} -#steps .btn-group .btn {padding-left: 0; padding-right: 0; min-width: 30px;} -.step-actions {width: 100px;} -#steps .active td {transition: background-color .5s;} -#steps .step-steps {resize: none; max-height: 30px;} -#steps .step-expects {resize: none;} -#steps .step-item .step-item-id {display: table-cell; min-width: 40px;} -#steps .step-item .step-id {color: transparent;} -#steps .step-actions {width: 90px; text-align: center;} - -#steps .btn-step-move {cursor: move;} -#steps.sortable > tr.drag-shadow {display: none;} -#steps.sortable-sorting > tr {transition: all .2s; position: relative; z-index: 5; opacity: .3;} -#steps.sortable-sorting {cursor: move;} -#steps.sortable-sorting > tr.drag-row {opacity: 1; z-index: 10; box-shadow: 0 2px 4px red;} -#steps.sortable-sorting > tr.drag-row + tr > td {box-shadow: inset 0 4px 2px rgba(0,0,0,.2);} -#steps.sortable-sorting > tr.drag-row > td {background-color: #edf3fe !important;} -#steps.sortable > tr.drop-success > td {background-color: #cfe0ff; transition: background-color 2s;} -#steps .step-type-menu-box {position: relative;} -#steps .step-type-menu {position: absolute; top: 25px; right: 0; z-index: 10; box-shadow: 0 6px 12px rgba(0,0,0,.175); background-color: #fff; display: none; border: 1px solid #bbb; min-width: 60px;} -#steps .step-group .step-expects {display: none;} -#steps .step-step[data-type="item"] .step-type-menu > a[data-value="item"] {display: none;} -#steps .step-type-current {display: block; padding: 5px 10px; position: relative; line-height: 20px;} -#steps .step-type-toggle:hover .step-type-current {background-color: #edf3fe; color: #03c;} -#steps .step-type-menu:hover, -#steps .step-type-toggle:hover .step-type-menu {display: table; padding: 2px;} -#steps .step-type-menu > a {display: table-cell; padding: 8px 10px; color: #666;} -#steps .step-type-menu > a:hover {color: #333; background-color: #e5e5e5;} -#steps .step-type-menu > a.active {color: #fff; background-color: #1a4f85;} - -.table-bordered .step-actions {width: 98px;} -.table-bordered > #steps > tr > td {padding: 0; background-color: #fafafa; border: 1px solid #ddd !important;} -.table-bordered > #steps > tr > td.step-id {padding-right: 8px;} -.table-bordered > #steps > tr > td .btn {border-color: transparent; background-color: transparent;} -.table-bordered > #steps > tr > td .btn:hover, -.table-bordered > #steps > tr > td .btn:focus {background-color: #ddd;} -.table-bordered > #steps .input-group-addon {border: none; background-color: transparent; border-left: 1px dotted #e5e5e5;} -.table-bordered > #steps > tr > td textarea {border-color: #fff; box-shadow: none;} -.table-bordered > #steps > tr > td textarea:hover {border-color: #808080;} -.table-bordered > #steps > tr > td textarea:focus {border-color: #4d90fe;} -.table-bordered > #steps .step-child .step-child-id {border-right: 1px dotted #ddd; border-left: none;} - -.minw-80px {min-width: 80px;} -.title-group.required:after {display: none;} -.title-group.required > .required:after {display: block; right: 29px; top: 5px;} -#titleBox.required:after{display: block; right: 29px; top: 5px;} -#priRequiredBox.required:after{display: block; right: -12px; top: 5px;} -.pri-selector > .btn {padding: 5px 8px !important; width: 100%;} -.pri-selector > .dropdown-menu {padding: 10px;} - -.title-group .has-icon-right {min-width: 700px;} diff --git a/module/caselib/css/showimport.css b/module/caselib/css/showimport.css deleted file mode 100644 index 52b3ecab97..0000000000 --- a/module/caselib/css/showimport.css +++ /dev/null @@ -1,2 +0,0 @@ -.table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;} -.c-pri {width: 100px}; diff --git a/module/caselib/js/browse.js b/module/caselib/js/browse.js deleted file mode 100644 index 001e3ddc52..0000000000 --- a/module/caselib/js/browse.js +++ /dev/null @@ -1,32 +0,0 @@ -/* Swtich to search module. */ -function browseBySearch(active) -{ - $('#querybox').removeClass('hidden'); - $('.divider').addClass('hidden'); - $('#' + active + 'Tab').removeClass('active'); - $('#bysearchTab').addClass('active'); - $('#bymoduleTab').removeClass('active'); -} - -/** - * Confirm batch delete cases. - * - * @param string $actionLink - * @access public - * @return void - */ -function confirmBatchDelete(actionLink) -{ - if(confirm(batchDelete)) setFormAction(actionLink); - return false; -} - -$(function() -{ - /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ - $(".sidebar-toggle").click(function() - { - $("#sidebarHeader").toggle("fast"); - }); - if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); -}); \ No newline at end of file diff --git a/module/caselib/js/createcase.js b/module/caselib/js/createcase.js deleted file mode 100644 index d51f9fce18..0000000000 --- a/module/caselib/js/createcase.js +++ /dev/null @@ -1,231 +0,0 @@ -var newRowID = 0; - -function loadLibModules(libID) -{ - var link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=caselib&branch=0&rootModuleID=0&returnType=html&fieldID=&needManage=true'); - $('#moduleIdBox').load(link, function() - { - $(this).find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + "") - }); -} - -/** - * Init testcase steps in form - * - * @param string selector - * @access public - * @return void - */ -function initSteps(selector) -{ - /* Auto adjust textarea height. */ - $('textarea.autosize').each(function() - { - $.autoResizeTextarea(this); - }); - - var $steps = $(selector || '#steps'); - var $stepTemplate = $('#stepTemplate').detach().removeClass('template').attr('id', null); - var groupNameText = $steps.data('groupName'); - var insertStepRow = function($row, count, type, notFocus) - { - if(count === undefined) count = 1; - var $step; - for(var i = 0; i < count; ++i) - { - $step = $stepTemplate.clone(); - if($row) $row.after($step); - if(!$row) $steps.append($step); - $step.addClass('step-new'); - if(type) $step.find('.step-type').val(type); - } - if(!notFocus && $step) setTimeout(function(){$step.find('.step-steps').focus();}, 10); - }; - var updateStepType = function($step, type) - { - var targetIsGroup = type =='group'; - $step.attr('data-type', type).find('.step-steps').addClass('autosize').attr('placeholder', targetIsGroup ? groupNameText : null); - }; - var getStepsElements = function() - { - return $steps.children('.step:not(.drag-shadow)'); - }; - var refreshSteps = function(skipAutoAddStep) - { - var parentId = 1, childId = 0; - getStepsElements().each(function(idx) - { - var $step = $(this).attr('data-index', idx + 1); - var type = $step.find('.step-type').val(); - var stepID; - if(type == 'group') - { - $step.removeClass('step-item').removeClass('step-step').addClass('step-group'); - stepID = parentId++; - $step.find('.step-id').text(stepID); - childId = 1; - } - else if(type == 'step') - { - $step.removeClass('step-item').removeClass('step-group').addClass('step-step'); - stepID = parentId++; - $step.find('.step-id').text(stepID); - childId = 0; - } - else // step type is not set - { - if(childId) // type as child - { - stepID = (parentId - 1) + '.' + (childId++); - $step.removeClass('step-step').removeClass('step-group').addClass('step-item').find('.step-item-id').text(stepID); - } - else // type as step - { - $step.removeClass('step-item').removeClass('step-group').addClass('step-step'); - stepID = parentId++; - $step.find('.step-id').text(stepID); - } - } - $step.find('[name^="steps["]').attr('name', "steps[" +stepID + ']'); - $step.find('[name^="stepType["]').attr('name', "stepType[" +stepID + ']'); - $step.find('[name^="expects["]').attr('name', "expects[" +stepID + ']'); - - updateStepType($step, type); - }); - - /* Auto insert step to group without any steps */ - if(!skipAutoAddStep) - { - var needRefresh = false; - getStepsElements().each(function(idx) - { - var $step = $(this).attr('data-index', idx + 1); - if($step.attr('data-type') !== 'group') return; - var $nextStep = $step.next('.step:not(.drag-shadow)'); - if(!$nextStep.length || $nextStep.attr('data-type') !== 'item') - { - insertStepRow($step, 1, 'item', true); - needRefresh = true; - } - }); - - if(needRefresh) refreshSteps(true); - } - }; - var initSortable = function() - { - var isMouseDown = false; - var $moveStep = null, moveOrder = 0; - $steps.on('mousedown', '.btn-step-move', function() - { - isMouseDown = true; - $moveStep = $(this).closest('.step').addClass('drag-row'); - - $(document).off('.sortable').one('mouseup.sortable', function() - { - isMouseDown = false; - $moveStep.removeClass('drag-row'); - $steps.removeClass('sortable-sorting'); - $moveStep = null; - refreshSteps(); - }); - $steps.addClass('sortable-sorting'); - }).on('mouseenter', '.step:not(.drag-row)', function() - { - if(!isMouseDown) return; - var $targetStep = $(this); - getStepsElements().each(function(idx) - { - $(this).data('order', idx); - }); - moveOrder = $moveStep.data('order'); - var targetOrder = $targetStep.data('order'); - if(moveOrder === targetOrder) return; - else if(targetOrder > moveOrder) - { - $targetStep.after($moveStep); - } - else if(targetOrder < moveOrder) - { - $targetStep.before($moveStep); - } - }); - } - $steps.on('click', '.btn-step-add', function() - { - insertStepRow($(this).closest('.step')); - refreshSteps(); - }).on('click', '.btn-step-delete', function() - { - if($steps.children('.step').length == 1) return; - $(this).closest('.step').remove(); - refreshSteps(); - }).on('change', '.step-group-toggle', function() - { - var $checkbox = $(this); - var $step = $checkbox.closest('.step'); - var isChecked = $checkbox.is(':checked'); - var suggestType = isChecked ? 'group' : 'item'; - if(!isChecked) - { - var $prevStep = $step.prev('.step:not(.drag-shadow)'); - var suggestChild = $prevStep.length && $prevStep.is('.step-group') && $step.next('.step:not(.drag-shadow)').length; - suggestType = suggestChild ? 'item' : 'step'; - } - $step.find('.step-type').val(suggestType); - - /* Auto insert step to group without any steps */ - if(suggestType === 'group') - { - var $nextStep = $step.next('.step:not(.drag-shadow)'); - if(!$nextStep.length || $nextStep.find('.step-type').val() !== 'item') - { - insertStepRow($step, 1, 'item', true); - } - } - - refreshSteps(); - }).on('change', '.form-control', function() - { - var $control = $(this); - if($control.val()) - { - var $step = $control.closest('.step'); - if($step.data('index') === getStepsElements().length) - { - insertStepRow($step, 1, 'step', true); - if($step.is('.step-item,.step-group')) insertStepRow($step, 1, 'item', true); - refreshSteps(); - } - } - }); - initSortable(); - refreshSteps(); -} - -/** - * Update the step id. - * - * @access public - * @return void - */ -function updateStepID() -{ - var i = 1; - $('.stepID').each(function(){$(this).html(i ++)}); -} - -$(function() -{ - $('[data-toggle=tooltip]').tooltip(); - initSteps(); - - $('#pri').on('change', function() - { - var $select = $(this); - var $selector = $select.closest('.pri-selector'); - var value = $select.val(); - $selector.find('.pri-text').html('' + value + ''); - }); -}) diff --git a/module/chart/css/preview.css b/module/chart/css/preview.css deleted file mode 100644 index 6d0a146010..0000000000 --- a/module/chart/css/preview.css +++ /dev/null @@ -1,53 +0,0 @@ -.m-chart-preview {color: rgb(49, 60, 82); background-color: rgb(244, 245, 247);} -.main-col .btn-toolbar {margin-bottom: 10px;} -.main-position {position: relative;} -.child-position {position: absolute; right: 0;} -.parent-position{padding-right: 180px;} -.biz-version {padding-top: 10px;} -.biz-version a {color: #81511C;} - -#chartGroups li {overflow: hidden; white-space: nowrap;} -#chartGroups .checkbox-primary {margin-left: 8px; display: inline-block;} -#chartGroups .checkbox-primary + a {display: inline-block;} -#chartGroups .checkbox-primary > input[type=checkbox][name^=chart] + label {padding-left: 0px;} - -.chart-item + .chart-item {margin-top: 10px;} -.chartbox { - height: 400px; - overflow: overlay; - border: 1px solid #ddd; -} -.ant-table-tbody>tr>td, .ant-table-thead>tr>th { - padding: 8px!important; -} -.table-title { - top: 10px; - right: auto; - bottom: auto; - left: 10px; - width: auto; - height: auto; - margin: 0px 0px 10px 10px; - font-size: 18px; - font-weight: bold; - text-align: left; -} - -#subNavbar .nav li.active a {display: none;} - -#mainContent .cell {padding: 11px;} -#mainContent .panel {border: 0;} -#mainContent .chart-item.main-row x-vue-echarts {max-height: 460px;} -#mainContent .chart-item.main-row .ant-table-wrapper {max-height: 398px; overflow-y: overlay !important;border: 1px solid #e8e8e8; border-right: 0;} -#mainContent .chart-item.main-row .ant-table-bordered .ant-table-body>table {border: 0;} -#mainContent .chart-item.main-row .ant-table-bordered .ant-table-body>table tr:last-child td {border-bottom: 0;} - -.echart-content {width: 100%; min-height: 500px;} - -.filterBox{display: flex; margin-bottom: 20px;} -.filter-items{display: flex; flex: 1; flex-wrap: wrap;} -.filter-item{padding: 0 16px 5px 0;} -.filter-item-grow{flex-grow: 1;} -.queryBtn{display: flex; align-items: center; padding-bottom: 5px; flex-basis: 60px;} - -.filterBox .picker-selections{width: 128px; height: 32px; overflow: hidden; text-overflow: clip; white-space: nowrap;} diff --git a/module/chart/js/preview.js b/module/chart/js/preview.js deleted file mode 100644 index 48b48de670..0000000000 --- a/module/chart/js/preview.js +++ /dev/null @@ -1,254 +0,0 @@ -$(function() -{ - initCheckBox(); - $('#exportchart').modalTrigger(); - - if(charts.length > 0) - { - var chartPros = charts.map(function(chart) - { - var echartDom = $('#chartDraw' + chart.currentGroup + '_' + chart.id).get(0); - var echart = echarts.init(echartDom); - ajaxGetChart(false, chart, echart); - return renderFilters(chart); - }); - - Promise.all(chartPros).then(function() - { - calcPreviewGrowFilter(); - $('body').resize(() => {calcPreviewGrowFilter(true);}); - }); - } - - chartMap = new Map(); - charts.forEach(function(chart) - { - chartMap.set(chart.currentGroup + '_' + chart.id, chart); - }); - - $('[data-toggle="tooltip"]').tooltip(); -}) - -/** - * Init check box. - * - * @access public - * @return void - */ -function initCheckBox() -{ - /* Use parent checked prop set all child. */ - $('input[data-type="parent"]').click(function() - { - $(this).parent().siblings('ul').find('input[data-type="child"]').prop('checked', $(this).prop('checked')); - }); - - $('input[data-type="child"]').click(function() - { - /* If child unchecked after click, set parent unchecked. */ - if(!$(this).prop('checked')) - { - $(this).parentsUntil('#chartGroups', 'li').find('div').children('input[data-type="parent"]').prop('checked', false); - } - /* If child checked after click, if all child checked, set parent checked. */ - else - { - if($(this).closest('ul').find('input[data-type="child"]').length >= 1) - { - var siblings_checked = $(this).closest('ul').find('input[data-type="child"]:checked').length; - var siblings_total = $(this).closest('ul').find('input[data-type="child"]').length; - if(siblings_checked == siblings_total) - { - $(this).parentsUntil('#chartGroups', 'li').find('div').children('input[data-type="parent"]').prop('checked', true); - } - } - } - }); - - /* Use click to trigger event. */ - charts.forEach(function(item) - { - $("#chart_" + item.currentGroup + '_' + item.id).click(); - }); -} - -/** - * Init query button. - * - * @param object $obj - * @access public - * @return void - */ -function queryData(obj) -{ - var chartID = $(obj).parents('.filterBox').attr('data-chart'); - var chartInfo = chartMap.get(chartID); - chartInfo.searchFilters = JSON.parse(JSON.stringify(chartInfo.filters)); - - // Foreach filters and set current value in searchFilters. */ - $('#filterItems' + chartID + ' .filter-items').children().each(function(index) - { - var $child = $(this); - if(!$child.hasClass('filter-item')) return; - - var filter = chartInfo.searchFilters[index]; - var type = filter.type; - var value = null; - - if(type == 'input' || type == 'select') - { - var value = $child.find('#default').val(); - chartInfo.searchFilters[index].default = value; - } - else if(type == 'date' || type == 'datetime') - { - var begin = $child.find('input').first().val(); - var end = $child.find('input').last().val(); - - var value = {"begin":begin, "end":end}; - chartInfo.searchFilters[index].default = value; - } - else if(type == 'condition') - { - var operator = $child.find('#operator').data('zui.picker').getValue(); - var value = $child.find('#value').val(); - - chartInfo.searchFilters[index].operator = operator; - chartInfo.searchFilters[index].value = value; - } - }); - - //* Reload echart. */ - var echartDom = $('#chartDraw' + chartID).get(0); - var echartInfo = echarts.init(echartDom); - ajaxGetChart(false, chartInfo, echartInfo); -} - -function calcPreviewGrowFilter(resize = false) -{ - if(charts.length <= 0) return; - charts.forEach(function(chart) - { - /* When body resize, resize echarts. */ - if(resize) - { - var echartDom = $('#chartDraw' + chart.currentGroup + '_' + chart.id).get(0); - var echart = echarts.init(echartDom); - echart.resize(); - } - - var $filterBox = $('#filterItems' + chart.currentGroup + '_' + chart.id); - var $filterItems = $filterBox.find('.filter-items'); - /* When refreshing this page, ZenTao load this page twice, when the first load isn't complete, jump back to index and load the second time, - the first load can't calc filter width, can't get the element using jQuery at first load. */ - var hasInit = true; - chart.filters.forEach(function(filter, index) - { - var nowItem = '.filter-item-' + index; - var $titleSpan = $filterItems.find(nowItem).find('.input-group-addon').first(); - if(!$titleSpan.length) hasInit = false; - }); - if(!hasInit) return; - - var domWidth = $filterItems[0].getBoundingClientRect().width; - var nowWidth = domWidth; - var lineWrap = false; - var nowCount = 0; - var canGrowTotal = 0; - - $filterBox.find('.query-inside').addClass('hidden'); - $filterBox.find('.query-outside').addClass('visibility-hidden'); - chart.filters.forEach(function(filter, index) - { - var nowItem = '.filter-item-' + index; - var $nowDom = $filterItems.find(nowItem); - var leftPadding = parseInt($nowDom.css('padding-left')); - var rightPadding = parseInt($nowDom.css('padding-right')); - var spanWidth = $nowDom.find('.input-group-addon').first()[0].getBoundingClientRect().width; - var filterWidth = ((filter.type == 'input' || filter.type == 'select') ? WIDTH_INPUT : WIDTH_DATE) + (spanWidth + leftPadding + rightPadding); - - /* Clear the flex-basis and set flex-basic again. */ - $nowDom.css('flex-basis', ''); - $nowDom.css('flex-basis', filterWidth); - if(nowWidth - filterWidth >= 0) - { - nowWidth -= filterWidth; - nowCount ++; - } - else - { - canGrowTotal += nowCount; - nowWidth = domWidth - filterWidth; - nowCount = 1; - lineWrap = true; - } - }); - - /* Clear all filter filter-item-grow and add class to support grow element. */ - $filterItems.children().removeClass('filter-item-grow'); - chart.filters.forEach(function(filter, index) - { - var $nowDom = $filterItems.find('.filter-item-' + index); - if(canGrowTotal >= index + 1) $nowDom.addClass('filter-item-grow'); - if(filter.type == 'select' && $nowDom.find('.picker').length) $nowDom.find('.picker').find('.picker-selections').css('width', WIDTH_INPUT); - }); - - if(!lineWrap && nowWidth >= 60) $filterBox.find('.query-inside').removeClass('hidden'); - else $filterBox.find('.query-outside').removeClass('visibility-hidden'); - - /* Set picker-selection width, default 128px. */ - waitForRepaint(function() - { - chart.filters.forEach(function(filter, index) - { - var $nowDom = $filterItems.find('.filter-item-' + index); - if(filter.type == 'select' && $nowDom.find('.picker').length) - { - var pickerWidth = $nowDom.hasClass('filter-item-grow') ? $nowDom.find('.picker')[0].getBoundingClientRect().width : WIDTH_INPUT; - $nowDom.find('.picker').find('.picker-selections').css('width', pickerWidth); - } - }); - }); - }); -} - -function renderFilters(chart) -{ - return new Promise(function(resolve, reject) - { - if(chart.filters.length == 0) - { - resolve(); - return; - } - - var fieldNames = {}; - Object.keys(chart.fieldSettings).forEach(function(key){fieldNames[key] = chart.fieldSettings[key].name;}); - $.post(createLink('chart', 'ajaxGetFilterForm', 'chartID=' + chart.id), {fieldList: fieldNames, fieldSettings: chart.fieldSettings, filters: chart.filters, langs: chart.langs, sql: chart.sql}, function(resp) - { - resp = JSON.parse(resp); - var $filterItems = $('#filterItems' + chart.currentGroup + '_' + chart.id + ' .filter-items'); - chart.filters.forEach(function(filter, index) - { - $filterItems.append(renderFilterItem(filter, resp, index)); - }); - $filterItems.append(queryDom); - resolve(); - }); - }) -} - -function renderFilterItem(filter, resp, index, step) -{ - var tpl = $('#filterItemTpl').html(); - var data = - { - index: index, - name: filter.name, - search: resp[index].item - }; - var html = $($.zui.formatString(tpl, data)) - initPicker(html, 'picker-select', true); - initDatepicker(html, attrDateCheck); - return html; -} diff --git a/module/company/css/browse.css b/module/company/css/browse.css deleted file mode 100644 index 595c74318a..0000000000 --- a/module/company/css/browse.css +++ /dev/null @@ -1,9 +0,0 @@ -#titlebar {display: none;} -#querybox {float: none !important; width: auto;} -#moreOrLite {right: 10px !important;} - -#userList tbody td {white-space: nowrap; overflow: hidden;} -.space-sm + .text-center {display: none;} -.c-role, .c-company, .c-visits {width: 90px;} - -.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);} diff --git a/module/company/css/dynamic.css b/module/company/css/dynamic.css deleted file mode 100644 index 0be403bb0b..0000000000 --- a/module/company/css/dynamic.css +++ /dev/null @@ -1,38 +0,0 @@ -.dynamic {position: relative; padding-left: 170px;} -.dynamic-date {position: absolute; left: 0; top: 0; width: 150px; border: 2px solid #eee; border-radius: 4px; padding: 14px 20px; height: 58px;} -.dynamic-date:before {content: ' '; display: block; position: absolute; right: -22px; top: 26px; height: 2px; width: 20px; background-color: #eee;} -.dynamic-date > .date-label, -.dynamic-date > .date-text {font-size: 18px; display: block;} -.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;} -.dynamic-date > .date-label {margin-top: -8px;} -.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;} -.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; transition: max-height .2s; overflow: hidden;} -.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;} -.dynamic .timeline-text {color: #3C4353;} -.dynamic .text-muted {color: #838A9D;} -.dynamic .label-id {top: -1px; border: 1px solid rgba(131,138,157,0.25); color: #838A9D;} -.dynamic.active .timeline, -.dynamic.active .dynamic-date {border-color: #00a9fc;} -.dynamic.active .dynamic-date:before {background-color: #00a9fc;} -.dynamic.collapsed .timeline {max-height: 58px;} -.dynamic.collapsed .timeline > li + li {display: none;} -.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';} - -.c-project, .c-product, .c-execution {width: 110px !important; overflow: unset;} -.c-user, .c-order {width: 96px !important; overflow: unset;} -#mainMenu .picker .picker-selections{white-space:nowrap;} -.picker-drop-menu{width:auto !important; max-width:350px !important;} - -.timeline > li:before {left: -26px;} -.timeline > li + li:after {left: -23px;} -.timeline-text {margin-left: -18px;} -.label-action {padding: 0 4px;} -.label-id {margin-left: 4px;} -.timeline > li.active:before {left: -30px;} -.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;} -.timeline > li.collected > div:after {background-color: #FFAF65;} -.timeline > li.releaseddoc > div:after {background-color: #66A2FF;} -.timeline > li > div:after {left: -27px;} -.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;} -.timeline > li > div > .timeline-text > a {color: #313C52;} diff --git a/module/company/css/view.css b/module/company/css/view.css deleted file mode 100644 index 22565c4750..0000000000 --- a/module/company/css/view.css +++ /dev/null @@ -1 +0,0 @@ -#mainContent {width: 500px; margin: auto;} diff --git a/module/company/js/browse.js b/module/company/js/browse.js deleted file mode 100644 index 13ce9f67b3..0000000000 --- a/module/company/js/browse.js +++ /dev/null @@ -1 +0,0 @@ -$(".tree .active").parent('li').addClass('active'); \ No newline at end of file diff --git a/module/company/js/dynamic.js b/module/company/js/dynamic.js deleted file mode 100644 index 1a73197ab6..0000000000 --- a/module/company/js/dynamic.js +++ /dev/null @@ -1,12 +0,0 @@ -$('#account, #product, #project, #execution, #orderBy').change(function() -{ - var userID = $('#account').val(); - var productID = $('#product').length ? $('#product').val() : 0; - var projectID = $('#project').val(); - var executionID = $('#execution').val(); - var orderBy = $('#orderBy').val(); - - browseType = browseType == 'bysearch' ? 'all' : browseType; - link = createLink('company', 'dynamic', 'browseType=' + browseType + '¶m=&recTotal=0&date=&direction=no&userID=' + userID + '&productID=' + productID + '&projectID=' + projectID + '&executionID=' + executionID + '&orderBy=' + orderBy); - location.href = link; -}) diff --git a/module/company/js/edit.js b/module/company/js/edit.js deleted file mode 100644 index cf373d1fea..0000000000 --- a/module/company/js/edit.js +++ /dev/null @@ -1 +0,0 @@ -function setOuterBox(){} diff --git a/module/company/js/view.js b/module/company/js/view.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/compile/css/browse.css b/module/compile/css/browse.css deleted file mode 100644 index 8e03463502..0000000000 --- a/module/compile/css/browse.css +++ /dev/null @@ -1,3 +0,0 @@ -.c-id {width: 60px;} -.c-repo, .c-build-type {width: 150px;} -.c-date, .c-actions {width: 130px !important;} diff --git a/module/compile/js/logs.js b/module/compile/js/logs.js deleted file mode 100644 index 961b3c3026..0000000000 --- a/module/compile/js/logs.js +++ /dev/null @@ -1,13 +0,0 @@ -$().ready(function() -{ - $('#refreshBtn').click(function() - { - $url = $(this).attr('href'); - $.get($url, function(response) - { - window.location.reload(); - }); - - return false; - }); -}); diff --git a/module/convert/css/mapjira2zentao.css b/module/convert/css/mapjira2zentao.css deleted file mode 100644 index ba5b78d217..0000000000 --- a/module/convert/css/mapjira2zentao.css +++ /dev/null @@ -1,16 +0,0 @@ -.main-header > ul {display: inline-block; padding: 0; margin: 0;} -.main-header > ul > li {position: relative;} -.main-header > ul > li.active > a {background-color: #1CA5FF; color: #fff} -.main-header > ul > li > a {min-width: 120px; padding: 5px 20px; text-align: center; transition: none; color: #838a9d} -.main-header > ul > li.active > a:hover, -.main-header > ul > li.active > a:focus {background-color: #1CA5FF;} -.main-header > ul > li .step-number {display: inline-block; width: 14px; height: 14px; border-radius: 7px; text-align: center; line-height: 12px; border: 1px solid #A6AAB8; color: #A6AAB8; font-size: 12px; font-weight: bold; margin-right: 3px;} -.main-header > ul > li + li > a {padding-left: 35px;} -.main-header > ul > li + li:before, -.main-header > ul > li + li:after {content: ' '; width: 0; height: 0; border-style: solid; border-width: 15px 0 15px 15px; border-color: transparent transparent transparent #a6aab8; position: absolute; left: 0; top: 0;} -.main-header > ul > li + li:after {border-left-color: #fff; left: -1px;} -.main-header > ul > li.active + li:after {border-left-color: #1ca5ff;} -.main-header > ul > li:hover + li:after {border-left-color: #eceef4;} -.main-header > ul > li.active:hover + li:after {border-left-color: #1CA5FF;} -.nav-primary>li.active>a:hover {color: #fff} -.main-header {margin-top: -15px !important;} diff --git a/module/cron/css/index.css b/module/cron/css/index.css deleted file mode 100644 index 6a6a07af08..0000000000 --- a/module/cron/css/index.css +++ /dev/null @@ -1,5 +0,0 @@ -.c-minute {width: 60px;} -.c-hour, .c-dom {width: 50px;} -.c-mon, .c-dow, .c-status {width: 60px;} -.c-remark {width: 200px;} -.c-actions {width: 100px;} diff --git a/module/custom/css/browsestoryconcept.css b/module/custom/css/browsestoryconcept.css deleted file mode 100644 index 2a0621cbe2..0000000000 --- a/module/custom/css/browsestoryconcept.css +++ /dev/null @@ -1,7 +0,0 @@ -.table-form>tbody>tr>th{text-align: center} -.c-default {width: 70px;} -.setBtn {margin-top: -5px;} -.px-0 {padding-left: 0; padding-right: 0;} -.pl-20 {padding-left: 20px;} -.pt-5 {padding-top: 5px;} -.box-shadow-none {box-shadow: unset!important;} diff --git a/module/custom/css/code.css b/module/custom/css/code.css deleted file mode 100644 index 46d26dd201..0000000000 --- a/module/custom/css/code.css +++ /dev/null @@ -1,5 +0,0 @@ -#readOnlyOfCode {font-size: 13px; color: #5e626d; display: flex; width: 200%;} -#readOnlyOfCode i {font-size: 14px; color: #0075ff; margin-right: 3px;} -.c-setCode {width: 150px !important;} -[lang^=en] .c-setCode, [lang^=de] .c-setCode {width: 160px !important;} -[lang^=fr] .c-setCode {width: 200px !important;} diff --git a/module/custom/css/execution.css b/module/custom/css/execution.css deleted file mode 100644 index c72631bb78..0000000000 --- a/module/custom/css/execution.css +++ /dev/null @@ -1,2 +0,0 @@ -#readOnlyOfExecution {font-size: 13px; color: #5e626d;} -#readOnlyOfExecution i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/css/kanban.css b/module/custom/css/kanban.css deleted file mode 100644 index 92d15f96d7..0000000000 --- a/module/custom/css/kanban.css +++ /dev/null @@ -1,2 +0,0 @@ -#readOnlyOfKanban {font-size: 13px; color: #5e626d;} -#readOnlyOfKanban i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/css/limittaskdate.css b/module/custom/css/limittaskdate.css deleted file mode 100644 index f50c40bb35..0000000000 --- a/module/custom/css/limittaskdate.css +++ /dev/null @@ -1,2 +0,0 @@ -#limitTaskDateForm .c-name {width: 120px;} -#limitTaskDateForm .c-select {width: 350px;} diff --git a/module/custom/css/mode.css b/module/custom/css/mode.css deleted file mode 100644 index c1493fb200..0000000000 --- a/module/custom/css/mode.css +++ /dev/null @@ -1,7 +0,0 @@ -.pd-l-20 {padding-left: 20px!important;} -#selectProgramModal .modal-dialog {width: 550px} -#selectProgramModal .modal-header {border-bottom: 0px} -#selectProgramModal .modal-header h4.modal-title{font-weight: 700} -#selectProgramModal .modal-footer {border-top: 0px; text-align: center} -.main-table tbody > tr.select-mode:hover{background: unset;} -.btn-wide {padding: 6px 85px;} diff --git a/module/custom/css/percent.css b/module/custom/css/percent.css deleted file mode 100644 index f29730761e..0000000000 --- a/module/custom/css/percent.css +++ /dev/null @@ -1,3 +0,0 @@ -.table-form>tbody>tr>th.c-setPercent {width: 135px;} -#readOnlyOfPercent {font-size: 13px; color: #5e626d; display: flex; width: 200%;} -#readOnlyOfPercent i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/css/product.css b/module/custom/css/product.css deleted file mode 100644 index 777bce5dff..0000000000 --- a/module/custom/css/product.css +++ /dev/null @@ -1,2 +0,0 @@ -#readOnlyOfProduct {font-size: 13px; color: #5e626d;} -#readOnlyOfProduct i {font-size: 14px; color: #0075ff; margin-right: 3px;} diff --git a/module/custom/js/flow.js b/module/custom/js/flow.js deleted file mode 100644 index d067848782..0000000000 --- a/module/custom/js/flow.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready(function() -{ - $('#mainMenu #flowTab').addClass('btn-active-text'); -}); diff --git a/module/custom/js/hours.js b/module/custom/js/hours.js deleted file mode 100644 index 27c93ca508..0000000000 --- a/module/custom/js/hours.js +++ /dev/null @@ -1,16 +0,0 @@ -$(function() -{ - $("#sidebar .nav [data-toggle='tab']").click(function() - { - $(this).parent().find('a').removeClass('active'); - $(this).addClass('active'); - var type = $(this).hasClass('hours') ? 'hours' : 'weekend'; - $('#type').val(type); - }); - - $('#restDayBox').toggleClass('hidden', $('[name=weekend]:checked').val() != 1) - $('[name=weekend]').change(function() - { - $('#restDayBox').toggleClass('hidden', $(this).val() != 1) - }) -}) diff --git a/module/custom/js/mode.js b/module/custom/js/mode.js deleted file mode 100644 index d2b43de9d4..0000000000 --- a/module/custom/js/mode.js +++ /dev/null @@ -1,33 +0,0 @@ -$(function() -{ - $('#modeTab').addClass('btn-active-text'); - - $('#useLight, #useALM').click(function() - { - var selectedMode = $(this).data('mode'); - $('#mode').val(selectedMode); - - if(selectedMode == 'light' && hasProgram) - { - $('#selectProgramModal').modal('show'); - } - else - { - bootbox.confirm(changeModeTips, function(result) - { - if(result) $('#modeForm').submit(); - }); - } - - return false; - }) - - $(document).on('click', '.btn-save', function() - { - setTimeout(function() - { - $('#selectProgramModal').modal('hide'); - $('#modeForm').submit(); - }, 1000); - }); -}) diff --git a/module/custom/js/set.js b/module/custom/js/set.js deleted file mode 100644 index c859aec690..0000000000 --- a/module/custom/js/set.js +++ /dev/null @@ -1,60 +0,0 @@ -function addItem(clickedButton) -{ - $(clickedButton).parent().parent().after(itemRow); -} - -function delItem(clickedButton) -{ - $(clickedButton).parent().parent().remove(); -} - -$('[name*=unitList]').change(function() -{ - var defaultCurrency = $('#defaultCurrency').val(); - $('#defaultCurrency').empty().append(''); - $('[name*=unitList]').each(function() - { - if($(this).prop('checked')) - { - var text = $(this).parent().html(); - var firstStr = $(this).val() + '">'; - - text = text.substring(text.lastIndexOf(firstStr) + firstStr.length, text.lastIndexOf('<')); - $('#defaultCurrency').append("'); - } - }); - - $('#defaultCurrency').val(defaultCurrency); - $("#defaultCurrency").trigger("chosen:updated"); -}); - -$('#submit').click(function() -{ - if(module == 'testcase' && field == 'review' && stopSubmit && oldNeedReview) - { - var needReview = $('input:radio[name="needReview"]:checked').val(); - stopSubmit = false; - - if(needReview == 0) - { - $.post(createLink('testcase', 'ajaxGetReviewCount'), function(count) - { - if(count == 0) - { - $('#submit').click(); - return true; - } - - bootbox.confirm(confirmReviewCase, function(result) - { - if(result) $('#submit').append(""); - $('#submit').click(); - }) - }) - - return false; - } - } -}) - -$('[name*=unitList]').change(); diff --git a/module/dept/css/browse.css b/module/dept/css/browse.css deleted file mode 100644 index 2ccff1509d..0000000000 --- a/module/dept/css/browse.css +++ /dev/null @@ -1,10 +0,0 @@ -.table.table-form {width: auto;} -.table-form > tbody > tr > td .form-control + .form-control {margin-top: 5px;} - -.tree li.has-list > .tree-actions > .tree-action[data-type="delete"] {display: none;} -.tree-toggle {cursor: pointer;} -.tree-actions, .tree li.hover > .tree-actions {opacity: 1;} - -#addChildModal form > .form-control {margin-bottom: 8px;} -#addChildModal .modal-dialog {max-width: 360px;} -#deptTree li {padding-left: 20px;} diff --git a/module/design/css/browse.css b/module/design/css/browse.css deleted file mode 100644 index b3ee542a8e..0000000000 --- a/module/design/css/browse.css +++ /dev/null @@ -1,3 +0,0 @@ -#featurebar {display:inline-block;} -#querybox #searchform {border-bottom: 1px solid #ddd; margin-bottom: 20px;} -#designTable td {white-space:nowrap; text-overflow:ellipsis; overflow: hidden} diff --git a/module/design/css/edit.css b/module/design/css/edit.css deleted file mode 100644 index 42a2a6d11f..0000000000 --- a/module/design/css/edit.css +++ /dev/null @@ -1,2 +0,0 @@ -.tabs .tab-pane .table{border: 1px solid #ddd; border-top: none} -#short-content{max-width: 54%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} diff --git a/module/design/css/linkcommit.css b/module/design/css/linkcommit.css deleted file mode 100644 index 006029f60f..0000000000 --- a/module/design/css/linkcommit.css +++ /dev/null @@ -1,9 +0,0 @@ -#mainContent {min-height: 350px;} -.searchBox{min-height: 45px;} -.searchBox .srearch-date{float: left; width: 20%} -.searchBox h4{float:left;display: inline-block} -.searchBox span{float:left;line-height:30px} -.body-modal .main-header {z-index: 5;} -#logForm .table thead th{background: #efefef} -#begin{margin-right:5px} -#end{margin-left:5px} diff --git a/module/design/css/viewcommit.css b/module/design/css/viewcommit.css deleted file mode 100644 index f14cfda20e..0000000000 --- a/module/design/css/viewcommit.css +++ /dev/null @@ -1,2 +0,0 @@ -#mainContent .pull-right{margin-bottom: 10px} -.table{border: 1px solid #ddd;} diff --git a/module/design/js/batchcreate.js b/module/design/js/batchcreate.js deleted file mode 100644 index 169bc7dcd8..0000000000 --- a/module/design/js/batchcreate.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active'); -}) diff --git a/module/design/js/browse.js b/module/design/js/browse.js deleted file mode 100644 index 9abbb03273..0000000000 --- a/module/design/js/browse.js +++ /dev/null @@ -1,28 +0,0 @@ -$(function() -{ - $('#subNavbar .nav li').removeClass('active'); - $('#subNavbar .nav li[data-id=' + type + ']').addClass('active'); - - $('#subNavbar .nav li > a').each(function() - { - var type = $(this).parent().attr('data-id'); - if(type == 'bysearch') return; - if(type == 'more') - { - $(this).attr('href', '###'); - return; - } - - type = type == 'all' ? type : type.toLowerCase(); - var href = createLink('design', 'browse', 'projectID=' + projectID + '&productID=' + productID + '&type=' + type); - $(this).attr('href', href); - }); - - if($('#subNavbar .dropdown-menu li[data-id=' + type +']').hasClass('active')) - { - var typeName = $('#subNavbar li[data-id=' + type +'] > a').html(); - - $('#subNavbar').find(".dropdown-hover > a").html(typeName + ""); - $("#subNavbar li[data-id='more']").addClass('active'); - } -}) diff --git a/module/design/js/create.js b/module/design/js/create.js deleted file mode 100644 index 169bc7dcd8..0000000000 --- a/module/design/js/create.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active'); -}) diff --git a/module/design/js/edit.js b/module/design/js/edit.js deleted file mode 100644 index 169bc7dcd8..0000000000 --- a/module/design/js/edit.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active'); -}) diff --git a/module/design/js/linkcommit.js b/module/design/js/linkcommit.js deleted file mode 100644 index 69af091bdf..0000000000 --- a/module/design/js/linkcommit.js +++ /dev/null @@ -1,34 +0,0 @@ -$('#begin, #end, #repo').change(function() -{ - var begin = $('#begin').val(); - var end = $('#end').val(); - var repo = $('#repo').val(); - - if(begin.indexOf('-') != -1) - { - var beginarray = begin.split("-"); - var begin = ''; - for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i]; - } - if(end.indexOf('-') != -1) - { - var endarray = end.split("-"); - var end = ''; - for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i]; - } - - if(begin > end) - { - alert(errorDate); - location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo); - die; - } - - location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo + '&begin=' + begin + '&end=' + end); -}) - -$(function() -{ - $('#subNavbar .nav li').removeClass('active'); - $('#subNavbar .nav li[data-id=' + type + ']').addClass('active'); -}) diff --git a/module/design/js/view.js b/module/design/js/view.js deleted file mode 100644 index 07bfc10662..0000000000 --- a/module/design/js/view.js +++ /dev/null @@ -1,19 +0,0 @@ -$(function() -{ - $('#subNavbar .nav li[data-id=' + type.toLowerCase() + ']').addClass('active'); - $('#linkCommit').click(function() - { - if(repos.length == 0) - { - var onlybody = config.onlybody; - config.onlybody = 'no'; - - var link = createLink('repo', 'create', 'objectID=' + projectID); - - config.onlybody = onlybody; - window.parent.$.apps.open(link, 'project'); - - return false; - } - }); -}) diff --git a/module/design/js/viewcommit.js b/module/design/js/viewcommit.js deleted file mode 100644 index 6d486b3137..0000000000 --- a/module/design/js/viewcommit.js +++ /dev/null @@ -1,18 +0,0 @@ -$(function() -{ - $('#linkCommit').click(function() - { - if(repos.length == 0) - { - var onlybody = config.onlybody; - config.onlybody = 'no'; - - var link = createLink('repo', 'create', 'objectID=' + projectID); - - config.onlybody = onlybody; - window.parent.$.apps.open(link, 'project'); - - return false; - } - }); -}); diff --git a/module/dev/css/api.css b/module/dev/css/api.css deleted file mode 100644 index 31e4460e2b..0000000000 --- a/module/dev/css/api.css +++ /dev/null @@ -1,9 +0,0 @@ -#sidebar .module-tree, #mainContent .module-content {overflow-y: auto;} -#mainContent .module-col {padding: 0;} -#mainContent .module-content {padding: 10px; padding-right: 0; margin-right: 0;} - -/* module-tree. */ -#moduleTree.tree ul {margin-bottom: 0;} -#moduleTree .active {background-color: #fff;} -#menuTree > li.has-list > ul > li {padding-left: 10px;} -#menuTree > li.has-list > ul > li.has-list {padding-left: 15px;} diff --git a/module/dev/css/db.css b/module/dev/css/db.css deleted file mode 100644 index 6708343afd..0000000000 --- a/module/dev/css/db.css +++ /dev/null @@ -1,9 +0,0 @@ -#sidebar .module-tree, #mainContent .module-content {overflow-y: auto;} -#mainContent .module-col {padding: 0;} -#mainContent .module-content {padding: 10px; padding-right: 0; margin-right: 0;} - -/* module-tree. */ -#tableTree.tree ul {margin-bottom: 0;} -#tableTree .active {background-color: #fff;} -#tableTree > li.has-list > ul > li {padding-left: 10px;} -#tableTree > li.has-list > ul > li.has-list {padding-left: 15px;} diff --git a/module/dev/css/langitem.css b/module/dev/css/langitem.css deleted file mode 100644 index 640a09de0b..0000000000 --- a/module/dev/css/langitem.css +++ /dev/null @@ -1,44 +0,0 @@ -.flex {display: flex;} -.flex-1 {flex: 1;} -.align-center {align-items: center;} -.justify-center {justify-content: center;} -.reset-btn {margin-left: 20px;} -.title {font-size: 13px; color: #313C52; font-weight: 700; height: 40px; padding-left: 40px;} -.h-full {height: 100%;} -.flex-center {display: flex; justify-content: center; align-items: center;} -[lang ^= zh-cn] .form-item-content > .form-item > .label {flex: 0 0 160px;} - -/* menu-tree */ -.menu-tree {flex: 0 0 200px; background: #fff; padding: 10px 10px; overflow: hidden;} -.menu-tree > .tree {padding-top: 20px;} -.tree ul {margin-bottom: 0;} -#menuTree > li.has-list > ul > li {padding-left: 10px;} -#menuTree > li.has-list > ul > li.has-list {padding-left: 15px;} - -/* main-box */ -.flex.main-box {gap: 15px;} - -/* title-content */ -.title-content {gap: 20px;} -.title-content > .title {margin-left: 44px; width: 160px;} -.title-content > .title.title-input {padding-left: unset; text-align: center; width: 220px;} - -/* form-content */ -.form-item-content {padding-left: 44px;} -.form-item-content > .form-item {gap: 64px; height: 56px; align-items: center; position: relative; width: 500px;} -.form-item-content > .form-item.w-expand {width: 700px;} -.form-item-content > .form-item > .label {flex: 0 0 180px; padding-left: 40px; background: #F8F8F8; display: flex; align-items: center; color: currentColor; font-size: 13px; overflow: hidden;} -.form-item-content > .form-item > .label.lg {flex: 0 0 180px;} -.form-item-content > .form-item > .input-group {margin-left: 20px; width:180px; height:32px;} -.form-item-content > .form-item > .input-group > .input-group-addon {flex: 1 1 30%; overflow: hidden;} -.form-item-content > .form-item > .input-control > input {margin-left: 40px;} -.form-item-content > .form-item.active .icon {display: unset;} -.form-item-content > .form-item .icon {display: none; position: absolute; left: -50px; top: 2px; font-size: 25px;} -.form-item-content.hover-color-primary > .form-item.active > .label {color: blue;} -.form-item-content.hover-color-primary > .form-item.active .form-control {border-color: blue;} -.form-item-content.border-color-primary > .form-item .form-control {border: 1px solid blue;} - -#menuTree > li > a, #menuTree > li > ul > li > a {white-space: nowrap; text-overflow: clip; overflow: hidden;} - -/* bottom-btn */ -.bottom-btn {display: flex; align-items: center; background: #fff; padding-left: 150px; padding-bottom: 20px;} diff --git a/module/dev/css/restapi.css b/module/dev/css/restapi.css deleted file mode 100644 index 4f3ae26edb..0000000000 --- a/module/dev/css/restapi.css +++ /dev/null @@ -1,165 +0,0 @@ -.split-row > .side-col, -.split-row > .main-col {padding: 0;} -.col-spliter {width: 20px; position: relative; z-index: 10; cursor: ew-resize;} -.col-spliter:before, -.col-spliter:after {content: ''; display: block; position: absolute; left: 50%; width: 10px; margin-left: -5px; top: 0; bottom: 0; background: rgba(0,0,0,.075); opacity: 0; transition: opacity .2s;} -.col-spliter:before {border-radius: 5px;} -.col-spliter:after {background: transparent; top: 50%; bottom: auto; height: 20px; opacity: 1; width: 4px; border-left: 1px solid rgba(0,0,0,.2); border-right: rgba(0,0,0,.2) 1px solid; margin-left: -2px; margin-top: -10px;} -/* .col-spliter:hover:after {width: 2px; background: rgba(0,0,0,.15); margin-left: -1px; top: 0; bottom: 20px; height: auto; margin-top: auto; border: none;} */ -.row-spliting .col-spliter:after, -.col-spliter:hover:after {border-color: rgba(0,0,0,.3);} -.col-spliter:hover:before, -.col-spliter:hover:after, -.row-spliting .col-spliter:before, -.row-spliting .col-spliter:after {opacity: 1;} - -@media (max-width: 720px) -{ - .split-row > .side-col, - .split-row > .main-col {width: 100% !important;} -} - -.side-col .tab-content {margin-right: -5px;} -.side-col .cell .nav a.setting {padding: 8px;} -.side-footer {padding: 8px; margin: 0 5px; border-top: 1px solid #ddd;} -.col-sm-size .col-sm-5, -.col-sm-size .col-sm-7 {width: 100%;} -.col-sm-size .table .c-user, -.col-sm-size .table .c-num, -.col-md-size .table .c-datetime {display: none;} -.col-prefix {width: 10%; padding: 0;} - -.table-files .btn {padding: 0 6px;} - -#docsTree li > a > .icon {opacity: .65;} - -.files-grid {padding: 0 10px;} -.files-grid .col {width: 20%; text-align: center; padding: 0; margin-bottom: 10px;} -.files-grid .actions {background: #E9F2FB; z-index: 10; opacity: 0; transition: opacity .2s; padding-bottom: 8px; border-radius: 0 0 3px 3px; padding-top: 8px;} -.files-grid .col:hover .actions {opacity: 1;} -.files-grid .file {padding: 10px; cursor: pointer; display: block; border-radius: 2px; transition: background-color .2s; border-radius: 3px 3px 0 0;} -.files-grid .col:hover .file {background-color: #E9F2FB;} -.files-grid .file-icon {font-size: 54px; width: 64px; height: 64px; display: block; margin: 0 auto 8px; line-height: 64px; color: #8E939A;} -.files-grid .file-name, -.files-grid .file-info {text-overflow: ellipsis; white-space: nowrap; overflow: hidden; line-height: 20px;} -.files-grid .file-info {font-size: 12px; margin-top: 3px;} -.files-grid .icon-folder {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MnB4IiBoZWlnaHQ9IjQ2cHgiIHZpZXdCb3g9IjAgMCA1MiA0NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5pY29uLWJpZy1mb2xkZXJpY29uLWJpZy1mb2xkZXI8L3RpdGxlPiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4gICAgPGRlZnM+PC9kZWZzPiAgICA8ZyBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJ3ZWItbWF4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTA5NS4wMDAwMDAsIC02OTUuMDAwMDAwKSI+ICAgICAgICAgICAgPGcgaWQ9Ijgt5paH5qGjIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDkwLjAwMDAwMCwgNTgzLjAwMDAwMCkiPiAgICAgICAgICAgICAgICA8ZyBpZD0iaWNvbi1iaWctZm9sZGVyIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1LjAwMDAwMCwgMTEyLjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIxLjA0NTY4OTEsNC4yNzAyMzU0MiBDMjEuOTYxODA1OSw1LjEwNzIwMzY1IDIzLjAyMjcwMDQsNS41NTc5NjY1OSAyNC4zNjg4OTQ0LDUuNTI1MDEyMTggTDI2LjE2MDIzOCw1LjUyNTAxMjE4IEwzMC44MTIxMDExLDUuNTI1MDEyMTggQzI5LjYwMDkxMDksNS41MjUwMTIxOCAyOC40Mzg1MTg2LDUuMDM1NzUxMTMgMjcuNTc3MDQ3LDQuMTg1ODk1OTMgTDI0LjY3ODE1NjYsMS4zMjY0MDI3MSBDMjMuODE2NTgwOCwwLjQ3NjU0NzUxMSAyMi42NTQyOTI3LDAgMjEuNDQzMTAyNSwwIEwxNS4xMTQ5MDQ2LDAgTDE1LDAgQzE2LjIyNjg2NzksMC4wMzk0MzcwODA1IDE3LjMwMjA1NTcsMC41NTY4NjUwODcgMTguMTYzNTI3MywxLjQwNjYxNjIyIEwyMS4wNDU2ODkxLDQuMjcwMjM1NDIgWiIgaWQ9IlNoYXBlLUNvcHktNyIgZmlsbD0iI0ZGQzg1QSI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ5LjMxMDMyMDMsNS41MjAwMjkxOCBMMzguNTUxNzAzMSw1LjUyMDAyOTE4IEwzNi44MDY4NTk0LDUuNTIwMDI5MTggTDMyLjI3NTc1LDUuNTIwMDI5MTggTDMwLjUzMDkwNjMsNS41MjAwMjkxOCBMMjYsNS41MjAwMjkxOCBMMjQuMjU1MTU2Miw1LjUyMDAyOTE4IEMyMy4wNzU0MDYzLDUuNTIwMDI5MTggMjEuOTQzMTg3NSw1LjA0MjgxMzM1IDIxLjEwNDA3ODEsNC4xOTE3NjYzIEwxOC4yODA0Mzc1LDEuMzI4MjYyODggQzE3LjQ0MTIyNjYsMC40NzcyMTU4MjkgMTYuMzA5MTA5NCwwIDE1LjEyOTM1OTQsMCBMOC45NjU1MzEyNSwwIEwyLjY4OTY3OTY5LDAgQzEuMjA0MjI2NTYsNy40MDUxNTkyM2UtMTYgMCwxLjIzNTcxNjk5IDAsMi43NjAwMTQ1OSBMMCw4LjI4MDA0Mzc3IEwwLDkuMjAwMDgzMzcgTDAsNDMuMjM5OTg1NCBDMCw0NC43NjQyODMgMS4yMDQyMjY1Niw0NiAyLjY4OTY3OTY5LDQ2IEw0OS4zMTAzMjAzLDQ2IEM1MC43OTU3NzM0LDQ2IDUyLDQ0Ljc2NDI4MyA1Miw0My4yMzk5ODU0IEw1Miw4LjI4MDA0Mzc3IEM1Miw2Ljc1NTY0MTk1IDUwLjc5NTc3MzQsNS41MjAwMjkxOCA0OS4zMTAzMjAzLDUuNTIwMDI5MTggTDQ5LjMxMDMyMDMsNS41MjAwMjkxOCBaIiBpZD0iU2hhcGUtQ29weS04IiBmaWxsPSIjRkZFMDY2Ij48L3BhdGg+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=) no-repeat center;} -.files-grid .icon-paper-clip {background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iNTJweCIgaGVpZ2h0PSI0NnB4IiB2aWV3Qm94PSIwIDAgNTIgNDYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDQ5LjEgKDUxMTQ3KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT5pY29uLWJpZy1lbmNsb3NlaWNvbi1iaWctZW5jbG9zZTwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmiYDmnIlJQ09OIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTQwNC4wMDAwMDAsIC02OTUuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSI4LeaWh+ahoyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTA5MC4wMDAwMDAsIDU4My4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC03LUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMxNC4wMDAwMDAsIDExMi4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0iaWNvbi1iaWctZm9sZGVyIj4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIxLjA0NTY4OTEsNC4yNzAyMzU0MiBDMjEuOTYxODA1OSw1LjEwNzIwMzY1IDIzLjAyMjcwMDQsNS41NTc5NjY1OSAyNC4zNjg4OTQ0LDUuNTI1MDEyMTggTDI2LjE2MDIzOCw1LjUyNTAxMjE4IEwzMC44MTIxMDExLDUuNTI1MDEyMTggQzI5LjYwMDkxMDksNS41MjUwMTIxOCAyOC40Mzg1MTg2LDUuMDM1NzUxMTMgMjcuNTc3MDQ3LDQuMTg1ODk1OTMgTDI0LjY3ODE1NjYsMS4zMjY0MDI3MSBDMjMuODE2NTgwOCwwLjQ3NjU0NzUxMSAyMi42NTQyOTI3LDAgMjEuNDQzMTAyNSwwIEwxNS4xMTQ5MDQ2LDAgTDE1LDAgQzE2LjIyNjg2NzksMC4wMzk0MzcwODA1IDE3LjMwMjA1NTcsMC41NTY4NjUwODcgMTguMTYzNTI3MywxLjQwNjYxNjIyIEwyMS4wNDU2ODkxLDQuMjcwMjM1NDIgWiIgaWQ9IlNoYXBlLUNvcHktNyIgZmlsbD0iI0ZGQzg1QSI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNDkuMzEwMzIwMyw1LjUyMDAyOTE4IEwzOC41NTE3MDMxLDUuNTIwMDI5MTggTDM2LjgwNjg1OTQsNS41MjAwMjkxOCBMMzIuMjc1NzUsNS41MjAwMjkxOCBMMzAuNTMwOTA2Myw1LjUyMDAyOTE4IEwyNiw1LjUyMDAyOTE4IEwyNC4yNTUxNTYyLDUuNTIwMDI5MTggQzIzLjA3NTQwNjMsNS41MjAwMjkxOCAyMS45NDMxODc1LDUuMDQyODEzMzUgMjEuMTA0MDc4MSw0LjE5MTc2NjMgTDE4LjI4MDQzNzUsMS4zMjgyNjI4OCBDMTcuNDQxMjI2NiwwLjQ3NzIxNTgyOSAxNi4zMDkxMDk0LDAgMTUuMTI5MzU5NCwwIEw4Ljk2NTUzMTI1LDAgTDIuNjg5Njc5NjksMCBDMS4yMDQyMjY1Niw3LjQwNTE1OTIzZS0xNiAwLDEuMjM1NzE2OTkgMCwyLjc2MDAxNDU5IEwwLDguMjgwMDQzNzcgTDAsOS4yMDAwODMzNyBMMCw0My4yMzk5ODU0IEMwLDQ0Ljc2NDI4MyAxLjIwNDIyNjU2LDQ2IDIuNjg5Njc5NjksNDYgTDQ5LjMxMDMyMDMsNDYgQzUwLjc5NTc3MzQsNDYgNTIsNDQuNzY0MjgzIDUyLDQzLjIzOTk4NTQgTDUyLDguMjgwMDQzNzcgQzUyLDYuNzU1NjQxOTUgNTAuNzk1NzczNCw1LjUyMDAyOTE4IDQ5LjMxMDMyMDMsNS41MjAwMjkxOCBMNDkuMzEwMzIwMyw1LjUyMDAyOTE4IFoiIGlkPSJTaGFwZS1Db3B5LTgiIGZpbGw9IiNGRkUwNjYiPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICA8L2c+CiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNi41MDAwMDAsIDI2LjUwMDAwMCkgcm90YXRlKDQ1LjAwMDAwMCkgdHJhbnNsYXRlKC0yNi41MDAwMDAsIC0yNi41MDAwMDApIHRyYW5zbGF0ZSgyMC4wMDAwMDAsIDE0LjAwMDAwMCkiIGZpbGw9IiNGRkE5MjkiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yLjUsMTguMjUgQzIuNSwxOC45NDAzNTU5IDEuOTQwMzU1OTQsMTkuNSAxLjI1LDE5LjUgQzAuNTU5NjQ0MDYzLDE5LjUgMCwxOC45NDAzNTU5IDAsMTguMjUgTDAsNi4yNSBDMCwyLjc5ODIyMDMxIDIuNzk4MjIwMzEsMCA2LjI1LDAgQzkuNzAxNzc5NjksMCAxMi41LDIuNzk4MjIwMzEgMTIuNSw2LjI1IEwxMi41LDIwLjI1IEMxMi41LDIwLjk0MDM1NTkgMTEuOTQwMzU1OSwyMS41IDExLjI1LDIxLjUgQzEwLjU1OTY0NDEsMjEuNSAxMCwyMC45NDAzNTU5IDEwLDIwLjI1IEwxMCw2LjI1IEMxMCw0LjE3ODkzMjE5IDguMzIxMDY3ODEsMi41IDYuMjUsMi41IEM0LjE3ODkzMjE5LDIuNSAyLjUsNC4xNzg5MzIxOSAyLjUsNi4yNSBMMi41LDE4LjI1IFoiIGlkPSJSZWN0YW5nbGUtMzciPjwvcGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTYsNS43NSBDNiw1LjA1OTY0NDA2IDYuNTU5NjQ0MDYsNC41IDcuMjUsNC41IEM3Ljk0MDM1NTk0LDQuNSA4LjUsNS4wNTk2NDQwNiA4LjUsNS43NSBMOC41LDIwLjI1IEM4LjUsMjIuNTk3MjEwMiA2LjU5NzIxMDE5LDI0LjUgNC4yNSwyNC41IEMxLjkwMjc4OTgxLDI0LjUgMCwyMi41OTcyMTAyIDAsMjAuMjUgTDAsOC4yNSBDMCw3LjU1OTY0NDA2IDAuNTU5NjQ0MDYzLDcgMS4yNSw3IEMxLjk0MDM1NTk0LDcgMi41LDcuNTU5NjQ0MDYgMi41LDguMjUgTDIuNSwyMC4yNSBDMi41LDIxLjIxNjQ5ODMgMy4yODM1MDE2OSwyMiA0LjI1LDIyIEM1LjIxNjQ5ODMxLDIyIDYsMjEuMjE2NDk4MyA2LDIwLjI1IEw2LDUuNzUgWiIgaWQ9IlJlY3RhbmdsZS0zNy1Db3B5Ij48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=') no-repeat center;} -.files-grid .icon-product {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MnB4IiBoZWlnaHQ9IjQ2cHgiIHZpZXdCb3g9IjAgMCA1MiA0NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5Hcm91cCA4PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IlBhZ2UtMiIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICAgICAgICA8ZyBpZD0iR3JvdXAtOCI+ICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLUNvcHktMiI+ICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMS4wNDU2ODkxLDQuMjcwMjM1NDIgQzIxLjk2MTgwNTksNS4xMDcyMDM2NSAyMy4wMjI3MDA0LDUuNTU3OTY2NTkgMjQuMzY4ODk0NCw1LjUyNTAxMjE4IEwyNi4xNjAyMzgsNS41MjUwMTIxOCBMMzAuODEyMTAxMSw1LjUyNTAxMjE4IEMyOS42MDA5MTA5LDUuNTI1MDEyMTggMjguNDM4NTE4Niw1LjAzNTc1MTEzIDI3LjU3NzA0Nyw0LjE4NTg5NTkzIEwyNC42NzgxNTY2LDEuMzI2NDAyNzEgQzIzLjgxNjU4MDgsMC40NzY1NDc1MTEgMjIuNjU0MjkyNywwIDIxLjQ0MzEwMjUsMCBMMTUuMTE0OTA0NiwwIEwxNSwwIEMxNi4yMjY4Njc5LDAuMDM5NDM3MDgwNSAxNy4zMDIwNTU3LDAuNTU2ODY1MDg3IDE4LjE2MzUyNzMsMS40MDY2MTYyMiBMMjEuMDQ1Njg5MSw0LjI3MDIzNTQyIFoiIGlkPSJTaGFwZSIgZmlsbD0iI0ZGQzg1QSI+PC9wYXRoPiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNNDkuMzEwMzIwMyw1LjUyMDAyOTE4IEwzOC41NTE3MDMxLDUuNTIwMDI5MTggTDM2LjgwNjg1OTQsNS41MjAwMjkxOCBMMzIuMjc1NzUsNS41MjAwMjkxOCBMMzAuNTMwOTA2Myw1LjUyMDAyOTE4IEwyNiw1LjUyMDAyOTE4IEwyNC4yNTUxNTYyLDUuNTIwMDI5MTggQzIzLjA3NTQwNjMsNS41MjAwMjkxOCAyMS45NDMxODc1LDUuMDQyODEzMzUgMjEuMTA0MDc4MSw0LjE5MTc2NjMgTDE4LjI4MDQzNzUsMS4zMjgyNjI4OCBDMTcuNDQxMjI2NiwwLjQ3NzIxNTgyOSAxNi4zMDkxMDk0LDAgMTUuMTI5MzU5NCwwIEw4Ljk2NTUzMTI1LDAgTDIuNjg5Njc5NjksMCBDMS4yMDQyMjY1Niw3LjQwNTE1OTIzZS0xNiAwLDEuMjM1NzE2OTkgMCwyLjc2MDAxNDU5IEwwLDguMjgwMDQzNzcgTDAsOS4yMDAwODMzNyBMMCw0My4yMzk5ODU0IEMwLDQ0Ljc2NDI4MyAxLjIwNDIyNjU2LDQ2IDIuNjg5Njc5NjksNDYgTDQ5LjMxMDMyMDMsNDYgQzUwLjc5NTc3MzQsNDYgNTIsNDQuNzY0MjgzIDUyLDQzLjIzOTk4NTQgTDUyLDguMjgwMDQzNzcgQzUyLDYuNzU1NjQxOTUgNTAuNzk1NzczNCw1LjUyMDAyOTE4IDQ5LjMxMDMyMDMsNS41MjAwMjkxOCBMNDkuMzEwMzIwMyw1LjUyMDAyOTE4IFoiIGlkPSJTaGFwZSIgZmlsbD0iI0ZGRTA2NiI+PC9wYXRoPiAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8ZyBpZD0iR3JvdXAtNSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTYuMDAwMDAwLCAxNS4wMDAwMDApIiBmaWxsPSIjRjc5MTJBIj4gICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLDIuNzc3MDUzNjEgTDIuNjQ1NDU5NTgsNi40NzI0OTI4NyBMMy4wOTU2OTA0OSwxNC4zMTU5ODk5IEwxMCwxOS4wNzAyNDUzIEwxNi45MDQzMDk1LDE0LjMxNTk4OTkgTDE3LjM1NDU0MDQsNi40NzI0OTI4NyBMMTAsMi43NzcwNTM2MSBaIE0xMC40NDg5Nzg3LDAuMTA2MDUxOTIzIEwxOS40NDg5Mzk4LDQuNjI4MjY2NDcgQzE5LjgwNTI4MTIsNC44MDczMTc0NyAyMC4wMjExNzE3LDUuMTgwOTc1NTggMTkuOTk4MzE3Nyw1LjU3OTExNjQxIEwxOS40NDM3Mzc4LDE1LjI0MDQ4MjQgQzE5LjQyNjAzOTcsMTUuNTQ4ODAyNiAxOS4yNjY4NzgxLDE1LjgzMTY0ODIgMTkuMDEyNTIwOSwxNi4wMDY3OTY2IEwxMC41NjcxMzk3LDIxLjgyMjIyMjQgQzEwLjIyNTYxNTIsMjIuMDU3MzkzNiA5Ljc3NDM4NDc3LDIyLjA1NzM5MzYgOS40MzI4NjAzNSwyMS44MjIyMjI0IEwwLjk4NzQ3OTA5OCwxNi4wMDY3OTY2IEMwLjczMzEyMTk0NywxNS44MzE2NDgyIDAuNTczOTYwMzA2LDE1LjU0ODgwMjYgMC41NTYyNjIxNzMsMTUuMjQwNDgyNCBMMC4wMDE2ODIyOTQ2OSw1LjU3OTExNjQxIEMtMC4wMjExNzE3MDg3LDUuMTgwOTc1NTggMC4xOTQ3MTg4MjcsNC44MDczMTc0NyAwLjU1MTA2MDE4Myw0LjYyODI2NjQ3IEw5LjU1MTAyMTMxLDAuMTA2MDUxOTIzIEM5LjgzMzUxMjMxLC0wLjAzNTg5MTQ1NTcgMTAuMTY2NDg3NywtMC4wMzU4OTE0NTU3IDEwLjQ0ODk3ODcsMC4xMDYwNTE5MjMgWiIgaWQ9IlBvbHlnb24iIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPiAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgeD0iOC41IiB5PSIxMSIgd2lkdGg9IjMiIGhlaWdodD0iOSI+PC9yZWN0PiAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTMiIGZpbGwtcnVsZT0iZXZlbm9kZCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNi4wODAxMjcsIDguNzk5MDM4KSByb3RhdGUoMTIwLjAwMDAwMCkgdHJhbnNsYXRlKC02LjA4MDEyNywgLTguNzk5MDM4KSAiIHg9IjQuNTgwMTI3MDIiIHk9IjMuNzk5MDM4MTEiIHdpZHRoPSIzIiBoZWlnaHQ9IjEwIj48L3JlY3Q+ICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtMyIgZmlsbC1ydWxlPSJldmVub2RkIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxNC4wODAxMjcsIDguNzk5MDM4KSBzY2FsZSgtMSwgMSkgcm90YXRlKDEyMC4wMDAwMDApIHRyYW5zbGF0ZSgtMTQuMDgwMTI3LCAtOC43OTkwMzgpICIgeD0iMTIuNTgwMTI3IiB5PSIzLjc5OTAzODExIiB3aWR0aD0iMyIgaGVpZ2h0PSIxMCI+PC9yZWN0PiAgICAgICAgICAgIDwvZz4gICAgICAgIDwvZz4gICAgPC9nPjwvc3ZnPg==) no-repeat center;} -.files-grid .icon-execution {background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MnB4IiBoZWlnaHQ9IjQ2cHgiIHZpZXdCb3g9IjAgMCA1MiA0NiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4gICAgICAgIDx0aXRsZT5Hcm91cCA5PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPjwvZGVmcz4gICAgPGcgaWQ9IlBhZ2UtMiIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+ICAgICAgICA8ZyBpZD0iR3JvdXAtOSI+ICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLUNvcHkiPiAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMjEuMDQ1Njg5MSw0LjI3MDIzNTQyIEMyMS45NjE4MDU5LDUuMTA3MjAzNjUgMjMuMDIyNzAwNCw1LjU1Nzk2NjU5IDI0LjM2ODg5NDQsNS41MjUwMTIxOCBMMjYuMTYwMjM4LDUuNTI1MDEyMTggTDMwLjgxMjEwMTEsNS41MjUwMTIxOCBDMjkuNjAwOTEwOSw1LjUyNTAxMjE4IDI4LjQzODUxODYsNS4wMzU3NTExMyAyNy41NzcwNDcsNC4xODU4OTU5MyBMMjQuNjc4MTU2NiwxLjMyNjQwMjcxIEMyMy44MTY1ODA4LDAuNDc2NTQ3NTExIDIyLjY1NDI5MjcsMCAyMS40NDMxMDI1LDAgTDE1LjExNDkwNDYsMCBMMTUsMCBDMTYuMjI2ODY3OSwwLjAzOTQzNzA4MDUgMTcuMzAyMDU1NywwLjU1Njg2NTA4NyAxOC4xNjM1MjczLDEuNDA2NjE2MjIgTDIxLjA0NTY4OTEsNC4yNzAyMzU0MiBaIiBpZD0iU2hhcGUiIGZpbGw9IiNGRkM4NUEiPjwvcGF0aD4gICAgICAgICAgICAgICAgPHBhdGggZD0iTTQ5LjMxMDMyMDMsNS41MjAwMjkxOCBMMzguNTUxNzAzMSw1LjUyMDAyOTE4IEwzNi44MDY4NTk0LDUuNTIwMDI5MTggTDMyLjI3NTc1LDUuNTIwMDI5MTggTDMwLjUzMDkwNjMsNS41MjAwMjkxOCBMMjYsNS41MjAwMjkxOCBMMjQuMjU1MTU2Miw1LjUyMDAyOTE4IEMyMy4wNzU0MDYzLDUuNTIwMDI5MTggMjEuOTQzMTg3NSw1LjA0MjgxMzM1IDIxLjEwNDA3ODEsNC4xOTE3NjYzIEwxOC4yODA0Mzc1LDEuMzI4MjYyODggQzE3LjQ0MTIyNjYsMC40NzcyMTU4MjkgMTYuMzA5MTA5NCwwIDE1LjEyOTM1OTQsMCBMOC45NjU1MzEyNSwwIEwyLjY4OTY3OTY5LDAgQzEuMjA0MjI2NTYsNy40MDUxNTkyM2UtMTYgMCwxLjIzNTcxNjk5IDAsMi43NjAwMTQ1OSBMMCw4LjI4MDA0Mzc3IEwwLDkuMjAwMDgzMzcgTDAsNDMuMjM5OTg1NCBDMCw0NC43NjQyODMgMS4yMDQyMjY1Niw0NiAyLjY4OTY3OTY5LDQ2IEw0OS4zMTAzMjAzLDQ2IEM1MC43OTU3NzM0LDQ2IDUyLDQ0Ljc2NDI4MyA1Miw0My4yMzk5ODU0IEw1Miw4LjI4MDA0Mzc3IEM1Miw2Ljc1NTY0MTk1IDUwLjc5NTc3MzQsNS41MjAwMjkxOCA0OS4zMTAzMjAzLDUuNTIwMDI5MTggTDQ5LjMxMDMyMDMsNS41MjAwMjkxOCBaIiBpZD0iU2hhcGUiIGZpbGw9IiNGRkUwNjYiPjwvcGF0aD4gICAgICAgICAgICA8L2c+ICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwLTUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE2LjAwMDAwMCwgMTQuMDAwMDAwKSIgZmlsbD0iI0Y3OTEyQSI+ICAgICAgICAgICAgICAgIDxnPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTIuMzAyMjI4ODIsOCBMMi44ODU4ODIzNSw4IEwyLjg4NTg4MjM1LDcuNzAxMjY5NDIgTDIuMzAyMjI4ODIsOCBaIE0yLjg4NTg4MjM1LDcuNzAxMjY5NDIgTDEwLDQuMDYwMDYwNDcgTDE3LjExNDExNzYsNy43MDEyNjk0MiBMMTcuMTE0MTE3Niw2LjcyNzgzMzQ5IEMxNy4xMTQxMTc2LDcuMjMzMTgzNTMgMTcuMzUzNDc1OCw3LjcwMjUzNDMzIDE3Ljc0OTA5MTcsOCBMMjAsOCBMMjAsNi43Mjc4MzM0OSBDMjAsNi4yNDIwNDU1MSAxOS43Mjc5NDE1LDUuNzk3MTc0ODUgMTkuMjk1NTA0OSw1LjU3NTg0MTQgTDEwLjU4OTYyMjUsMS4xMTk5MjE3MyBDMTAuMjE5Mzc5OSwwLjkzMDQyMDk5MyA5Ljc4MDYyMDA2LDAuOTMwNDIwOTkzIDkuNDEwMzc3NDksMS4xMTk5MjE3MyBMMC43MDQ0OTUxMzYsNS41NzU4NDE0IEMwLjI3MjA1ODQ3NSw1Ljc5NzE3NDg1IDcuMDg5NzYzNzJlLTE0LDYuMjQyMDQ1NTEgNy4wOTU3MTI5MWUtMTQsNi43Mjc4MzM0OSBMNy4wOTU3MTI5MWUtMTQsOCBMMi4yNTA5MDgyNyw4IEMyLjY0NjUyNDIsNy43MDI1MzQzMyAyLjg4NTg4MjM1LDcuMjMzMTgzNTMgMi44ODU4ODIzNSw2LjcyNzgzMzQ5IEwyLjg4NTg4MjM1LDcuNzAxMjY5NDIgWiBNMTAuNzI1MjM1NywzLjY4ODg2NDEgQzEwLjI2OTgzNzMsMy45MjE5NTAwMSA5LjczMDE2MjY3LDMuOTIxOTUwMDEgOS4yNzQ3NjQzMSwzLjY4ODg2NDEgTDEwLDQuMDYwMDYwNDcgTDEwLjcyNTIzNTcsMy42ODg4NjQxIFogTTE3LjY5Nzc3MTIsOCBMMTcuMTE0MTE3Niw4IEwxNy4xMTQxMTc2LDcuNzAxMjY5NDIgTDE3LjY5Nzc3MTIsOCBaIE0xNy42OTc3NzEyLDggTDE3LjExNDExNzYsOCBMMTcuMTE0MTE3Niw3LjcwMTI2OTQyIEwxNy42OTc3NzEyLDggWiBNMTcuMTE0MTE3Niw2LjcyNzgzMzQ5IEMxNy4xMTQxMTc2LDcuMjMzMTgzNTMgMTcuMzUzNDc1OCw3LjcwMjUzNDMzIDE3Ljc0OTA5MTcsOCBMMjAsOCBMMjAsNi43Mjc4MzM0OSBDMjAsNi4yNDIwNDU1MSAxOS43Mjc5NDE1LDUuNzk3MTc0ODUgMTkuMjk1NTA0OSw1LjU3NTg0MTQgTDEwLjU4OTYyMjUsMS4xMTk5MjE3MyBDMTAuMjE5Mzc5OSwwLjkzMDQyMDk5MyA5Ljc4MDYyMDA2LDAuOTMwNDIwOTkzIDkuNDEwMzc3NDksMS4xMTk5MjE3MyBMMC43MDQ0OTUxMzYsNS41NzU4NDE0IEMwLjI3MjA1ODQ3NSw1Ljc5NzE3NDg1IDcuMDg5NzYzNzJlLTE0LDYuMjQyMDQ1NTEgNy4wOTU3MTI5MWUtMTQsNi43Mjc4MzM0OSBMNy4wOTU3MTI5MWUtMTQsOCBMMi4yNTA5MDgyNyw4IEMyLjY0NjUyNDIsNy43MDI1MzQzMyAyLjg4NTg4MjM1LDcuMjMzMTgzNTMgMi44ODU4ODIzNSw2LjcyNzgzMzQ5IEwyLjg4NTg4MjM1LDcuNzAxMjY5NDIgTDEwLDQuMDYwMDYwNDcgTDE3LjExNDExNzYsNy43MDEyNjk0MiBMMTcuMTE0MTE3Niw2LjcyNzgzMzQ5IFogTTEwLjcyNTIzNTcsMy42ODg4NjQxIEMxMC4yNjk4MzczLDMuOTIxOTUwMDEgOS43MzAxNjI2NywzLjkyMTk1MDAxIDkuMjc0NzY0MzEsMy42ODg4NjQxIEwxMCw0LjA2MDA2MDQ3IEwxMC43MjUyMzU3LDMuNjg4ODY0MSBaIE0yLjg4NTg4MjM1LDggTDIuMzAyMjI4ODIsOCBMMi44ODU4ODIzNSw3LjcwMTI2OTQyIEwyLjg4NTg4MjM1LDggWiIgaWQ9IlBvbHlnb24iIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPiAgICAgICAgICAgICAgICAgICAgPGcgaWQ9Ikdyb3VwIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgNS4yMzUyOTQpIj4gICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOS40NTU1ODQ1OSw3LjczNTcwNDIgTDAsMi43NjQ3MDU4OCBMMS41NDIyMjMxNywwLjM0MDc0OTg1NSBMMi4yNDk5MTAzNCwwLjY4MjUzOTMzNyBMMTAuMDYzNDk0Niw0Ljg3MDgyMzIxIEwxOC40NjEwOTQ5LDAuMzMzNDQ4ODE5IEwyMCwyLjc2NDcwNTg4IEwxMC42NjU3OTQ1LDcuNzMyNjI3NzggQzEwLjI4Nzc0OTcsNy45MzM4MzM2MyA5LjgzNDY0NzQxLDcuOTM0OTg1NDUgOS40NTU1ODQ1OSw3LjczNTcwNDIgWiIgaWQ9IkNvbWJpbmVkLVNoYXBlIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNOS40NjgwMDk5MywyMi44MzM4ODE0IEwwLjEwNTQ1MjQ3NCwxNy43NTcxMDAxIEwxLjY0MDY4NDI3LDE1LjMzMzE0NCBMMi4zNDUxNjMyNywxNS42NzQ5MzM1IEwxMC4xMjMzMjYyLDIwLjAwNDcyMiBMMTguNDgyODU3NiwxNS40NjczNDc2IEwyMC4wMTQ3ODYzLDE3Ljg5ODYwNDcgTDEwLjc3Njg3MTIsMjIuODM3NjY4NSBDMTAuNTcxNjk3NSwyMi45NDczNjQ4IDEwLjM0NDIwMzUsMjMuMDAxNDUzNSAxMC4xMTcwNDQ3LDIzIEM5Ljg5MzE0MjMzLDIyLjk5ODU2NzMgOS42Njk1NjU2NCwyMi45NDMxNzM1IDkuNDY4MDA5OTMsMjIuODMzODgxNCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiPjwvcGF0aD4gICAgICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC4wMDAwMDAsIDkuNDExNzY1KSI+ICAgICAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTkuMzk3MTI0OSw4LjQ2OTc0MjA4IEwwLjExMDQ5OTM5NSwzLjM3NzQ4OTg4IEwxLjYyODY1MzgsMC45NTM1MzM4NDggTDIuMzI1Mjk2NDIsMS4yOTUzMjMzMyBMMTAuMDE2OTM3Nyw1LjYyNTExMTgzIEwxOC4yODM0ODA1LDEuMDg3NzM3NDQgTDE5Ljc5ODM2ODYsMy41MTg5OTQ1IEwxMC42MzQ4MjUxLDguNDczNDA2NTcgQzEwLjI0ODM3OTcsOC42ODIzNDQyOCA5Ljc4MjMyNjMzLDguNjgwOTY0NDIgOS4zOTcxMjQ5LDguNDY5NzQyMDggWiIgaWQ9IkNvbWJpbmVkLVNoYXBlIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8L2c+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=) no-repeat center;} -.files-grid .icon-product:before, -.files-grid .icon-execution:before, -.files-grid .icon-paper-clip:before, -.files-grid .icon-folder:before {display: none;} -.files-grid .img-holder {height: 64px; line-height: 64px; margin: 0 auto 8px; width: 100%; background-size: contain; background-repeat: no-repeat; background-position: center;} -.files-grid .img-holder > img {max-height: 64px; opacity: 0; width: 100%;} -.files-grid + .table-footer {margin-top: 20px;} - -@keyframes flash-icon -{ - 0% {color: #666;} - 100% {color: #fff;} -} - -.main-col > .panel > .panel-body {padding: 5px 10px;} -.main-col .panel-title a.active {color: #0c64eb;} - -.side-col > .cell {overflow: hidden auto; position: relative;} -.side-col > .cell > header {position: absolute; top: 10px; right: 10px; left: 10px;} -.side-col > .cell > header > .c-sm {padding-right: 20px; width: 60px;} -.side-col .docsTree {position: absolute; top: 53px; left: 0; right: 0; bottom: 0; overflow: auto; padding: 0 10px 10px;} - -td.c-name a {color: #0c60e1;} -td.c-name a:visited {color: #082999;} - -.panel-title.font-normal .btn-group {margin-left: 20px;} - -.querybox-opened {color: #0c64eb; background: rgba(0,0,0,.075);} - -#queryBox #groupAndOr {min-width: 65px;} -#noticeAcl {margin-left: 10px;} - -#pageNav .dropdown-menu {max-height: 350px; overflow-y: auto;} - -ol, ul {margin-bottom: 0} -#subHeader #dropMenu .table-col .list-group {padding-top: 5px;} -#createDropdown ul.dropdown-menu {text-align: left;} -#collection-menu {max-width: 300px;} -#collection-menu li a {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -#project, #product, #custom, #book, #execution {min-height: 160px;} -#title .menu-title {font-size: 15px; font-weight: 600; position: relative; padding: 2px 0 2px 15px; list-style: none;} -#title .dropdown-menu {top: 38px;} -.tree li > a {white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} -.side-col .menu-actions {position: absolute; top: 0; right: 0; padding: 7px 8px;} -.menu-actions i {font-size: 15px; color: #8c8c8c;} -#whiteListBox .chosen-container .chosen-results {max-height: 180px;} - -.c-product, .c-execution, .c-lib {width: 80px !important;} - -.header-btn .btn > .text {text-overflow: unset !important;} - -form .table-data, #content .table-data {border: 1px solid #e2e2e3;} -.table-data thead {background: #f9f9f9;} - -#aclBox .acl-tip {color: #838a9d;} -.lib {width: 130px; margin-bottom: 10px;} -.addbtn {padding-top: 22px; height: 63px; border: 1px dashed #ddd; width: 60px;} -.addbtn .icon-plus {font-size: 18px; display: block; opacity: 0.5; transition: opacity .2s; text-shadow: 1px 1px 3px rgba(0,0,0,.2);} -.addbtn:hover .icon-plus {opacity: .9; animation: flash-icon 1s linear alternate infinite;} -#subHeader #dropMenu {min-width: 250px; box-sizing: inhert; max-height: inherit;} -#subHeader #dropMenu .table-col .list-group {padding-top: 10px;} -.main-col .block-files .panel-heading {padding-right: 20px;} -.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;} -.side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;} -.side-col .tips {padding: 0 10px;} -.main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 15px;} -.main-col .doc-title .title {margin: 0; line-height: 30px; font-size: 25px;} -.main-col .doc-title .http-method {line-height: 27px; height: 27px; font-size: 13px; margin-right: 10px; padding: 0 10px;} -.main-col .doc-title .path {line-height: 30px; font-size: 20px; margin-right: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.main-col .doc-title .info {flex: 1 1 0;} -.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;} -.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;} -.main-col .doc-title .actions {min-width: 120px; display: inline-block;} -.main-col .doc-title .actions a + a {margin-left: 8px;} -.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;} -#content h2.title {margin: 0; font-size: 17px;} -#content h3.title {font-weight: 500; font-size: 17px!important;} -#content .desc {margin: 10px 0; color: #57585b; word-wrap: break-word;} -#content .detail-content {padding-left: 10px;} -#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;} -#sidebar {width: 275px;} -#sidebar>.cell {width: 100%;} -#sidebar>.sidebar-toggle {left: 3px; right: auto;} -.hide-sidebar #sidebar>.cell {display: none;} -.hide-sidebar #sidebar>.sidebar-toggle>.icon:before {content: "\e314";} -.detail.empty {line-height: 200px;} -.main-col+.side-col {padding-left: 16px;} -.main-col iframe {min-height: 380px;} -.article-content .keywords {margin-bottom: 15px;} - -.article-content {width: 100%; display: inline-block;} -.outline {position: relative;} -.outline .outline-toggle i.icon-angle-right, i.icon-angle-left {width: 18px; height: 18px; border-radius: 50%; position: absolute; padding-left: 2px; padding-top: 1px;} -.outline .outline-toggle i.icon-angle-right:before {content: "\e314"; cursor: pointer;} -.outline .outline-toggle i.icon-angle-left:before {content: "\e315"; cursor: pointer;} -.outline ul li {list-style: none;} -.outline-content {display: none; padding-top: 18px;} -.outline-content a {color: #838A9D;} -.outline-content li.text-ellipsis.active>a {font-weight: 700; color: #0c64eb;} -#outline li.has-list.open:before {content: unset;} - -.article-content.comment {width: 100% !important;} - -.cell .detail .detail-title {padding-left: 5px; list-style: none;} -.menu-actions {top: 5px!important; right: 45px;} -.no-content {width: 100px; height: 100px; margin: 0 auto;} -.notice {text-align: center; padding-left: 15px; padding-top: 20px;} -.no-content-button {text-align: center; padding-top: 20px;} -.no-content-button a:nth-child(2) {margin-left: 20px;} - -.paramsTable th {text-align: left!important; font-size: 14px;} -.paramsTable td {text-align: left;} - -.module-content {overflow-y: auto; padding-top: 10px;} -.module-col {padding: 0 0 0 10px;} -#modules .active {background: #fff;} diff --git a/module/dev/js/api.js b/module/dev/js/api.js deleted file mode 100644 index 16f1439eb8..0000000000 --- a/module/dev/js/api.js +++ /dev/null @@ -1,45 +0,0 @@ -$(function() -{ - initModuleTree(); - setHeight(); - $(window).resize(setHeight); -}); - -/** - * Set pane height. - * - * @access public - * @return void - */ -function setHeight() -{ - var paneHeight = $(window).height() - 90; - $('#sidebar .module-tree,#mainContent .module-content').css('height', paneHeight); -} - -/** - * Init module tree by zui. - * - * @access public - * @return void - */ -function initModuleTree() -{ - $('#moduleTree').tree( - { - data: moduleTree, - initialState: 'active', - itemCreator: function($li, item) - { - $li.append('' + item.title + ''); - if (item.active) $li.addClass('active open in'); - } - }); - - $('#moduleTree').on('click', 'a', function(e) - { - var target = $(e.target); - if (target.attr('data-has-children') === 'true') return; - self.location.href = createLink('dev', 'api', 'module=' + target.attr('data-module')); - }) -} diff --git a/module/dev/js/db.js b/module/dev/js/db.js deleted file mode 100644 index dbf1b65a14..0000000000 --- a/module/dev/js/db.js +++ /dev/null @@ -1,45 +0,0 @@ -$(function() -{ - initTableTree(); - setHeight(); - $(window).resize(setHeight); -}); - -/** - * Set pane height. - * - * @access public - * @return void - */ -function setHeight() -{ - var paneHeight = $(window).height() - 90; - $('#sidebar .module-tree,#mainContent .module-content').css('height', paneHeight); -} - -/** - * Init table tree by zui. - * - * @access public - * @return void - */ -function initTableTree() -{ - $('#tableTree').tree( - { - data: tableTree, - initialState: 'active', - itemCreator: function($li, item) - { - $li.append('' + item.title + ''); - if (item.active) $li.addClass('active open in'); - } - }); - - $('#tableTree').on('click', 'a', function(e) - { - var target = $(e.target); - if (target.attr('data-has-children') === 'true') return; - self.location.href = createLink('dev', 'db', 'module=' + target.attr('data-module')); - }) -} diff --git a/module/dev/js/langitem.js b/module/dev/js/langitem.js deleted file mode 100644 index cf0373c3a1..0000000000 --- a/module/dev/js/langitem.js +++ /dev/null @@ -1,152 +0,0 @@ -$(function() -{ - /** - * Add class active while click item in form. - * - * @param string $id - * @access public - * @return void - */ - function addActive(id) - { - $('[data-id=' + id + ']').addClass('active'); - } - - /** - * Remove class active while blur or click item in form. - * - * @param string $id - * @access public - * @return void - */ - function removeActive(id) - { - $('[data-id=' + id + ']').removeClass('active'); - } - - /** - * Handle function click in label. - * - * @param string $id - * @access public - * @return void - */ - function handleClickItem(clickId) - { - var clearId = $('.form-item.active').attr('data-id'); - if(clearId !== clickId) - { - if(clearId) removeActive(clearId); - if(clickId) addActive(clickId); - }; - } - - /** - * Handle function input on search comp and update menu tree. - * - * @access public - * @return void - */ - function handleInputSearch() - { - $('.menu-tree .search-input').on('input', function() - { - var val = $(this).val(); - if (!val) - { - var updateData = menuTree; - } - else - { - var updateData = []; - for (var i = 0; i < menuTree.length; i++) - { - var item = {}; - $.extend(true, item, menuTree[i]); - item.children = filterChildren(item, val); - if ((item.children && item.children.length) || item.title.indexOf(val) != -1 || (item.key && item.key.indexOf(val) != -1)) - { - updateData.push(item); - } - } - } - $('#menuTree').data('zui.tree').reload(updateData); - }) - } - - /** - * Handle function filter in array children in every item in menu tree. - * - * @access public - * @return array - */ - function filterChildren(item, val) - { - var children = null; - if (item && item.children && item.children.length) - { - children = []; - for (var i = 0; i < item.children.length; i++) - { - item.children[i].children = filterChildren(item.children[i], val); - if (item.children[i].title.indexOf(val) != -1 || (item.children[i].key && item.children[i].key.indexOf(val) != -1) || item.children[i].children) - { - children.push(item.children[i]); - } - } - } - return children && children.length ? children : null; - } - - /** - * Init menu tree by zui. - * - * @access public - * @return void - */ - function initMenu() - { - if (navTypes.indexOf(type) != -1) - { - $('#menuTree').tree( - { - data: menuTree, - initialState: 'active', - itemCreator: function($li, item) - { - $li.append('' + item.title + ''); - if (item.active) $li.addClass('active open in'); - } - }); - } - $('#menuTree').on('click', 'a', function(e) - { - var target = $(e.target); - if (target.attr('data-has-children') === 'true') return; - self.location.href = createLink('dev', 'langItem', 'type=' + type + '&module=' + target.attr('data-module') + '&method=' + target.attr('data-method') + '&language=' + language); - }) - } - - $(".form-item-content").on("click", '.form-item', function(e) - { - handleClickItem($(this).data('id')); - }); - - $('.form-item-content > .form-item > .input-group').on('click', function() - { - handleClickItem($(this).data('id')); - }); - - $(".form-item-content").on('mouseover', '.form-item', function(e) - { - $(this).addClass('hover'); - }).on('mouseout', '.form-item', function() - { - $(this).removeClass('hover'); - }) - - initMenu(); - handleInputSearch(); - - $('li.has-list > ul').addClass("menu-active-primary menu-hover-primary"); -}) diff --git a/module/dev/js/restapi.js b/module/dev/js/restapi.js deleted file mode 100644 index 90b4923f5d..0000000000 --- a/module/dev/js/restapi.js +++ /dev/null @@ -1,17 +0,0 @@ -$(function() -{ - setHeight(); - $(window).resize(setHeight); -}); - -/** - * Set pane height. - * - * @access public - * @return void - */ -function setHeight() -{ - var paneHeight = $(window).height() - 90; - $('#sidebar .module-tree,#mainContent .module-content').css('height', paneHeight); -} diff --git a/module/doc/css/create.css b/module/doc/css/create.css deleted file mode 100644 index 10ceb9708d..0000000000 --- a/module/doc/css/create.css +++ /dev/null @@ -1,40 +0,0 @@ -body {overflow: hidden;} -.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} -.doc-title .form-control:focus {border: unset; box-shadow: unset;} -.doc-title input::-webkit-input-placeholder {color: #D8DBDE;} -.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;} -#headerBox {border-bottom: 1px solid #e3e3e3;} -#headerBox td:last-child {padding-right: 24px;} -.contentmarkdown.required:after, .contenthtml.required:after {right:3px;} -#editorContent {padding: 0;} - -#contentBox {padding: 0; width: 100%;} -#contentBox .ke-container {overflow: visible;} -#contentBox .ke-container, #contentBox .contenthtml {border: unset; background: #efefef;} -#contentBox .ke-container.focus {box-shadow: unset; border-color: unset;} -#contentBox .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;} -#contentBox .ke-edit {border-top: 1px solid rgb(220, 220, 220)} -#contentBox .ke-edit, #contentBox .CodeMirror {margin: 8px 200px 0 200px; background: #fff;} -#contentBox .kindeditor-ph {padding: 20px 20px 0 20px !important;} -#contentBox .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;} -#contentBox .CodeMirror {padding: 20px 20px 0 20px;} -#contentBox .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;} -#contentBox .ke-statusbar {display: none;} -#contentBox .contentmarkdown {background: #efefef;} - -.article-content {padding: 8px 20px;} - -#noticeAcl {margin-left: 10px; vertical-align: middle;} - -#basicInfoLink {border: unset;} - -#modalBasicInfo .modal-dialog {width:800px;} -#modalBasicInfo .modal-content {padding:0px;} -#modalBasicInfo .modal-body {padding:10px 30px 10px 10px; overflow-x: hidden !important;} -#modalBasicInfo .modal-body .close {position:fixed; right:15px; top:15px} -#basicInfoBox{margin-bottom: 10px;} -#basicInfoBox tfoot td {padding-bottom: 0;} -.aclBox .radio-inline{display:block; padding-bottom:5px;} -.aclBox .radio-inline+.radio-inline {margin-left: 0px !important;} - -.fullscreen-save, .markdown-fullscreen-save {position: fixed; top: 10px; right: 30px; z-index: 999999;} diff --git a/module/doc/css/createlib.css b/module/doc/css/createlib.css deleted file mode 100644 index a1d9ca50c3..0000000000 --- a/module/doc/css/createlib.css +++ /dev/null @@ -1,10 +0,0 @@ -.modal-dialog {width: 75%;} -form {margin-bottom: 50px;} -#mainContent table th {width: 70px;} - -#whiteListBox div.input-group {margin-bottom: 2px;} - -#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;} -#aclBox > th {vertical-align: top; padding-top: 17px;} -tr.executionBox > td {display: flex; width: 103%;} -tr.executionBox > td > .icon-help {margin: 8px 0 0 5px;} diff --git a/module/doc/css/displaysetting.css b/module/doc/css/displaysetting.css deleted file mode 100644 index 9bc5605e9b..0000000000 --- a/module/doc/css/displaysetting.css +++ /dev/null @@ -1,2 +0,0 @@ -td.titleBox {width: 100px;} -td.titleBox + td > .radio-inline + .radio-inline{margin-left: 30px;} diff --git a/module/doc/css/edit.css b/module/doc/css/edit.css deleted file mode 100644 index cc929ee0b3..0000000000 --- a/module/doc/css/edit.css +++ /dev/null @@ -1,42 +0,0 @@ -body {overflow: hidden;} -.doc-title input {border: unset; font-size: 18px; font-weight: bold; color: #3c4353; padding-left: 16px;} -.doc-title .form-control:focus {border: unset; box-shadow: unset;} -.doc-title input::-webkit-input-placeholder {color: #D8DBDE;} -.doc-title.required:after {top: 4px; right: 0; left: 12px; display: inline-table;} -.contenthtml.required:after {right:3px;} -#headerBox {border-bottom: 1px solid #e3e3e3;} -#headerBox td:last-child {padding-right: 24px;} -#editorContent {padding: 0;} - -#contentBox {padding: 0; width: 100%;} -#contentBox .ke-container {overflow: visible;} -#contentBox .ke-container, #contentBox .contenthtml {border: unset; background: #efefef;} -#contentBox .ke-container.focus {box-shadow: unset; border-color: unset;} -#contentBox .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;} -#contentBox .ke-edit {border-top: 1px solid rgb(220, 220, 220)} -#contentBox .ke-edit, #contentBox .CodeMirror {margin: 8px 200px 0 200px; background: #fff;} -#contentBox .kindeditor-ph {padding: 20px 20px 0 20px !important;} -#contentBox .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;} -#contentBox .CodeMirror {padding: 20px 20px 0 20px;} -#contentBox .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;} -#contentBox .ke-statusbar {display: none;} - -.article-content {padding: 8px 20px;} - -#noticeAcl {margin-left: 10px; vertical-align: middle;} - -#basicInfoLink {border: unset;} - -#modalBasicInfo .modal-dialog {width:800px;} -#modalBasicInfo .modal-content {padding:0px;} -#modalBasicInfo .modal-body {padding:10px 30px 10px 10px; overflow-x: hidden !important;} -#basicInfoBox{margin-bottom: 10px;} -#basicInfoBox tfoot td {padding-bottom: 0;} -.aclBox .radio-inline{display:block; padding-bottom:5px;} -.aclBox .radio-inline+.radio-inline {margin-left: 0px !important;} - -#whiteListBox .input-group:last-child {margin-top: 10px;} -#mainContent .main-header h2 {width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.fullscreen-save, .markdown-fullscreen-save {position: fixed; top: 10px; right: 30px; z-index: 999999;} - -.modal-header .fullscreen-save, .markdown-fullscreen-save {top: 5px; right: 60px;} diff --git a/module/doc/css/editlib.css b/module/doc/css/editlib.css deleted file mode 100644 index d10167622b..0000000000 --- a/module/doc/css/editlib.css +++ /dev/null @@ -1,7 +0,0 @@ -form {margin-right: 30px;} - -#whiteListBox div.input-group {margin-bottom: 2px;} -#whiteListBox .input-group:last-child {margin-top: 10px;} - -#groups_chosen.chosen-container .chosen-results, #users_chosen.chosen-container .chosen-results {max-height: 160px;} -#aclBox > th {vertical-align: top; padding-top: 17px;} diff --git a/module/doc/css/myspace.css b/module/doc/css/myspace.css deleted file mode 100644 index 44a6627b45..0000000000 --- a/module/doc/css/myspace.css +++ /dev/null @@ -1,14 +0,0 @@ -.flex {display: flex;} -.flex-none {flex: none;} -.flex-auto {flex: auto;} -.flex-full > .panel {box-shadow: none;} -.float-r {float: right;} -.h-full {height: 100%;} -.w-full {width: 100%;} -.overflow-x-auto {overflow-x: auto;} -.overflow-auto {overflow: auto;} -.overflow-visible {overflow: visible;} -.overflow-hidden {overflow: hidden;} -#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 130px); overflow-y: auto;} -#bysearchTab::before {display: none;} -#queryBox #groupAndOr {min-width: 60px;} diff --git a/module/doc/css/selectlibtype.css b/module/doc/css/selectlibtype.css deleted file mode 100644 index 7b4cf2292b..0000000000 --- a/module/doc/css/selectlibtype.css +++ /dev/null @@ -1,4 +0,0 @@ -#lib_chosen.chosen-container .chosen-results {max-height: 100px;} -.radio-inline+.radio-inline { margin-top: 0; margin-left: 0px;} -.radio-inline {margin-right: 10px;} -#mainContent{height:310px;} diff --git a/module/doc/css/showfiles.css b/module/doc/css/showfiles.css deleted file mode 100644 index 5747a53ebb..0000000000 --- a/module/doc/css/showfiles.css +++ /dev/null @@ -1,57 +0,0 @@ -.c-id {width: 80px;} -.c-source {width: 300px;} -.c-size {width: 100px;} -.c-type {width: 90px;} - -.flex {display: flex;} -.flex-none {flex: none;} -.flex-auto {flex: auto;} -.flex-full > .panel {box-shadow: none;} -.float-r {float: right;} -.h-full {height: 100%;} -.w-full {width: 100%;} -.overflow-x-auto {overflow-x: auto;} -.overflow-auto {overflow: auto;} -.overflow-visible {overflow: visible;} -.overflow-hidden {overflow: hidden;} -.img-lib {width: 14px; height: 14px; margin-bottom: 2px; flex: 0 0 14px;} -#mainContent {padding-top: 0; padding-bottom: 0;} -#mainContent #createDropdown {display: inline-block;} -#mainContent #createDropdown ul {position: absolute;} -#pageNav .dropdown-menu {max-height: inherit;} -#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 130px); overflow-y: auto;} -#mainContent > .main-col {padding-left: 0;} - -.no-content {width: 100px; height: 100px; margin: 0 auto;} -.notice {text-align: center; padding-left: 15px; padding-top: 20px;} -.no-content-button {text-align: center; padding-top: 20px;} -.no-content-button a:nth-child(2) {margin-left: 20px;} - -.cell .detail .detail-title {padding-left: 5px; list-style: none;} -.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;} -.detail ul {position: relative;} -.tail-info {position: absolute; right: 0; padding-left: 10px; padding-top: 1px;} -.tail-info, .doc-title, span.item {background: #fff;} -span.item>a {padding-left: 6px;} -span.dotted-line+a {display: block;} -#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;} -.doc-title ,.item{display: inline-block !important; position: relative; padding-right: 10px; max-width:80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} -#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;} - -.sortable-sorting .module-name > a {cursor: move;} -.sortable-sorting li >.tree-group {opacity: .5;} -.sortable-sorting li:before {opacity: .3;} -.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;} -.sortable-sorting .drop-here .tree-group > * {opacity: .1;} -.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;} -.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;} -.is-sorting > li:before {opacity: 1;} -.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;} -.is-sorting > li ul {display: none!important;} -li.drag-shadow ul {display: none!important;} - -#bysearchTab::before {display: none;} -#leftBar .selectBox #currentItem {width: 150px; display: flex; align-items: center;} -[lang^=zh] #leftBar .selectBox #currentItem {width: 180px;} -#leftBar .selectBox #currentItem > .text {overflow: hidden; text-align: left; flex: 0 1 100%;} -#leftBar .selectBox + .searchBox {padding-left: 5px;} diff --git a/module/doc/css/tablecontents.css b/module/doc/css/tablecontents.css deleted file mode 100644 index 66b04c5cfe..0000000000 --- a/module/doc/css/tablecontents.css +++ /dev/null @@ -1,57 +0,0 @@ -.flex {display: flex;} -.flex-none {flex: none;} -.flex-auto {flex: auto;} -.flex-full > .panel {box-shadow: none;} -.float-r {float: right;} -.h-full {height: 100%;} -.w-full {width: 100%;} -.overflow-x-auto {overflow-x: auto;} -.overflow-auto {overflow: auto;} -.overflow-visible {overflow: visible;} -.overflow-hidden {overflow: hidden;} -.img-lib {width: 14px; height: 14px; margin-bottom: 2px; flex: 0 0 14px;} -#main {padding-bottom: 0;} -#mainContent {padding-top: 0; padding-bottom: 0;} -#mainContent #createDropdown {display: inline-block;} -#mainContent #createDropdown ul {position: absolute;} -#pageNav .dropdown-menu {max-height: inherit;} -#mainContent > .panel {margin-bottom: 0; height: calc(100vh - 130px); overflow-y: auto;} -#mainContent > .main-col {padding-left: 0;} -#swapper {margin-right: 15px;} - -.no-content {width: 100px; height: 100px; margin: 0 auto;} -.notice {text-align: center; padding-left: 15px; padding-top: 20px;} -.no-content-button {text-align: center; padding-top: 20px;} -.no-content-button a:nth-child(2) {margin-left: 20px;} - -.cell .detail .detail-title {padding-left: 5px; list-style: none;} -.menu-actions {position: absolute; top: 7px; right: 45px; padding: 7px 8px;} -.detail ul {position: relative;} -.tail-info {position: absolute; right: 0; padding-left: 10px; padding-top: 1px;} -.tail-info, .doc-title, span.item {background: #fff;} -span.item>a {padding-left: 6px;} -span.dotted-line+a {display: block;} -#modules li.doc:before, .chapterNode:before, .independent:before {content: " "; width: 100%; border-bottom: 1px dashed #b5b9c5; position: absolute; top: 13px; right: 0; left: 30px;} -#modules i.icon-file-text {color: #D0D2D6; font-size: 14px;} - -.sortable-sorting .module-name > a {cursor: move;} -.sortable-sorting li >.tree-group {opacity: .5;} -.sortable-sorting li:before {opacity: .3;} -.sortable-sorting .drop-here .tree-group {background-color: #fff3e0;} -.sortable-sorting .drop-here .tree-group > * {opacity: .1;} -.sortable-sorting .drag-shadow .tree-group {opacity: 1!important;} -.sortable-sorting .drag-shadow .tree-actions {visibility: hidden;} -.is-sorting > li:before {opacity: 1;} -.is-sorting > li > .tree-group {opacity: 1; border-radius: 4px;} -.is-sorting > li ul {display: none!important;} -li.drag-shadow ul {display: none!important;} - -.table .c-name > .doc-title {display: inline-block; overflow: hidden; background: transparent; padding-right:0px; max-width: calc(100% - 40px);} -.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;} -.table .c-name[data-status=draft] > .doc-title {max-width: calc(100% - 80px);} -.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;} -.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px; padding: 0 6px;} -table.table > thead > tr {height: 32px;} - -#bysearchTab::before {display: none;} -#queryBox #groupAndOr {min-width: 60px;} diff --git a/module/doc/css/view.css b/module/doc/css/view.css deleted file mode 100644 index c96fc6344a..0000000000 --- a/module/doc/css/view.css +++ /dev/null @@ -1,122 +0,0 @@ -.h-full-adjust {overflow-y: auto; height: calc(100vh - 125px);} -.main-col .block-files .panel-heading {padding-right: 20px;} -.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;} - -/* css for page-title .*/ -.main-col .doc-title {display: flex; font-size: 16px; margin-bottom: 10px; justify-content: space-between; width: 100%;} -.main-col .doc-title .info {flex: 0 0 60px;} -.main-col .doc-title #editorBox {flex: 0 0 190px;} -.main-col .doc-title .title {margin-right: 10px; line-height: 32px; font-size: 20px;} -.main-col .doc-title .version a {font-size: 13px; color: #8c8c8c;} -.main-col .doc-title .version .dropdown-menu a:hover {color: #ffffff;} -.main-col .doc-title .actions {flex: 0 0 180px; display: flex;} -.main-col .doc-title .actions a + a {margin-left: 0px; flex: 0 0 32px;} -.main-col .doc-title .actions i {font-size: 15px; color: #8c8c8c;} -.main-col .doc-title .actions a > span {color: #9EA3B0;} - -#content .title {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -#mainContent .scrollbar-hover {max-height: 2000px; overflow: scroll;} -#content .editor-preview {background: #fff} -#content .CodeMirror{border: none} -#sidebar {width: 275px;} -#sidebar>.cell {width: 100%;} -#sidebar>.sidebar-toggle {left: 3px; right: auto;} -.hide-sidebar #sidebar>.cell {display: none;} -.hide-sidebar #sidebar>.sidebar-toggle>.icon:before {content: "\e314";} -.detail.empty {line-height: 200px;} -.main-col iframe {min-height: 380px;} -.article-content {margin-top: 0px} -.article-content .info {margin-bottom: 15px; width:100%; overflow:hidden;} -.article-content .info .user-time{margin-right: 4px} -.article-content .info .keywords .label {padding: 2px 8px; color:#18A6FD; border-color:rgba(24, 166, 253, 0.25); height: 18px; line-height:14px; margin-right:4px;} -.article-content {width: 100%; display: inline-block;} -.article-content img {margin: 0;} -.article-content.comment .comment-content {width: 94%;} - -/* css for outlineMenu .*/ -#outlineMenu {max-width: 200px; overflow-x: auto;} -#outlineMenu .tree li > a {text-overflow: clip;} -.outline-toggle i.icon-angle-right:before {content: "\e314"; cursor: pointer;} -.outline-toggle i.icon-angle-left:before {content: "\e315"; cursor: pointer;} -.outline-toggle {position: absolute; right: 15px; top: 50px; background: #fff; padding: 5px 20px 5px 15px;} -.outline ul li {list-style: none;} -.outline-content {display: none; padding-top: 18px;} -.outline-content a {color: #838A9D;} -.outline-content li.text-ellipsis.active>a {font-weight: 700;} -#outline li.has-list.open:before {content: unset;} -#fileTree {margin-bottom: 40px; max-height: calc(100vh - 180px); overflow: auto;} -#closeBtn {position: absolute; right: 10px; top: 10px;} -.actions > .btn-group {display: inline-block;} - -.article-content.comment {width: 100% !important;} - -.flex {display: flex;} -.flex-none {flex: none;} -.flex-auto {flex: auto;} -.flex-full > .panel {box-shadow: none;} -.float-r {float: right;} -.h-full {height: 100%;} -.w-full {width: 100%;} -.overflow-x-auto {overflow-x: auto;} -.overflow-auto {overflow: auto;} -.overflow-visible {overflow: visible;} -.overflow-hidden {overflow: hidden;} -.detail-title .actions .ajaxCollect > img {width: 20px; height: 20px;} -.actions > .text {color: #8c8c8c; font-size: 14px;} -.flex-content {display: flex; width: 100%; height: 100%;} -.flex-content > #content {flex: auto; overflow-y: auto;} -.flex-content > #history {flex: 0 0 302px; position: relative; overflow: auto;} -.flex-content > #history > #closeIcon {position: absolute; right: 10px; top: 10px;} -.panel {margin-bottom: 0;} -.detail {margin: 0 4px;} -#mainContent > .panel {margin-bottom: 0; overflow-y: auto;} -#mainContent > .main-col{flex: auto;} - -.main-col {position: relative;} -#autoBox {display: flex; overflow: hidden; text-overflow: ellipsis; padding-right: 15px; position: relative;} -#autoBox > .ellipsis {position: absolute; top: 3px; right: 0; width: 10px; background: #F4F5F7; height: 100%;} -.detail+.detail {padding-top: 0;} -.comment-edit-form .form-actions {display: flex;} -.drop-body::-webkit-scrollbar, -#diffContain > .main-content::-webkit-scrollbar, -#content .detail-content.article-content::-webkit-scrollbar, -#outlineMenu::-webkit-scrollbar, -#history::-webkit-scrollbar {height: 0px; width: 0px; background: transparent;} -#diffContain > .main-content::-moz-scrollbar, -#content .detail-content.article-content::-moz-scrollbar, -#outlineMenu::-moz-scrollbar, -.drop-body::-moz-scrollbar, -#hostory::-moz-scrollbar {height: 0px; width: 0px; background: transparent;} -.main-col iframe {min-height: unset;} - -#editorBox > .btn-group.noDropdown {top: 2px; overflow: hidden;} -#editorBox > .btn-group > button {margin: 2px 12px 0 4px; color: #838A9D;} -#editorBox > .btn-group > span.text {color: #838A9D; font-weight: 400; padding: 5px 12px; overflow: hidden; text-overflow: clip; white-space: nowrap; font-size: 13px;} -#editorMenu {max-height: 200px; overflow-y: auto; overflow-x: hidden; margin-left: 4px; max-width: 100%;} -[lang^=zh] #editorMenu {max-width: calc(100% - 10px);} -#editorMenu > li {color: #838A9D; font-weight: 400; padding: 5px 12px; text-overflow: clip; white-space: nowrap;} -.doc-version-menu {padding: 10px 0;} -#changeBtn > i {font-size: 24px;} - -#docVersionMenu > .drop-body {max-height: 200px; overflow-y: auto;} -#docVersionMenu > .drop-body > li.li-item {display: flex; position: relative;} -#docVersionMenu > .drop-body > li.li-item > .checkbox-primary {display: none; position: absolute; top: 4px; left: 10px; width: 230px;} -#docVersionMenu > .drop-body > li > a {flex: 1; padding-left: 20px; height: 30px; display: flex; align-items: center;} -#docVersionMenu > .drop-bottom > button {margin-right: 10px; display: none;} - -#docVersionMenu.diff > .drop-body > li.li-item > .checkbox-primary {display: unset!important;} -#docVersionMenu.diff > .drop-body > li > a {padding-left:30px!important;} -#docVersionMenu.diff > .drop-title > #changeBtn {opacity: 0;} -#docVersionMenu.diff > .drop-bottom > button {display: unset!important;} - -.user-time .icon-star {font-size: 12px; line-height: 1.8;} -.user-time .icon-star:before {vertical-align: top;} -.btn-limit {position: relative;} -.btn-group {display: flex; align-items: center;} -#exchangeDiffBtn {font-size: 24px;} -.exchangeDiffGroup .right-dom {display: none;} -.exchangeDiffGroup.show-diff .right-dom {display: unset;} -.btn-limit {padding-left: 10px; padding-right: 20px;} -.tree li>.list-toggle {top: 5px; left: -4px;} -.flex-left {display: inline-flex; flex: auto} - diff --git a/module/doc/js/create.js b/module/doc/js/create.js deleted file mode 100644 index 255ba6eac9..0000000000 --- a/module/doc/js/create.js +++ /dev/null @@ -1,183 +0,0 @@ -$(function() -{ - /* Set editor content height. */ - var contentHeight = $(document).height() - 92; - setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea').height(contentHeight);}, 100); - setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100); - $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); - - if(objectType == 'project') loadExecutions($('#project').val()); - - /* Change for show create error. */ - $('#contentBox #content').attr('id', 'contentHTML'); - /* Copy doc title to modal title. */ - $('#modalBasicInfo').on('show.zui.modal', function() - { - $('#modalBasicInfo #copyTitle').html($('.doc-title #editorTitle').val().replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'")); - }); - - $('#saveDraft').click(function() - { - if($.trim($('#editorTitle').val()) == '') - { - bootbox.alert(titleNotEmpty); - return false; - } - $('#status').val('draft'); - submit(this); - }); - $('#releaseBtn').click(function(){submit(this);}); - $('#basicInfoLink').click(function() - { - if($('#editorTitle').val() == '') - { - bootbox.alert(titleNotEmpty); - return false; - } - if(requiredFields.indexOf('content') >= 0) - { - var contentType = $('#contentType').val(); - var content = ''; - if(contentType == 'html') content = $('#contentHTML').val(); - if(contentType == 'markdown')content = $('#contentMarkdown').val(); - if(content == '') - { - bootbox.alert(contentNotEmpty); - return false; - } - } - $('#status').val('normal'); - }); - - setTimeout(function(){initPage(docType)}, 50); - if(typeof(window.editor) != 'undefined') - { - $('.ke-toolbar .ke-outline:last').after("Markdown"); - } - - $(document).on("mouseup", 'span[data-name="fullscreen"]', function() - { - if($(this).hasClass('ke-selected')) - { - $('#submit').removeClass('fullscreen-save') - $('.form-actions #submit').addClass('btn-wide') - } - else - { - $('#submit').addClass('fullscreen-save') - $('.form-actions #submit').removeClass('btn-wide') - } - }); - - $(document).on("mouseup", 'a[title="Fullscreen"],.icon-columns', function() - { - setTimeout(function() - { - if($('a[title="Fullscreen"]').hasClass('active')) - { - $('#submit').addClass('markdown-fullscreen-save') - $('#submit').removeClass('btn-wide') - $('.fullscreen').css('height', '50px'); - $('.fullscreen').css('padding-top', '15px'); - $('.CodeMirror-fullscreen').css('top', '50px'); - $('.editor-preview-side').css('top', '50px'); - } - else - { - $('#submit').removeClass('markdown-fullscreen-save') - $('#submit').addClass('btn-wide') - $('.editor-toolbar').css('height', '30px'); - $('.editor-toolbar').css('padding-top', '1px'); - $('.CodeMirror').css('top', '0'); - $('.editor-preview-side').css('top', '30px'); - } - }, 200); - }); - - if($(".createCustomLib").length == 1) $(".createCustomLib").click(); // Fix bug #15139. -}) - -function toggleEditor(type) -{ - if(type == 'html') - { - $('.contenthtml').removeClass('hidden'); - $('.contentmarkdown').addClass('hidden'); - } - else if(type == 'markdown') - { - $('.contenthtml').addClass('hidden'); - $('.contentmarkdown').removeClass('hidden'); - } - $('#contentType').val(type); - return false; -} - -function initPage(type) -{ - if(type == 'html' || type == 'markdown') - { - if(type == 'markdown') - { - $('#contentBox .contentmarkdown').removeClass('hidden'); - $('#contentBox .contenthtml').addClass('hidden'); - $('#contentType').val(type); - } - } - else if(type == 'url') - { - $('#contentBox').addClass('hidden'); - $('#urlBox').removeClass('hidden'); - } - if(type == 'word' || type == 'ppt' || type == 'excel') - { - $('#contentBox').hide(); - $('#urlBox').hide(); - } -} - -/** - * Load whitelist by libID. - * - * @param int $libID - * @access public - * @return void - */ -function loadWhitelist(libID) -{ - var groupLink = createLink('doc', 'ajaxGetWhitelist', 'libID=' + libID + '&acl=&control=group'); - var userLink = createLink('doc', 'ajaxGetWhitelist', 'libID=' + libID + '&acl=&control=user'); - $.post(groupLink, function(groups) - { - if(groups != 'private') - { - $('#groups').replaceWith(groups); - $('#groups').next('.picker').remove(); - $('#groups').picker(); - } - }); - - $.post(userLink, function(users) - { - if(users != 'private') - { - $('#users').replaceWith(users); - $('#users').next('.picker').remove(); - $('#users').picker(); - } - }); -} - -/** - * Redirect to edit page when create the doc of text type. - * - * @param int docID - * @param string objectType - * @param int objectID - * @param int libID - * @return void - */ -function redirect2Edit(docID, objectType, objectID, libID) -{ - parent.location.href = createLink('doc', 'edit', 'docID=' + docID + '&comment=false&objectType=' + objectType + '&objectID=' + objectID + '&libID=' + libID + '&from=create'); -} diff --git a/module/doc/js/createlib.js b/module/doc/js/createlib.js deleted file mode 100644 index 0d3ada2de4..0000000000 --- a/module/doc/js/createlib.js +++ /dev/null @@ -1,33 +0,0 @@ -$('#project').change(function() -{ - $.get(createLink('doc', 'ajaxGetExecution', 'projectID=' + $(this).val()), function(data) - { - if(data) - { - $('#execution').replaceWith(data); - $('#execution_chosen').remove(); - $('#execution').chosen(); - } - }); -}); - -function changeDoclibAcl(libType) -{ - if(libType == 'api') - { - $('.apilib').removeClass('hidden'); - $('#mainContent table th').css('width', '100px'); - $('#aclBox').find('td').html($('#aclAPIBox td').html()); - - $('.executionBox').addClass('hidden'); - } - else - { - $('.apilib').addClass('hidden'); - $('#mainContent table th').css('width', '70px'); - $('#aclBox').find('td').html($('#aclOtherBox td').html()); - - $('.executionBox').removeClass('hidden'); - } - $('#whiteListBox').addClass('hidden'); -} diff --git a/module/doc/js/edit.js b/module/doc/js/edit.js deleted file mode 100644 index cefda53352..0000000000 --- a/module/doc/js/edit.js +++ /dev/null @@ -1,158 +0,0 @@ -$(function() -{ - /* Set editor content height. */ - var contentHeight = $(document).height() - 92; - setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea').height(contentHeight);}, 100); - setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100); - $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); - - $('#saveDraft').click(function() - { - if($.trim($('#editorTitle').val()) == '') - { - bootbox.alert(titleNotEmpty); - return false; - } - - $('#status').val('draft'); - submit(this); - }); - $('#saveRelease').click(function() - { - $('#status').val('normal'); - submit(this); - }); - - setTimeout(function() - { - if(needUpdateContent && confirm(confirmUpdateContent)) - { - $('#content').html(draft); - editor = KindEditor.instances[0]; - editor.html('' + draft); - $('.kindeditor-ph').remove(); - } - }, 100) - - $('#subNavbar li[data-id="doc"]').addClass('active'); - - $(document).on("mouseup", 'span[data-name="fullscreen"]', function() - { - if(config.onlybody == 'no') - { - if($(this).hasClass('ke-selected')) - { - $('#submit').removeClass('fullscreen-save') - $('#submit').addClass('btn-wide') - } - else - { - $('#submit').addClass('fullscreen-save') - $('#submit').removeClass('btn-wide') - } - } - }); - - $(document).on("mouseup", 'a[title="Fullscreen"],.icon-columns', function() - { - if(config.onlybody == 'no') - { - setTimeout(function() - { - if($('a[title="Fullscreen"]').hasClass('active')) - { - $('#submit').addClass('markdown-fullscreen-save') - $('#submit').removeClass('btn-wide') - $('.fullscreen').css('height', '50px'); - $('.fullscreen').css('padding-top', '15px'); - $('.CodeMirror-fullscreen').css('top', '50px'); - $('.editor-preview-side').css('top', '50px'); - $('#submit').data('placement', 'bottom'); - } - else - { - $('#submit').removeClass('markdown-fullscreen-save') - $('#submit').addClass('btn-wide') - $('.editor-toolbar').css('height', '30px'); - $('.editor-toolbar').css('padding-top', '1px'); - $('.CodeMirror').css('top', '0'); - $('.editor-preview-side').css('top', '30px'); - $('#submit').data('placement', 'right'); - } - }, 200); - } - else - { - setTimeout(function() - { - if($('a[title="Fullscreen"]').hasClass('active')) - { - $('.main-header').hide(); - $('#submit').addClass('markdown-fullscreen-save'); - $('#submit').removeClass('btn-wide'); - $('#mainContent .fullscreen').css('padding-top', '8px'); - $('#mainContent .fullscreen').css('height', '40px'); - $('.CodeMirror-fullscreen').css('top', '40px'); - $('.editor-preview-side').css('top', '40px'); - $('#submit').data('placement', 'left'); - parent.$('.modal-header > .close').addClass('fullscreen-close'); - } - else - { - $('.main-header').show(); - $('#submit').removeClass('markdown-fullscreen-save'); - $('#mainContent .editor-toolbar').css('padding', '1px'); - $('#mainContent .editor-toolbar').css('height', '30px'); - $('.CodeMirror').css('top', '0px'); - $('.editor-preview-side').css('top', '0px'); - parent.$('.modal-header > .close').removeClass('fullscreen-close'); - } - }, 200); - } - }); -}) - -/** - * Save draft doc. - * - * @access public - * @return void - */ -function saveDraft() -{ - var content = $('#content').val(); - var link = createLink('doc', 'ajaxSaveDraft', 'docID=' + docID); - $.post(link, {content: content}); -} - -/** - * Load whitelist by libID. - * - * @param int $libID - * @access public - * @return void - */ -function loadWhitelist(libID) -{ - var groupLink = createLink('doc', 'ajaxGetWhitelist', 'libID=' + libID + '&acl=&control=group' + '&docID=' + docID); - var userLink = createLink('doc', 'ajaxGetWhitelist', 'libID=' + libID + '&acl=&control=user' + '&docID=' + docID); - $.post(groupLink, function(groups) - { - if(groups != 'private') - { - $('#groups').replaceWith(groups); - $('#groups').next('.picker').remove(); - $('#groups').picker(); - } - }); - - $.post(userLink, function(users) - { - if(users != 'private') - { - $('#users').replaceWith(users); - $('#users').next('.picker').remove(); - $('#users').picker(); - } - }); -} diff --git a/module/doc/js/editlib.js b/module/doc/js/editlib.js deleted file mode 100644 index 4c3b0a7242..0000000000 --- a/module/doc/js/editlib.js +++ /dev/null @@ -1,19 +0,0 @@ -$(function() -{ - toggleAcl($('form input[name="acl"]:checked').val(), 'lib'); -}) - -/** - * Redirect the parent window. - * - * @param int hasLibPriv - * @param int libID - * @param int objectID - * @access public - * @return void - */ -function redirectParentWindow(hasLibPriv, libID, objectID) -{ - var link = hasLibPriv ? createLink('doc', 'tableContents', 'type=' + libType + '&objectID=' + objectID + '&libID=' + libID) : createLink('doc', 'tableContents', 'type=' + libType); - parent.location.href = link; -} diff --git a/module/doc/js/myspace.js b/module/doc/js/myspace.js deleted file mode 100644 index 3bbaf09eb2..0000000000 --- a/module/doc/js/myspace.js +++ /dev/null @@ -1,12 +0,0 @@ -$('.ajaxCollect').click(function() -{ - if(browseType == 'collectedbyme') - { - window.location.reload(); - } -}); - -$(function() -{ - $('ul.pager .pager-item').attr('data-app', appTab); -}); diff --git a/module/doc/js/selectlibtype.js b/module/doc/js/selectlibtype.js deleted file mode 100644 index 389f497fc5..0000000000 --- a/module/doc/js/selectlibtype.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Redirect the parent window. - * - * @param string objectType - * @param int libID - * @param string docType - * @access public - * @return void - */ -function redirectParentWindow(objectType, libID, moduleID, docType) -{ - config.onlybody = 'no'; - - var link = ''; - if(docType == 'api') - { - link = createLink('api', 'create', 'libID=' + libID + '&moduleID=' + moduleID + '&space=' + objectType); - } - else - { - link = createLink('doc', 'create', 'objectType=' + objectType + '&objectID=0&libID=' + libID + '&moduleID=' + moduleID + '&docType=' + docType) + '#app=doc'; - } - window.parent.$.apps.open(link); -} - -/** - * Load doc libs by type. - * - * @param string type - * @return void - */ -function loadDocLibs(space, type) -{ - var link = createLink('doc', 'ajaxGetLibsByType', "space=" + space + "&type=" + type); - $('#moduleBox').load(link, function(){$('#moduleBox').find('select').picker(); $('#moduleLabel').remove();}); -} diff --git a/module/doc/js/showfiles.js b/module/doc/js/showfiles.js deleted file mode 100644 index a990cd5a83..0000000000 --- a/module/doc/js/showfiles.js +++ /dev/null @@ -1,16 +0,0 @@ -$(function() -{ - $('#leftBar .searchBox #title').keypress(function(e) - { - if(e.which == 13) - { - $(this).closest('form').attr('action', searchLink.replace('%s', $(this).val())); - } - }); - - $('#leftBar .searchBox #submit').click(function(e) - { - var searchTitle = $(this).prev('#title').val(); - $(this).closest('form').attr('action', searchLink.replace('%s', searchTitle)); - }); -}) diff --git a/module/doc/js/tablecontents.js b/module/doc/js/tablecontents.js deleted file mode 100644 index f41f3c5a5e..0000000000 --- a/module/doc/js/tablecontents.js +++ /dev/null @@ -1,11 +0,0 @@ -$(function() -{ - $('#docListForm .table .c-name').each(function() - { - var $this = $(this); - if($this.find('.draft').length > 0) - { - $this.find('.doc-title').css('max-width', parseInt($this.width()) - parseInt($this.find('.draft').width()) - parseInt($this.find('.ajaxCollect').width()) - parseInt($this.find('.file-icon').width()) - 24); - } - }); -}); diff --git a/module/doc/js/view.js b/module/doc/js/view.js deleted file mode 100644 index 8f91e3e592..0000000000 --- a/module/doc/js/view.js +++ /dev/null @@ -1,280 +0,0 @@ -$(function() -{ - if($.cookie('isFullScreen') == 1) fullScreen(); - - $('.menu-actions > a').click(function() - { - $(this).parent().hasClass('open') ? $(this).css('background', 'none') : $(this).css('background', '#f1f1f1'); - }) - - $('.menu-actions > a').blur(function() {$(this).css('background', 'none');}) - - $('.comment-edit-form').ajaxForm({ - success: function(data) { - location.reload(); - } - }) -}) - -/** - * Ajax delete doc. - * - * @param string $link - * @param int $replaceID - * @param stirng $notice - * @access public - * @return void - */ -function ajaxDeleteDoc(link, replaceID, notice) -{ - if(confirm(notice)) - { - $.get(link, function(data) - { - location.href = JSON.parse(data).locate; - }); - } -} - -/** - * Delete a file. - * - * @param int $fileID - * @access public - * @return void - */ -function deleteFile(fileID) -{ - if(!fileID) return; - hiddenwin.location.href = createLink('file', 'delete', 'fileID=' + fileID); -} - -/** - * Display the document in full screen. - * - * @access public - * @return void - */ -function fullScreen() -{ - var element = document.getElementById('content'); - var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; - if(requestMethod) - { - var afterEnterFullscreen = function() - { - $('#mainActions').removeClass('hidden'); - $('#content').addClass('scrollbar-hover'); - $('#content .actions').addClass('hidden'); - $('#content .file-image .right-icon').addClass('hidden'); - $('#content .detail').eq(1).addClass('hidden'); - $.cookie('isFullScreen', 1); - }; - - var whenFailEnterFullscreen = function(error) - { - $.cookie('isFullScreen', 0); - }; - - try - { - var result = requestMethod.call(element); - if(result && (typeof result.then === 'function' || result instanceof window.Promise)) - { - result.then(afterEnterFullscreen).catch(whenFailEnterFullscreen); - } - else - { - afterEnterFullscreen(); - } - } - catch (error) - { - whenFailEnterFullscreen(error); - } - } - - $('.main-col iframe').css('min-height', $(window).height() + 'px'); - adjustPageTitleWidth(); -} - -/** - * Exit full screen. - * - * @access public - * @return void - */ -function exitFullScreen() -{ - $('#mainActions').addClass('hidden'); - $('#content').removeClass('scrollbar-hover'); - $('#content .actions').removeClass('hidden'); - $('#content .file-image .right-icon').removeClass('hidden'); - $('#content .detail').eq(1).removeClass('hidden'); - $('.main-col iframe').css('min-height', '380px'); - $.cookie('isFullScreen', 0); - adjustPageTitleWidth(); -} - -/** - * Adjust title width. - * - * @access public - * @return void - */ -function adjustPageTitleWidth() -{ - var $titleContent = $('.detail-title.doc-title'); - var titleWidth = $titleContent.width() - $titleContent.find('.info').width() - $titleContent.find('.actions').width() - $titleContent.find('#editorBox').width(); - $titleContent.find('.flex-left > .title').css('max-width', titleWidth + 'px'); -} - -document.addEventListener('fullscreenchange', function (e) -{ - if(!document.fullscreenElement) exitFullScreen(); -}); - -document.addEventListener('webkitfullscreenchange', function (e) -{ - if(!document.webkitFullscreenElement) exitFullScreen(); -}); - -document.addEventListener('mozfullscreenchange', function (e) -{ - if(!document.mozFullScreenElement) exitFullScreen(); -}); - -document.addEventListener('msfullscreenChange', function (e) -{ - if(!document.msfullscreenElement) exitFullScreen(); -}); - -$(function() -{ - - $(document).keydown(function(event) - { - if($.cookie('isFullScreen') == 1) - { - if(event.keyCode == 37) $('#prevPage').click(); - if(event.keyCode == 39) $('#nextPage').click(); - } - }); - - $('.outline').height($('.article-content').height()); - - $('body').on('click', '.outline-toggle i.icon-menu-arrow-left', function() - { - $('.outline').css({'min-width' : '180px', 'border-left' : '2px solid #efefef'}); - $(this).removeClass('icon-menu-arrow-left').addClass('icon-menu-arrow-right').css('left', '-9px'); - $('.outline').removeClass('hidden'); - $('.outline-content').show(); - if($('#sidebar>.cell').is(':visible')) $('#sidebar .icon.icon-menu-arrow-right').trigger("click"); - }).on('click', '.outline-toggle i.icon-menu-arrow-right', function() - { - $(this).removeClass('icon-menu-arrow-right').addClass('icon-menu-arrow-left'); - $('.outline').css({'min-width' : '180px', 'border-left' : 'none'}); - $('.outline').addClass('hidden'); - }).on('click', '#outline li', function(e) - { - $('#outline li.active').removeClass('active'); - $(e.target).closest('li').addClass('active'); - }).on('click', '.comment-edit-form .btn-hide-form', function() - { - $('.comment-edit-form #submit').attr('disabled', false); - }).on('click', '#docVersionMenu.diff > .drop-body > li', function(e) - { - e.stopPropagation(); - }).on('click', '#docVersionMenu #changeBtn', function(e) - { - $('#docVersionMenu').addClass('diff'); - e.stopPropagation(); - }).on('click', '#hisTrigger', function() - { - var $history = $('#history'); - var $icon = $(this); - if($history.hasClass('hidden')) - { - $history.removeClass('hidden'); - $icon.addClass('text-primary'); - } - else - { - $history.addClass('hidden'); - $icon.removeClass('text-primary'); - } - adjustPageTitleWidth(); - }).on('click', '#closeBtn', function() - { - $('#history').addClass('hidden'); - $('#hisTrigger').removeClass('text-primary'); - adjustPageTitleWidth(); - }); - - $('#outline li.has-list').addClass('open in'); - $('#outline li.has-list > i + ul').prev('i').remove(); - $('.outline-toggle i.icon-menu-arrow-left').trigger('click'); - - $(document).on('click', '.detail-content a', function(event) - { - var target = $(this).attr('target'); - if($.cookie('isFullScreen') == 1 && target != '_blank') exitFullScreen(); - }) - - /* Update doc content silently on switch doc version, story #40503 */ - $(document).on('click', '.doc-version-menu a, #mainActions .container a', function(event) - { - var $tmpDiv = $('
'); - $tmpDiv.load($(this).data('url') + ' #mainContent', function() - { - $('#content').html($tmpDiv.find('#content').html()); - var tmpOutline = $tmpDiv.find('#outline'); - if(tmpOutline.length) - { - if(!$('#outline').length) - { - $('#outlineMenu .outline-content').append(tmpOutline); - } - else - { - $('#outline').replaceWith(tmpOutline); - } - $('#outlineMenu').css('display', 'block'); - $('.outline-toggle').css('display', 'block'); - } - else - { - $('#outlineMenu').css('display', 'none'); - $('.outline-toggle').css('display', 'none'); - $('#outline').detach(); - } - $('#sidebarContent').html($tmpDiv.find('#sidebarContent').html()); - $('#actionbox .histories-list').html($tmpDiv.find('#actionbox .histories-list').html()); - if($.cookie('isFullScreen') == 1) fullScreen(); - $('#outlineMenu [data-ride="tree"]').tree(); - $('#outline li.has-list').addClass('open in'); - $('#outline li.has-list > i + ul').prev('i').remove(); - if($('#markdownContent').val()) - { - var simplemde = new SimpleMDE({element: $("#markdownContent")[0],toolbar:false, status: false}); - simplemde.value(String($('#markdownContent').val())); - simplemde.togglePreview(); - } - $('#docExport').attr('href', createLink('doc', exportMethod, 'libID=' + libID + '&moduleID=0&docID=' + docID + '&version=' + $('#content .doc-title .version').data('version'))); - if($('.files-list').length) $('#content .detail-content.article-content').css('height', 'calc(100vh - 300px)'); - adjustPageTitleWidth(); - }); - }) - - $('#history').append(''); - - $('#history').find('.btn.pull-right').removeClass('pull-right'); - if($('.files-list').length) $('#content .detail-content.article-content').css('height', 'calc(100vh - 300px)'); - $('.outline .outline-toggle i.icon-menu-arrow-left').trigger("click"); - if(!$('#outline').length) - { - $('#outlineMenu').css('display', 'none'); - $('.outline-toggle').css('display', 'none'); - } - adjustPageTitleWidth(); -}) diff --git a/module/editor/css/edit.css b/module/editor/css/edit.css deleted file mode 100644 index c68acf3d31..0000000000 --- a/module/editor/css/edit.css +++ /dev/null @@ -1,7 +0,0 @@ -.m-editor-edit {padding-bottom: 0px; background-color: #fff;} -#showContentEditor, #fileContentEditor {border:1px solid #ddd;} -.m-editor-edit .main-content {padding:0px;} -.m-editor-edit .checkbox-primary {display:inline-block; padding-left:12px;} -.m-editor-edit .checkbox-primary label {padding-left:12px;} -.m-editor-edit .main-header {padding: 10px 20px;} -.main-content textarea.form-control {min-height: 300px; height: auto;} diff --git a/module/editor/css/extend.css b/module/editor/css/extend.css deleted file mode 100644 index 68dc6d394b..0000000000 --- a/module/editor/css/extend.css +++ /dev/null @@ -1,15 +0,0 @@ -::-webkit-scrollbar {width: 10px; height: 10px;} -::-webkit-scrollbar-button {width: 0; height: 0;} -::-webkit-scrollbar-thumb:vertical {min-height: 28px; background-color: rgba(0, 0, 0, 0.2); background-clip: padding-box; border-radius: 2px; -webkit-box-shadow: inset 1px 1px 0 rgb(0 0 0 / 10%), inset 0 -1px 0 rgb(0 0 0 / 7%);} -::-webkit-scrollbar-track:hover {background-color:rgba(0,0,0,.05);-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.1);} -::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);} - -.expandable > ul {display: none !important} -.m-editor-extend {padding-bottom: 0px; background-color: #fff;} -.collapsable > ul {display: block !important} -.tree li:before {margin-right: 4px;} -.tree li > a {display: inline;} -.m-editor-extend .main-header {padding: 10px 20px; } -.m-editor-extend .main-content {padding: 0px; padding-top: 10px; box-shadow: none;} -#extendTree li a {white-space: nowrap;} -#extendTree span {padding: 0 4px;} diff --git a/module/editor/css/index.css b/module/editor/css/index.css deleted file mode 100644 index 3eaae59992..0000000000 --- a/module/editor/css/index.css +++ /dev/null @@ -1,19 +0,0 @@ -table td {padding: 0 10px; vertical-align: top;} -table tr > td:first-child {padding-left: 0;} -table tr > td:last-child {padding-right: 0;} -.modulegroup {font-weight:bold; padding-top:8px; border-top:1px solid #ddd;} -td.w-200px a:hover {font-weight:bold;} -.w-350px {width:350px;} -.with-list a {white-space: nowrap;} -#mainContent .module-col{padding: 0px; padding-left: 10px;} -#mainContent .module-content {padding: 0;} -#sidebar .module-tree {overflow-y: auto;} -#sidebar .module-tree .panel-heading {padding: 4px 10px; position: relative;} -#sidebar .module-tree .panel-heading:after {content: ''; position: absolute; inset: 0 -10px; border-bottom: 1px solid #eee;} - -/* module-tree. */ -#moduleTree {padding-top: 10px;} -#moduleTree.tree ul {margin-bottom: 0;} -#moduleTree .active {background-color: #fff;} -#menuTree > li.has-list > ul > li {padding-left: 10px;} -#menuTree > li.has-list > ul > li.has-list {padding-left: 15px;} diff --git a/module/editor/css/newpage.css b/module/editor/css/newpage.css deleted file mode 100644 index 2f5199f231..0000000000 --- a/module/editor/css/newpage.css +++ /dev/null @@ -1,9 +0,0 @@ -::-webkit-scrollbar {width: 10px; height: 10px;} -::-webkit-scrollbar-button {width: 0; height: 0;} -::-webkit-scrollbar-thumb:vertical {min-height: 28px; background-color: rgba(0, 0, 0, 0.2); background-clip: padding-box; border-radius: 2px; -webkit-box-shadow: inset 1px 1px 0 rgb(0 0 0 / 10%), inset 0 -1px 0 rgb(0 0 0 / 7%);} -::-webkit-scrollbar-track:hover {background-color:rgba(0,0,0,.05);-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.1);} -::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4);} - -.m-editor-newpage {padding-bottom:0px; background-color:#fff;} -.m-editor-newpage .main-header {padding: 10px 20px;} -.m-editor-newpage .main-content {box-shadow: none;} diff --git a/module/editor/js/index.js b/module/editor/js/index.js deleted file mode 100644 index a5a5fedfef..0000000000 --- a/module/editor/js/index.js +++ /dev/null @@ -1,58 +0,0 @@ -$(function() -{ - initModuleTree(); - setHeight(); - $(window).resize(setHeight); -}); - -/** - * Set pane height. - * - * @access public - * @return void - */ -function setHeight() -{ - var paneHeight = $(window).height() - 120; - $('#sidebar .module-tree,#mainContent .module-col,#extendWin').css('height', paneHeight); - $(' #mainContent .module-content, #editWin').css('height', paneHeight - 6); -} - -/** - * Init module tree by zui. - * - * @access public - * @return void - */ -function initModuleTree() -{ - $('#moduleTree').tree( - { - data: moduleTree, - initialState: 'active', - itemCreator: function($li, item) - { - $li.append('' + item.title + ''); - if (item.active) $li.addClass('active open in'); - } - }); - - $('#moduleTree').on('click', 'a', function(e) - { - var target = $(e.target); - if (target.attr('data-has-children') === 'true') return; - $('#extendWin').attr('src', createLink('editor', 'extend', 'moduleDir=' + target.attr('data-module'))); - - $(this).closest('.side-col').find('li.active').removeClass('active'); - $(this).parent().addClass('active'); - $(this).parent().parent().parent().addClass('active'); - }) - - $firstModule = $('#moduleTree li a:not([data-has-children="true"])'); - if($firstModule.length) - { - $firstModule = $firstModule.eq(0); - $firstModule.closest('li.has-list').addClass('open in'); - $firstModule.trigger('click'); - } -} diff --git a/module/entry/css/browse.css b/module/entry/css/browse.css deleted file mode 100644 index d899295df2..0000000000 --- a/module/entry/css/browse.css +++ /dev/null @@ -1,3 +0,0 @@ -.c-code {width: 100px;} -.c-key {width: 280px;} -#entryList tbody>tr>td {white-space: nowrap; text-overflow: ellipsis; overflow: hidden;} diff --git a/module/entry/css/create.css b/module/entry/css/create.css deleted file mode 100644 index 1d87206e8d..0000000000 --- a/module/entry/css/create.css +++ /dev/null @@ -1 +0,0 @@ -.help {margin-left: 10px;} diff --git a/module/entry/css/edit.css b/module/entry/css/edit.css deleted file mode 100644 index 1d87206e8d..0000000000 --- a/module/entry/css/edit.css +++ /dev/null @@ -1 +0,0 @@ -.help {margin-left: 10px;} diff --git a/module/entry/css/log.css b/module/entry/css/log.css deleted file mode 100644 index 13f8c7b9aa..0000000000 --- a/module/entry/css/log.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-id {width: 60px;} -.c-date {width: 160px;} diff --git a/module/entry/js/create.js b/module/entry/js/create.js deleted file mode 100644 index 4ca8a8d87c..0000000000 --- a/module/entry/js/create.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * create key for an entry. - * - * @access public - * @return void - */ -function createKey() -{ - var chars = '0123456789abcdefghiklmnopqrstuvwxyz'.split(''); - var key = ''; - for(var i = 0; i < 32; i ++) - { - key += chars[Math.floor(Math.random() * chars.length)]; - } - $('#key').val(key); - - return false; -} - -$(function() -{ - $('#allIP').change(function() - { - if($(this).prop('checked')) - { - $('#ip').attr('disabled', 'disabled'); - } - else - { - $('#ip').removeAttr('disabled'); - } - }) - - $('#name').focus(); - - $("input[id^=freePasswd]").change(function() - { - if($(this).val() == 1) - { - $('#account').closest('tr').addClass('hidden'); - } - else - { - $('#account').closest('tr').removeClass('hidden'); - } - }) -}); diff --git a/module/entry/js/edit.js b/module/entry/js/edit.js deleted file mode 100644 index c252a6b5c7..0000000000 --- a/module/entry/js/edit.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * create key for an entry. - * - * @access public - * @return void - */ -function createKey() -{ - var chars = '0123456789abcdefghiklmnopqrstuvwxyz'.split(''); - var key = ''; - for(var i = 0; i < 32; i ++) - { - key += chars[Math.floor(Math.random() * chars.length)]; - } - $('#key').val(key); - return false; -} - -$(function() -{ - $('#allIP').change(function() - { - if($(this).prop('checked')) - { - $('#ip').attr('disabled', 'disabled'); - } - else - { - $('#ip').removeAttr('disabled'); - } - }) - - $('#name').focus(); - - $("input[id^=freePasswd]").change(function() - { - if($(this).val() == 1) - { - $('#account').closest('tr').addClass('hidden'); - } - else - { - $('#account').closest('tr').removeClass('hidden'); - } - }) -}); diff --git a/module/execution/css/all.css b/module/execution/css/all.css deleted file mode 100755 index 81bb4a7bde..0000000000 --- a/module/execution/css/all.css +++ /dev/null @@ -1,19 +0,0 @@ -#main {padding-bottom: 0;} -#myTable .dtable-header, #executionsForm .dtable-rows {z-index: 4;} -.table-header.fixed-right > .btn-toolbar {right: 0; background-color: #f1f5f9;} - -#myTable input[type=checkbox] {margin: 0px} - -.table-footer {border-top: 1px solid #fff4ea} -.table-footer .pager{z-index: 10} -#myTable .scrollbar {z-index: 11} - -.dtable {--dtable-checked-bg: #fff4ea; --dtable-border-color: #f4f5f7} -.dtable-row {border-bottom-style: solid;} -.dtable-cell-html a{color: #2463c7} -.dtable-cell[data-sort='up'] .dtable-sort:before {color: #000; opacity: 1} -.dtable-cell[data-sort='down'] .dtable-sort:after {color: #000; opacity: 1} -.dtable .toggle-icon {border-radius: 50%; border-style: solid;} -.dtable-nested-toggle.is-no-child {display: block; opacity: 0; pointer-events: none;} - -.dtable-row.is-normal .dtable-cell[data-col="name"] {padding-left: 20px;} diff --git a/module/execution/css/batchedit.css b/module/execution/css/batchedit.css deleted file mode 100644 index 76393a2f7f..0000000000 --- a/module/execution/css/batchedit.css +++ /dev/null @@ -1,7 +0,0 @@ -.c-id {width: 50px;} -.c-team-name {width: 120px;} -.c-project, .c-user, .c-code, .c-desc, .c-days {width: 150px;} -.c-method {width: 70px;} -.c-type > .icon-help {vertical-align: text-top;} -.c-type > .popover .popover-content {font-weight: 400;} -#executionForm tbody td {vertical-align: top;} diff --git a/module/execution/css/bug.css b/module/execution/css/bug.css deleted file mode 100644 index 0bb7c60563..0000000000 --- a/module/execution/css/bug.css +++ /dev/null @@ -1,13 +0,0 @@ -.assign-menu.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;} -.assign-menu.dropdown-menu > .assign-search .input-group {width: 100%;} -.assign-menu.dropdown-menu > .assign-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666;} -.assign-menu.dropdown-menu > .assign-search .form-control {border: none !important; box-shadow: none !important; border-top: 1px solid #ddd !important;} -.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto; margin: 0;} -.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;} -.dropdown-list > li > a:hover, -.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} - -.c-severity {width: 80px;} -.c-confirmed {overflow: hidden;} -.c-deadline {text-align: center;} -#main {padding-bottom: 40px;} diff --git a/module/execution/css/build.css b/module/execution/css/build.css deleted file mode 100644 index 41c9e414dd..0000000000 --- a/module/execution/css/build.css +++ /dev/null @@ -1,4 +0,0 @@ -.table-group-btns {width: 200px;} -.fixed-header-copy .group-menu .btn {background-color: transparent; color: #fff;} -.fixed-header-copy .group-menu .btn .icon {background: transparent !important; color: #fff; opacity: .5;} -.icon-caret-right.text-muted {color: #CBD0DB;} \ No newline at end of file diff --git a/module/execution/css/burn.css b/module/execution/css/burn.css deleted file mode 100644 index 71e7d4b506..0000000000 --- a/module/execution/css/burn.css +++ /dev/null @@ -1,11 +0,0 @@ -.main-content > h2 {font-size: 16px;} -#burnWrapper {max-width: 1200px; margin: 0 auto; padding: 25px 100px 10px; position: relative;} -#burnYUnit {position: absolute; color: #CBD0DB; top: 0; left: 90px;} -#burnXUnit {position: absolute; color: #CBD0DB; bottom: 20px; right: 60px;} -#burnLegend {position: absolute; right: 0; width: 80px; height: 60px; top: 50%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px;} -#burnLegend > div {position: relative; padding-left: 30px;} -#burnLegend > div > .barline {position: absolute; width: 20px; left: 0; top: 13px; height: 3px; background: #EEEEEE;} -#burnLegend .line-real .bg-primary {background: #1183fb;} -#burnLegend .line-real .bg-delay {background: red;} - -.pull-left .input-control {margin-right: 10px;} diff --git a/module/execution/css/cfd.css b/module/execution/css/cfd.css deleted file mode 100644 index 8d2ea2ab32..0000000000 --- a/module/execution/css/cfd.css +++ /dev/null @@ -1,37 +0,0 @@ -.main-content > h2 {font-size: 16px;} -#mainContent h2 .icon-help {font-size: 16px; vertical-align: text-bottom;} -.tooltip-inner {font-size: 13px; letter-spacing: 1px; line-height: 22px; max-width: 400px !important; text-align: left;} -.container {max-width: 1700px !important} - -.pull-left .input-control {margin-right: 10px;} - -#cfdWrapper {max-width: 1450px; padding: 25px 0px 10px; position: relative} -#cfdChart {margin: 0 auto;} -@media screen and (max-width: 1920px) -{ -#cfdChart {width:1400px !important; height:600px !important} -#mainContent {min-width: 1400px !important;} -#burnStatistics {left: 1400px !important;} -} -@media screen and (max-width: 1680px) -{ -#cfdChart {width:1150px !important; height:500px !important} -#mainContent {min-width: 1150px !important;} -#burnStatistics {left: 1150px !important;} -} -@media screen and (max-width: 1366px) -{ -#cfdChart {width:1000px !important; height:400px !important} -#mainContent {min-width: 1000px !important;} -#burnStatistics {left: 1000px !important;} -} - -#mainContent {min-width: 1200px;} -#burnStatistics {position: absolute; width: 180px; left: 1200px; height: 200px; top: 20%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px; border: 1px solid #dcdcdc; background-color: #F8F8F8; padding: 15px 20px; color: #3c4353; border-radius: 8px;} -#burnStatistics .bg-primary {margin-right: 5px;} -#burnStatistics .icon-help {color: black;} -#burnStatistics h3 {margin-top: 10px; text-indent: 10px; margin-bottom: 30px;} - -#cfdDateSelect {float: left;} -#cfdDateSelect .input-group {width: 300px; float: left;} -#datePreview {float: left; margin-left: 10px;} diff --git a/module/execution/css/create.css b/module/execution/css/create.css deleted file mode 100644 index 8ba2c65184..0000000000 --- a/module/execution/css/create.css +++ /dev/null @@ -1,42 +0,0 @@ -[lang^='en'] #newTipsModal {margin-top: 10%; max-width: 620px;} -[lang^='zh-cn'] #newTipsModal {margin-top: 10%; max-width: 530px;} -[lang^='zh-cn'] #classicTipsModal {margin-top: 10%; max-width: 420px;} -[lang^='en'] #classicTipsModal {margin-top: 10%; max-width: 450px;} -.chosen-container-single .chosen-single > span {max-width: 100%;} - -#copyProjectModal {padding: 0;} -#copyProjectModal {padding: 0 2px;} -#copyProjectModal > div {position: relative;} -#copyProjectModal a {display: block; min-height: 30px; line-height: 30px; padding: 5px 15px; border: 1px solid #e5e5e5; color: #333; margin: 5px 0; border-radius: 3px;} -#copyProjectModal a > i {display: inline-block; margin-right: 5px;} -#copyProjectModal a:hover {border: 1px solid #00a9fc; background-color: #E9F2FB; text-decoration: none;} -#copyProjectModal a.active {border-color: #00da88; color: #00da88; background-color: #E5FFE6;} -#copyProjectModal a.active:after {position: absolute; content: '\e92f'; font-family: ZentaoIcon; font-size: 20px; right: 25px;} -#copyProjectModal a.cancel {color: #ff5d5d;} - -.checkbox input[type=checkbox], .checkbox-inline input[type=checkbox], .radio input[type=radio], .radio-inline input[type=radio] {margin-top: 1px;} - -#lifeTimeTips {display: none;} -#teams_chosen .chosen-drop ul li .label {margin-top: 3px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} - -.chosen-container.chosen-highlight-selected .disabled-result.result-selected {background: none;} - -.productsBox .row .col-sm-4 {padding-right: 13px;} -.plansBox .row {display: inline-table; width: 102%;} -.plansBox .row .col-sm-4 {display: inline-block; float: none; padding-right: 13px;} - -#dateRange {vertical-align: top; padding-top: 13px;} -#dateRangeOption {vertical-align: top; padding-top: 13px;} -#beginLabel {white-space: nowrap;} -#endLabel {white-space: nowrap;} -#copyProjectModal .projectSelect {display: inline-block; margin-left: 10px; width: 20%;} -#copyProjectModal .titleBox{position: relative; bottom: 3px; display: inline-block;} -#copyProjectModal .projectSelect a.chosen-single > div > b {top: -4px !important;} - -.productsBox a {border-radius: 2px !important;} -.productsBox .required:after {right: -9.5px !important;} -.productsBox .input-group-addon > div {display: inline-block !important;} -.productsBox .required + .text-danger.help-text {position: relative; left: 10px;} -.productsBox > #productNameLabel {padding-top: 8px;} -.productsBox div[id^='branch'].chosen-disabled {pointer-events: none;} -.methodTip icon:before {margin-bottom: 5px;} diff --git a/module/execution/css/dynamic.css b/module/execution/css/dynamic.css deleted file mode 100644 index 8ef4ebd3a6..0000000000 --- a/module/execution/css/dynamic.css +++ /dev/null @@ -1,35 +0,0 @@ -#mainMenu .btn-group ul.dropdown-menu {max-height: 300px; overflow: auto;} -#dynamics {padding: 10px 0;} -.dynamic {position: relative; padding-left: 170px;} -.dynamic-date {position: absolute; left: 0; top: 0; width: 150px; border: 2px solid #eee; border-radius: 4px; padding: 14px 20px; height: 58px;} -.dynamic-date:before {content: ' '; display: block; position: absolute; right: -22px; top: 26px; height: 2px; width: 20px; background-color: #eee;} -.dynamic-date > .date-label, -.dynamic-date > .date-text {font-size: 18px; display: block;} -.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;} -.dynamic-date > .date-label {margin-top: -8px;} -.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;} -.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; transition: max-height .2s; overflow: hidden;} -.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;} -.dynamic .timeline-text {color: #3C4353;} -.dynamic .text-muted {color: #838A9D;} -.dynamic .label-id {top: -1px; border: 1px solid rgba(131,138,157,0.25); color: #838A9D;} -.dynamic.active .timeline, -.dynamic.active .dynamic-date {border-color: #00a9fc;} -.dynamic.active .dynamic-date:before {background-color: #00a9fc;} -.dynamic.collapsed .timeline {max-height: 58px;} -.dynamic.collapsed .timeline > li + li {display: none;} -.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';} - -.timeline > li:before {left: -26px;} -.timeline > li + li:after {left: -23px;} -.timeline-text {margin-left: -18px;} -.label-action {padding: 0 4px;} -.label-id {margin-left: 4px;} -.timeline > li.active:before {left: -30px;} -.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;} -.timeline > li.collected > div:after {background-color: #FFAF65;} -.timeline > li.releaseddoc > div:after {background-color: #66A2FF;} -.timeline > li > div:after {left: -27px;} -.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;} -.timeline > li > div > .timeline-text > a {color: #313C52;} diff --git a/module/execution/css/edit.css b/module/execution/css/edit.css deleted file mode 100644 index b02143f914..0000000000 --- a/module/execution/css/edit.css +++ /dev/null @@ -1,13 +0,0 @@ -.chosen-container-single .chosen-single > span {max-width: 100%;} - -#plansBox .row {display: inline-table; width: 102%;} -#plansBox .row .col-sm-4 {display: inline-block; float: none;} - -.chosen-container.chosen-highlight-selected .disabled-result.result-selected {background: none;} - -#dateRange {vertical-align: top; padding-top: 13px;} -.form-date {min-width: 90px;} - -.productsBox div[id^='branch'].chosen-disabled {pointer-events: none;} - -#dataform th.c-name, #dataform th.c-projectName, #dataform th.c-method {width: 120px;} diff --git a/module/execution/css/executionkanban.css b/module/execution/css/executionkanban.css deleted file mode 100644 index 69673ddfbb..0000000000 --- a/module/execution/css/executionkanban.css +++ /dev/null @@ -1,10 +0,0 @@ -#kanbanList .panel-body {padding: 10px!important;} -#kanbanList .kanban-header {min-height: 32px!important;} -#kanbanList .kanban-header-col {height: 32px!important; padding: 0!important;} -#kanbanList .kanban-header-col > .title {padding: 0 5px!important;} -#kanbanList .kanban-col[data-type="project"] .kanban-lane-items {height: 100%; display: flex; flex-direction: column; justify-content: center;} -#kanbanList .kanban-lane-name > .text {display: none;} -#kanbanList .kanban-item.link-block > a {cursor: move;} -#kanbanList .kanban-lane + .kanban-lane {margin-top: 2px!important;} - -.kanban.kanban-dragging {overflow: hidden!important;} diff --git a/module/execution/css/grouptask.css b/module/execution/css/grouptask.css deleted file mode 100644 index 2e54857cc4..0000000000 --- a/module/execution/css/grouptask.css +++ /dev/null @@ -1,29 +0,0 @@ -.table-group-btns {width: 200px;} -.group-menu {padding: 1px 5px !important;} -.group-menu .btn {font-size: 14px; color: #3C4353;} -.fixed-header-copy .group-menu .btn {background-color: transparent; color: #fff;} -.fixed-header-copy .group-menu .btn .icon {background: transparent !important; color: #fff; opacity: .5;} -.icon-caret-right.text-muted {color: #CBD0DB;} -.segments-list {max-width: 700px; margin: 10px;} -.segments-list .table-col {vertical-align: middle;} -.segments-list .segments {width: 150px; margin: 0 auto;} -.segment {float: left; line-height: 18px;} -.segment + .segment > .segment-title:before {content: '/'; display: inline-block; padding: 0 4px;} -.segment + .segment > .segment-value {padding-left: 10px;} -.segment-title {color: #828A9D; font-size: 12px;} -.segment-value {font-weight: bold;} - -.group-menu > .dropdown > .dropdown-menu {right: 0; width: 100%;} - -.table-grouped .c-side {padding: 0 !important; position: relative; min-height: 100px;} -.group-header {padding: 8px; position: relative;} -.group-header > a {line-height: 20px; display: block; max-height: 40px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;} -.group-header > .groupSummary {margin-top: 10px; line-height: 24px;} -.main-table > .table {box-shadow: none;} -.c-side-lg .group-header {display: flex; flex-direction: column; position: absolute; top: 0; right: 0; left: 0; bottom: 0; justify-content: space-between;} -.is-firefox .group-header:before {content: ' '; position: absolute; top: 0; right: 0; left: 0; bottom: 0; background: #fff; z-index: 0;} -.is-firefox .group-header > a, -.is-firefox .group-header > .groupSummary {position: relative; z-index: 1;} -.c-hours {white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;} -.c-user, .c-type {width: 70px;} -.c-progress {width: 60px;} diff --git a/module/execution/css/importbug.css b/module/execution/css/importbug.css deleted file mode 100644 index e2362c0102..0000000000 --- a/module/execution/css/importbug.css +++ /dev/null @@ -1 +0,0 @@ -#importBugForm {min-height: 250px;} diff --git a/module/execution/css/importtask.css b/module/execution/css/importtask.css deleted file mode 100644 index 0868256e3c..0000000000 --- a/module/execution/css/importtask.css +++ /dev/null @@ -1,5 +0,0 @@ -#fromexecution_chosen .chosen-single {max-width: 220px;} -#fromexecution_chosen .chosen-drop {white-space: nowrap;} -.c-name {min-width: 200px;} -.c-hour {width: 80px;} -#importTaskForm {min-height: 350px;} diff --git a/module/execution/css/kanban.css b/module/execution/css/kanban.css deleted file mode 100644 index 5bb4db701f..0000000000 --- a/module/execution/css/kanban.css +++ /dev/null @@ -1,123 +0,0 @@ -#TRAction .icon {padding: 0px 6px; font-size: 14px} - -.has-error .form-control {border-color: #ff4268!important;} -.has-error .form-control:focus {box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 6px #f5b2a5!important;} -.has-error .form-control::placeholder {color: #ff4268!important;} - -.label.text-red {background: #ff4268 !important; color: #ffffff;} - -.dropdown-menu > li {padding: 0 10px;} -.dropdown-menu > li > a > .icon {position: relative; left: -5px;} - -#kanbanContainer {padding-bottom: 0; margin-bottom: 0;} -#kanbanContainer.fullscreen {overflow: auto;} - -.region {border: 1px solid #dcdcdc; background-color: #fff;} -.region + .region {margin-top: 20px;} -.region .region-header {padding: 10px;} -.region .region-header strong {font-size: 14px; color: #999EAB} -.region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px} -.region .region-header .action {float: right} -.region .region-actions {float: right; position: relative; top: -6px; right: -6px;} -.region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;} -.region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;} -.region .sort .region-header {cursor: move;} - -.region .kanban {padding: 0px 10px 10px 10px; min-height: unset; overflow: auto; width: 100%;} -.region .kanban .form-actions {margin: 0;} -.region .kanban .form-actions .btn {margin-right: 10px; min-width: 50px;} - -.region .kanban-board + .kanban-board {margin-top: 20px;} -.region .kanban-board > .kanban-header > .kanban-group-header {padding: 8px 2px; width: 20px;} -.region .kanban-board > .kanban-header > .kanban-group-header:hover {cursor: move;} -.region .kanban-board.sort > .kanban-header {padding-left: 0;} - -.region .kanban-header {border-bottom: none!important; min-width: max-content; min-width: -moz-max-content;} -.region .kanban-header-col > .title {max-width: 80% !important;} -.region .kanban-header-col > .title {margin: 0} -.region .kanban-header-col > .title > span {display: inline-block; overflow: hidden; padding-right:2px; position: initial; max-width: 85px !important;} -.region .kanban-header-col > .title > .storyColumn {margin-right: 30px;} -.region .kanban-header-col > .title > .storyColumn .text {font-weight: 700; color:rgb(51, 51, 51);} -.region .kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;} -.region .kanban-header-col > .title > .text-grey {opacity: .5; font-weight: bold; color: #8b91a2;} -.region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;} -.region .kanban-header-col > .title > .error {color: #333333; padding-left: 2px; font-size: 10px; padding-top: 1px; padding-right: 2px;} -.kanban-affixed .kanban-header-col > .title > .text {color: #fff!important} -.region .kanban-header-col > .actions {position: relative; right: 5px;} -.region .kanban-header-parent-col > .actions {position: absolute; right: 0px;} -.region .kanban-header-sub-cols .actions {position: absolute; right: 0px;} -.region .kanban.kanban-dragging {overflow: hidden;} - -.region .kanban-lane {position: relative; border-bottom: none!important; min-height: 200px !important} - -.region .kanban-lane > .kanban-lane-name > .text {margin: auto 0; max-height: 150px; overflow: hidden; text-overflow: ellipsis} -.region .kanban-lane > .kanban-lane-name > .actions {position: absolute; top: 0; left: 0; right: 0; opacity: 0;} -.region .kanban-lane > .kanban-lane-name > .actions > a {display: block; width: 20px; height: 20px; line-height: 20px; text-align: center; opacity: .7; color: #fff;} -.region .kanban-lane > .kanban-lane-name > .actions > a:hover {background-color: rgba(0,0,0,.2); opacity: 1;} -.region .kanban-lane > .kanban-lane-name:hover > .actions {opacity: 1;} -.region .kanban-lane.sort > .kanban-lane-name {cursor: move;} - -.region .kanban-lane-col {max-height: unset !important; overflow: auto!important; position: relative;} -.region .kanban-lane-col.has-scrollbar > .kanban-lane-actions {position: absolute; background-color: inherit; bottom: 0; left: 0; right: 0;} - -.region .kanban-lane-items {overflow: auto; padding-bottom: 10px;} - -.region .kanban-item {position: relative} - -.kanban-card {min-height: 60px !important; height: auto;} - -.cardcolor {width:40px; height: 14px; float: left; margin-left: 5px; margin-right: 5px; margin-top: 2px; border-radius: 2px;} - -.kanban-col[data-type=ADD] {display: none;} -.kanban-col[data-type=EMPTY] {display: none;} -.kanban-col {padding-right: 0px !important;} -.gray .actions {display:none;} - -.c-type {width: 150px !important; overflow: unset;} -.c-group {width: 190px !important; overflow: unset;} -.c-type {margin-left: 0px !important;} - -#kanbanScaleControl {width: 100px;} -#kanbanScaleControl .input-group-addon {background: #fff; padding: 5px;} -#kanbanScaleControl > .input-group-btn:first-child > .btn {border-radius: 16px 0 0 16px; border-right-color: transparent;} -#kanbanScaleControl > .input-group-btn:last-child > .btn {border-radius: 0 16px 16px 0; border-left-color: transparent;} -#kanbanScaleControl > .input-group-btn > .btn:hover {border-color: #b8bfce;} -#kanbanActionMenu {top: 24px; right: 57px;} - -.kanban + .kanban {margin-top: 15px} -.kanban-card > .title {display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis} -.kanban-card > .infos {position: relative; margin-top: 5px} -.kanban-card > .infos > .info + .info {margin-left: 8px} -.kanban-card > .infos > .info-id, -.kanban-card > .infos > .info-deadline, -.kanban-card > .infos > .info-estimate {font-size: 12px; position: relative; top: 2px} -.kanban-card > .infos > .label-pri {min-width: 16px; line-height: 14px; height: 16px; padding: 0} -.kanban-card > .infos > .label-severity {transform: scale(.75)} -.kanban-card > .infos > .avatar {position: absolute; right: 0; top: 0} -.kanban-card > .actions {position: absolute; top: 4px; right: 4px; opacity: 0;} -.kanban-card:hover > .actions {opacity: 1;} -.kanban-card > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;} -.kanban-card > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;} - -#kanban .kanban-card[data-scale-size="4"] {padding: 10px !important; min-height: 47px !important; height: 47px !important;} -#kanban .kanban-card[data-scale-size="3"] {padding: 3px 4px;} -#kanban .kanban-card[data-scale-size="3"] > .title {white-space: normal; max-height: 100%;} -#kanban .kanban-card[data-scale-size="2"] {padding: 3px 8px; overflow: hidden;} -#kanban .kanban-card[data-scale-size="2"] > .title {display: inline; line-height: 18px; white-space: normal; max-height: 100%; word-break: break-all;} -#kanban .kanban-card[data-scale-size="2"] > .infos {display: inline-block; height: 18px; vertical-align: top; margin: 0;} -#kanban .kanban-card[data-scale-size="2"] > .infos > .info-pri {transform: scale(.8); vertical-align: top;} -#kanban .kanban-card[data-scale-size="2"] > .infos > .avatar {display: inline-block; transform: scale(.8); position: relative; top: -2px; vertical-align: top; margin-right: -1px;} -#kanban .kanban-card[data-scale-size="2"] > .infos > .info-estimate {top: -1px;} - -#mainMenu .divider {margin: 10px} - -.modal-header {padding: 15px 0;} -#rdKanbanSearch.input-group {float: left; width: min-content;} -#rdKanbanSearchInput {width: 150px;} -#rdSearchBox {display: none; width: 150px;} -.btn-link.querybox-toggle {background-color: rgba(0,0,0,0);} - -#kanban .kanban-affixed .kanban-header-col .title.action-dbc {pointer-events: none;} -#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .text {color: #fff;} -#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .caret {display: none;} -.kanban-card a[disabled] {color: #313c52;} diff --git a/module/execution/css/linkstory.css b/module/execution/css/linkstory.css deleted file mode 100644 index bbabdce486..0000000000 --- a/module/execution/css/linkstory.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-object {width: 160px;} -.c-branch, .c-estimate {width: 80px;} diff --git a/module/execution/css/managemembers.css b/module/execution/css/managemembers.css deleted file mode 100644 index 5e0732d35a..0000000000 --- a/module/execution/css/managemembers.css +++ /dev/null @@ -1,29 +0,0 @@ -.outer .container .table-form {margin-top: 0;} -.outer .table tr > th:first-child, .outer .table tr > td:first-child {padding-left: 5px;} - -.modal-dialog {margin-top: 10%;} - -.table-form thead > tr > th {background: none; border: none;} - -#titlebar {min-height: 46px;} -#titlebar > .heading {float: left; padding-right: 10px !important;} -#titlebar > .heading > .icon {display: inline;} - -#importTeams {float: left; position: relative; top: -7px;} -#importTeams .input-group {width: 250px; float: left;} -#importTeams .input-group +.input-group {margin-left: 5px;} - -#dept_chosen .chosen-single {width: 220px;} -#execution_chosen .chosen-single {width: 230px;} -#execution_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} -.radio-inline {line-height: normal;} -#dept + .picker {width: 220px;} -#execution + .picker {width: 230px;} -#mainMenu .picker-has-value {float: left;} - -#teamForm .table tr > td:first-child {padding-left: 10px;} -#teamForm .table tr > td:last-child {padding-right: 10px;} - -.c-limited {width: 110px;} -.c-actions {width: 90px;} -.c-hours {width: 90px;} diff --git a/module/execution/css/manageproducts.css b/module/execution/css/manageproducts.css deleted file mode 100644 index 3be7a6cec0..0000000000 --- a/module/execution/css/manageproducts.css +++ /dev/null @@ -1,9 +0,0 @@ -#productsBox .product {border: 1px solid #ddd; margin-bottom: 5px; position: relative; height: 40px; border-radius: 4px;} -#productsBox .product:hover {background: #f1f1f1;} -#productsBox .product.checked, -#productsBox .product.checked:hover {background: #E5FFE6; border: 1px solid #229F24;} -#productsBox .product .checkbox-primary {padding: 9px; cursor: pointer;} -#productsBox .product.has-branch {padding-right: 40%;} -#productsBox .product.has-branch > .picker {position: absolute; width: 40% !important; right: 3px; top: 3px; background-color: unset;} -#productsBox .product.has-branch > .picker > .picker-selections {background: rgba(0,0,0,.05);} -#productsBox .product.has-branch > .picker > .picker-selections:hover {background: #fff;} diff --git a/module/execution/css/setkanban.css b/module/execution/css/setkanban.css deleted file mode 100644 index 5cd52009b7..0000000000 --- a/module/execution/css/setkanban.css +++ /dev/null @@ -1,10 +0,0 @@ -#mainContent tr > th{width: 66px;} -[lang^='en'] #mainContent tr > th, [lang^='de'] #mainContent tr > th, [lang^='fr'] #mainContent tr > th{width: 105px;} - -#mainContent .table-form > tbody > tr > th {vertical-align: top; padding-right: 5px;} -#mainContent .radio-inline {display: block;} -#mainContent .radio-inline+.radio-inline {margin-left: 0px; padding-top: 8px;} -#mainContent label > .tip {color: #999;} -#mainContent #cardBox th {vertical-align: middle;} -#colWidth + .fixedTip, #maxColWidth + .autoTip {margin-left: 35px; color: #2667E3; padding-top: 1px;} -[lang^=en] #colWidth + .fixedTip, [lang^=en] #maxColWidth + .autoTip, [lang^=de] #colWidth + .fixedTip, [lang^=de] #maxColWidth + .autoTip, [lang^=fr] #colWidth + .fixedTip, [lang^=fr] #maxColWidth + .autoTip {margin-left: 50px;} diff --git a/module/execution/css/story.css b/module/execution/css/story.css deleted file mode 100644 index 2eff8dd035..0000000000 --- a/module/execution/css/story.css +++ /dev/null @@ -1,37 +0,0 @@ -#linkButton {border-radius: 4px !important;} -tbody > tr > td > .btn-icon {margin-right: 4px;} -.table td.c-estimate {padding-right: 12px;} -#modules a.active {color: #0c64eb;} -@media (max-width: 1200px) {#storyList .c-user, #storyList .c-estimate {display: none !important;};} -@media (max-width: 1000px) {#storyList .c-status, #storyList .c-pri {display: none !important;};} -@media (max-width: 820px) {#storyList .c-sort, #storyList .c-stage {display: none !important;};} -#batchToTask .checkbox-primary {display: inline-block; margin-left: 10px;} -th.c-pri{width:50px;} -.c-estimate {width: 50px;} -.c-user {width: 70px;} -.c-assignedTo {width: 100px;} -.c-category {width: 75px;} -.c-actions-7 {width: 195px;} -.closed-story {color: #e5e5e5;} -.stageBox {height: 180px; overflow: scroll; background: #ffffff;} -#executionStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} - -.panel-actions {position: relative; padding: 0;} -.switchBtn {background-color: #fff !important;} -.switchBtn > i {padding-left: 7px;} -#main>.container {padding: 0 20px 20px 23px;} -#executionStoryForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} - -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} -.table td.has-child > a:not(.story-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.table td.has-child > .story-toggle {color: #838a9d; position: relative; top: 1px;} -.table td.has-child > .story-toggle:hover {color: #006af1; cursor: pointer;} -.table td.has-child > .story-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} -.table td.has-child > .story-toggle > .icon:before {text-align: left;} -.table td.has-child > .story-toggle.collapsed > .icon {-ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);} -.table td.c-estimate {padding-right: 12px;} -.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} -.table-footer {z-index: 1;} -#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px} \ No newline at end of file diff --git a/module/execution/css/storykanban.css b/module/execution/css/storykanban.css deleted file mode 100644 index 3767d50359..0000000000 --- a/module/execution/css/storykanban.css +++ /dev/null @@ -1,48 +0,0 @@ -.boards {display: table; table-layout: fixed; width: auto;} -.boards .board:not(:last-child) {border-right: 1px solid #ddd;} -.board {display: table-cell; width: 16.666666667%; padding: 10px; border: 1px solid transparent; transition: background-color .2s, opacity .2s; vertical-align: top;} -.board-item {border: 1px solid #EBEBEB; padding: 5px 10px; cursor: move; border-radius: 2px; background-color: #fff; transition: border .2s, opacity .2s; overflow: hidden;} -.board-item.disabled {cursor: not-allowed;} -.board-item:hover {border-color: #ccc;} -.board-item > .title {line-height: 20px; max-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; word-break: break-all;} -.board-item > .info {line-height: 22px; margin-top: 6px;} -.board-item + .board-item {margin-top: 10px;} -.board-item .task-left {float: right; font-size: 12px; color: #a6aab8;} -.board.can-drop-in {background-color: #fff !important; opacity: 1 !important;} -.c-board.dragging {color: #006af1;} -.board.drop-to {background-color: #fff0d5 !important;} -.board-drag-holder {background: #ccc; background: rgba(0, 0, 0, .1); border-radius: 2px; border: 1px solid rgba(0,0,0,.05); display: none;} -.board.drop-to .board-drag-holder {display: block;} -.board-item + .board-drag-holder {margin-top: 10px;} -.board-item.dragging {opacity: .35;} -.board-item .btn {padding: 2px 10px 2px 30px; font-size: 12px;} -.board-item .btn-icon-left > .icon {width: 22px; height: 22px; line-height: 20px; font-size: 14px;} -.board-item .status {line-height: 20px; display: inline-block; vertical-align: middle;} -#kanban {overflow-y: auto;} -#kanban > .table {min-width: 1100px;} -#kanban.dragging .boards.dragging .board {background: #eee; opacity: .35; border-color: #f1f1f1;} -#kanban thead .c-side {padding: 5px;} -#kanban .label-pri {width: 16px; height: 16px; line-height: 14px; min-width: 16px; font-size: 12px; padding: 0;} -#kanban tbody > tr > td {line-height: 24px;} -#kanban .c-board {border-bottom: 4px #EAF3FC solid;} -#kanban .c-board.s-projected {border-color: #7EC5FF;} -#kanban .c-board.s-developing {border-color: #0991FF;} -#kanban .c-board.s-developed {border-color: #0BD986;} -#kanban .c-board.s-testing {border-color: #fdc137;} -#kanban .c-board.s-tested {border-color: #CBD0DB;} -#kanban .c-board.s-verified {border-color: #838A9D;} -#kanban .c-board.s-released {border-color: #000;} -#kanban .table-grouped tbody > tr:hover {background: transparent;} -#kanban .c-boards, #kanban td.c-side {border-bottom: 1px solid #eee;} -#kanban .group-info > span + span {display: inline-block; margin-left: 8px;} -#kanban th.c-board {color: #3c4353; font-weight: bold;} -#kanban .fix-table-copy-wrapper {overflow: visible !important;} -#kanban .fix-table-copy-wrapper th.c-board {color: #eee;} -.story-estimate {margin-right: 5px;} - -.table-grouped > tbody > tr, -.table-grouped > tbody > tr:hover {background: #fff !important;} - -.panel-actions {position: relative; padding: 0;} -.switchBtn {background-color: #fff !important;} -.switchBtn > i {padding-left: 7px;} diff --git a/module/execution/css/task.css b/module/execution/css/task.css deleted file mode 100644 index e077d455af..0000000000 --- a/module/execution/css/task.css +++ /dev/null @@ -1,13 +0,0 @@ -#int-dropdown {margin-left: -8px; border-radius: 4px; border: 1px solid #0c64eb;} -#projectTaskForm table tbody tr td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.table td.c-estimate, .table td.c-consumed, .table td.c-left {padding-right: 12px;} -.c-estimate {text-align: right;} -.c-consumed {text-align: right;} -.c-deadline {text-align: center;} -.c-left {text-align: right;} -.table-footer {z-index: 1;} -.btn-toolbar > .btn {margin-right: 5px !important;} -#taskList .c-progress{padding-right: 8px; text-align: right;} -#datatable-taskList .c-progress{padding-right: 8px; text-align: right;} -.c-finishedBy, .c-lastEditedBy {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -#executionTaskForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} \ No newline at end of file diff --git a/module/execution/css/team.css b/module/execution/css/team.css deleted file mode 100644 index 97a46daf2a..0000000000 --- a/module/execution/css/team.css +++ /dev/null @@ -1,2 +0,0 @@ -#memberList tbody td {text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} -.c-limited {width: 100px;} diff --git a/module/execution/css/testcase.css b/module/execution/css/testcase.css deleted file mode 100644 index 4037191ccc..0000000000 --- a/module/execution/css/testcase.css +++ /dev/null @@ -1,5 +0,0 @@ -.c-id, .c-pri {width: 50px;} -.c-result {width: 80px;} -#pageNav #dropMenu .col-left {padding-bottom: 0px;} -#currentBranch + #dropMenu .col-left {padding-bottom: 30px;} -.status-blocked {left: -5px;} diff --git a/module/execution/css/testtask.css b/module/execution/css/testtask.css deleted file mode 100644 index 36c6fbf838..0000000000 --- a/module/execution/css/testtask.css +++ /dev/null @@ -1,7 +0,0 @@ -.table-group-btns {width: 200px;} -.table-footer, -.table-grouped {box-shadow: none !important;} -.table-footer {margin-top: 10px;} -.table-grouped > thead>tr>th.c-id, -.table-grouped > tbody>tr>td.c-id {padding-left: 15px;} -.table-grouped > tbody>tr>td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} diff --git a/module/execution/css/tree.css b/module/execution/css/tree.css deleted file mode 100644 index d63d3b39f8..0000000000 --- a/module/execution/css/tree.css +++ /dev/null @@ -1,68 +0,0 @@ -.tree li.has-list.open:before {border-left: none;} -#taskTree li {padding: 0 0 0 8px;} -#taskTree li.has-list {padding-left: 20px;} -#taskTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px; height: 30px;} -#taskTree li > a > span {display: inline-block;} -#taskTree li > a > span + span {margin-left: 8px;} -#taskTree li.selected > a {background-color: #E8F3FC;} -#taskTree li.selected > a > span.title {color: #006AF1;} -#taskTree .label-id {border-color: #cbd0db; color: #7d8599;} -#taskTree .label.label-type {background: #fff; border: 1px solid #7d8599; color: #7d8599;} - -#taskTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;} -#taskTree li > a > span.user {color: #838a9d;} -#taskTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8;} - -#taskTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;} -#taskTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;} -#taskTree li > .list-toggle:hover:before, -#taskTree li > .list-toggle:hover {border-color: #006AF1;} -#taskTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;} -#taskTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;} -#taskTree li.open > .list-toggle:hover {background: #006AF1;} - -#taskTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;} -#taskTree ul > li:before, -#taskTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #cbd0db; top: -13px; bottom: 12px; left: -12px;} -#taskTree ul > li:last-child:before {bottom: auto; height: 29px;} -#taskTree ul > li:first-child:before {top: -9px;} -#taskTree ul > li.has-list:first-child:before {top: -13px;} -#taskTree ul > li.tree-single-item:before {height: 23px;} -#taskTree ul > li.has-list:after {width: 14px;} - -.tree-show-root .btn-tree-view[data-type="root"], -.btn-tree-view[data-type="all"] {display: none;} -.tree-show-root .btn-tree-view[data-type="all"] {display: inline-block;} - -#itemContent {min-height: 200px;} -#itemContent .label {background: #fff; border: 1px solid #ddd;} -#mainContent > .side-col {width: 460px; display: table-cell; overflow: hidden;} -#mainContent > .side-col > .cell {display: block; width: 440px; overflow: auto;} -#mainContent.hide-side > .side-col {display: none;} - -h2.detail-title {font-size: 14px;} -h2.detail-title .label-id, h2.detail-title .label {top: -1px;} -#itemContent > .detail:first-child {padding-top: 10px;} -.detail-content > .btn-toolbar {margin-top: 15px;} -.detail-content > .infos > span {display: inline-block;} -.detail-content > .infos > span + span {margin-left: 15px;} -.detail-content > .infos + .infos {margin-top: 5px;} -.detail + .detail {padding-top: 10px;} -.btn-comment.pull-right {z-index: 10;} -details .btn-comment.pull-right {right: 30px;} -.modal-comment .modal-dialog {min-width: 600px;} - -#itemContent .label-product, #taskTree .item-product > a > .label-type {border-color: #7d8599; color: #7d8599;} -#itemContent .label-story, #taskTree .item-story > a > .label-type {border-color: #7d8599; color: #7d8599;} -#itemContent .label-task, #taskTree .item-task > a > .label-type {border-color: #7d8599; color: #7d8599;} - -.taskID {border-color: rgba(131, 138, 157, 0.25);} -.storyID {border-color: rgba(131, 138, 157, 0.25);} -.title {color: #838A9D;} -.btn-toolbar .btn-icon {min-width: 56px;} -.status-doing {border-color: rgba(255, 93, 93, 0.25)!important;} -.status-pause {border-color: rgba(255, 152, 0, 0.25)!important;} -.status-done {border-color: rgba(67, 160, 71, 0.25)!important;} -.status-changed {border-color: rgba(255, 93, 93, 0.25)!important;} -.status-draft {border-color: rgba(165, 102, 184, 0.25)!important;} -.label-id {line-height: 18px !important;} diff --git a/module/execution/css/view.css b/module/execution/css/view.css deleted file mode 100644 index 5be4918dab..0000000000 --- a/module/execution/css/view.css +++ /dev/null @@ -1,31 +0,0 @@ -.block-burn .panel-body {margin-top: 20px;} -.data-stats .statsTr td {padding: 0px;} -.data-stats .statsTr td:first-child {width: 80px;} -[lang^=en] .data-stats .statsTr td:first-child, [lang^=fr] .data-stats .statsTr td:first-child, [lang^=de] .data-stats .statsTr td:first-child {width: 100px;} - -#burnWrapper {max-width: 400px; margin: 0 auto; padding: 8px; position: relative;} -#burnYUnit {position: absolute; color: #CBD0DB; top: -10px; left: 10px;} -#burnLegend {position: absolute; right: 0; width: 150px; top: 0; margin-top: -20px; line-height: 20px; color: #838A9D; font-size: 12px;} -#burnLegend > div {position: relative; padding-left: 22px;} -#burnLegend > div:before {content: ' '; display: block; position: absolute; width: 20px; left: 0; top: 8px; height: 2px; background: #EEEEEE;} -#burnLegend > div.line-real:before {background: #006AF1;} -#burnLegend > div.line-delay:before {background: red;} - -.block-dynamic .panel-body {height: 230px; overflow: auto; position: relative;} -.block-team div.col-xs-6 {white-space: nowrap; overflow: hidden;} - -.timeline > li:before {left: -26px;} -.timeline > li + li:after {left: -23px;} -.timeline-text {margin-left: -18px;} -.block-dynamic .label-action {padding: 0 6px;} -.block-dynamic .label-action + a {padding-left: 6px;} -.timeline > li.active:before {left: -30px;} -.timeline > li > div:after {left: -27px;} -.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;} -.timeline > li > div > .timeline-text > a {color: #313C52;} - -#cfdChart {margin-top: -20px;} - -#triggerModal .modal-dialog {top: 15% !important; max-height: 80%;} -#triggerModal .modal-dialog::-webkit-scrollbar-track {background-color: white;} diff --git a/module/execution/js/all.js b/module/execution/js/all.js deleted file mode 100644 index 91ef53a14a..0000000000 --- a/module/execution/js/all.js +++ /dev/null @@ -1,71 +0,0 @@ -$(function() -{ - $("#" + status + "Tab").addClass('btn-active-text'); - $('.table-footer .check-all').on('click', function() - { - if($(this).hasClass('checked')) - { - $(this).removeClass('checked'); - $('.dtable-row').click().removeClass('is-checked'); - $('.has-checkbox input[type="checkbox"]').prop('checked', false); - } - else - { - $(this).addClass('checked'); - $('.dtable-row').click().addClass('is-checked'); - $('.has-checkbox input[type="checkbox"]').prop('checked', true); - } - }) -}); - -/** - * Location to product list. - * - * @param int productID - * @param int projectID - * @param string status - * @access public - * @return void - */ -function byProduct(productID, projectID, status) -{ - location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID); -} - -/** - * Set the color of the badge to white. - * - * @param object obj - * @param bool isShow - * @access public - * @return void - */ -function setBadgeStyle(obj, isShow) -{ - var $label = $(obj); - if(isShow == true) - { - $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); - } - else - { - $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); - } -} - -function buildForm(action, target) -{ - var tempform = document.createElement("form"); - tempform.action = action; - tempform.method = "post"; - tempform.target = typeof(target) == 'undefined' ? '' : target; - tempform.style.display = "none"; - - var opt = document.createElement("input"); - opt.name = 'executionIDList'; - opt.value = checkItems; - - tempform.appendChild(opt); - document.body.appendChild(tempform); - tempform.submit(); -} diff --git a/module/execution/js/batchedit.js b/module/execution/js/batchedit.js deleted file mode 100644 index 603122e2bd..0000000000 --- a/module/execution/js/batchedit.js +++ /dev/null @@ -1,34 +0,0 @@ -function changeProject(obj, executionID, projectID) -{ - var lastSelected = $(obj).data('lastselected'); - var $td = $(obj).closest('td'); - - if($td.find('[id^="syncStories"]').length == 0) - { - $td.append(""); - } - - var confirmVal = confirm(confirmSync); - $("#syncStories" + executionID).val(confirmVal ? 'yes' : 'no'); - - if(!confirmVal) - { - $(obj).val(lastSelected).trigger("chosen:updated"); - } - else - { - lastSelected = $(obj).val(); - $(obj).data("lastselected", lastSelected); - } -} - -$('#executionForm').on('change input mousedown', '.has-error', function() -{ - $(this).parent().find('.text-danger').remove(); - $(this).removeClass('has-error'); -}) - -$(function() -{ - $('[data-toggle="popover"]').popover(); -}) diff --git a/module/execution/js/bug.js b/module/execution/js/bug.js deleted file mode 100644 index 3c66995db7..0000000000 --- a/module/execution/js/bug.js +++ /dev/null @@ -1,28 +0,0 @@ -$(function() -{ - if(browseType != 'bysearch') $('#module' + param).closest('li').addClass('active'); - if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150); - - $('#bugList').on('change', "[name='bugIDList[]']", checkClosed); -}); - -/** - * Closed bugs are not assignable. - * - * @access public - * @return void - */ -function checkClosed() -{ - var disabledAssigned = $('#bugList tr.checked .c-assignedTo a').length > 0; - $('#bugList tr.checked .c-assignedTo a').each(function() - { - if(!$(this).hasClass('disabled')) - { - disabledAssigned = false; - return false; - } - }); - - $('#mulAssigned').prop('disabled', disabledAssigned); -} diff --git a/module/execution/js/build.js b/module/execution/js/build.js deleted file mode 100644 index 928bea0fc4..0000000000 --- a/module/execution/js/build.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Change product. - * - * @param int $productID - * @access public - * @return void - */ -function changeProduct(productID) -{ - link = createLink('execution', 'build', 'executionID=' + executionID + '&type=product¶m=' + productID); - location.href = link; -} diff --git a/module/execution/js/burn.js b/module/execution/js/burn.js deleted file mode 100644 index 192151808a..0000000000 --- a/module/execution/js/burn.js +++ /dev/null @@ -1,70 +0,0 @@ -$(function() -{ - initBurnChar(); - $('#interval').change(function() - { - location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + type + '&interval=' + $(this).val()); - }); - - $('#weekend').click(function() - { - var browseType = type.match('noweekend') ? type.replace('noweekend', 'withweekend') : type.replace('withweekend', 'noweekend'); - location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + browseType + '&interval=' + interval); - }); - - $('#delay').click(function() - { - var browseType = type.match('nodelay') ? type.replace('nodelay', 'withdelay') : type.replace('withdelay', 'nodelay'); - location.href = createLink('execution', 'burn', 'executionID=' + executionID + '&type=' + browseType + '&interval=' + interval); - }); -}) - -/* Save burn as image.*/ -function downloadBurn() -{ - var $canvas = $('#burnCanvas'); - $('#burnWrapper').append(""); - $('#cloneCanvas').append($canvas.clone()); - $('#cloneCanvas').append(""); - $('#cloneCanvas #cloneImage').attr('src', $canvas.get(0).toDataURL("image/png")); - setTimeout(function() - { - /* Add watermark */ - var canvas = document.querySelector('#cloneCanvas #burnCanvas'); - var cans = canvas.getContext('2d'); - canvas.height = canvas.height + 25; - canvas.width = canvas.width + 50; - - // Set background color to white - cans.fillStyle = '#fff'; - cans.fillRect(0, 0, canvas.width, canvas.height); - - cans.drawImage($('#cloneCanvas #cloneImage').get(0), 0, 25); - cans.font = "16px Microsoft JhengHei"; - cans.fillStyle = "rgba(17, 17, 17, 0.50)"; - cans.textAlign = 'left'; - cans.textBaseline = 'Middle'; - cans.fillText(watermark, 50, canvas.height - 50); - cans.fillText(burnYUnit, 0, 20); - cans.fillText(burnXUnit, canvas.width - 50, canvas.height - 15); - - var type = 'png'; - var $canvas = $('#cloneCanvas #burnCanvas'); - var imgSrc = $canvas.get(0).toDataURL("image/png"); - var imgData = imgSrc.replace(type,'image/octet-stream'); - var filename = executionName + '.' + type; - saveFile(imgData,filename); - $('#burnWrapper #cloneCanvas').remove(); - }, 500); -} - -var saveFile = function(data, filename) -{ - var saveLink = document.createElement('a'); - saveLink.href = data; - saveLink.download = filename; - - var event = document.createEvent('MouseEvents'); - event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - saveLink.dispatchEvent(event); -}; diff --git a/module/execution/js/cfd.js b/module/execution/js/cfd.js deleted file mode 100644 index 7317d41ca4..0000000000 --- a/module/execution/js/cfd.js +++ /dev/null @@ -1,143 +0,0 @@ -$(function() -{ - $('[data-toggle=tooltip]').tooltip(); - - var i = 0; - var series = []; - var colors = ['#33B4DB', '#7ECF69', '#FFC73A', '#FF5A61', '#50C8D0', '#AF5AFF', '#4EA3FF', '#FF8C5A', '#6C73FF']; - //var background = ['#E1F4FA', '#ECF8E9', '#FFF7E2', '#FFE7E8', '#E5F7F8', '#F3E7FF', '#E5F1FF', '#FFEEE7', '#E9EAFF']; - - var chartDom = document.getElementById('cfdChart'); - if(Object.keys(chartData).length && chartDom) - { - $.each(chartData['line'], function(label, set) - { - series.push({ - name: label, - type: 'line', - stack: 'Total', - color: colors[i], - areaStyle: { - color: colors[i], - opacity: 0.2 - }, - itemStyle: { - normal: { - lineStyle:{ - width: 1 - } - } - }, - emphasis: { - focus: 'series' - }, - data: eval(set) - }) - i ++; - }) - - var CFD = echarts.init(chartDom); - var option; - - option = { - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross', - label: { - backgroundColor: '#6a7985' - } - }, - formatter: function(params) - { - var newParams = []; - var tooltipString = []; - newParams = params.reverse(); - newParams.forEach((p) => { - const cont = p.marker + ' ' + p.seriesName + ': ' + p.value + '
'; - tooltipString.push(cont); - }); - return tooltipString.join(''); - }, - textStyle: { - fontWeight: 100 - } - }, - legend: { - data: Object.keys(chartData['line']).reverse() - }, - grid: { - left: '3%', - right: '5%', - bottom: '3%', - containLabel: true - }, - xAxis: [ - { - type: 'category', - boundaryGap: false, - data: chartData['labels'], - name: XUnit, - axisLine: - { - show: true, - lineStyle: - { - color: '#999', - width:1 - } - } - }], - yAxis: [ - { - type: 'value', - minInterval: 1, - name: YUnit, - nameTextStyle: - { - fontWeight: 'normal' - }, - axisPointer: - { - label: - { - show: true, - precision: 0 - }, - }, - axisLine: - { - show: true, - lineStyle: - { - color: '#999', - width: 1 - } - } - } - ], - series: series, - }; - - option && CFD.setOption(option); - window.addEventListener('resize', CFD.resize); - } - - $('#type').change(function() - { - location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + $(this).val()); - }); - - $('#weekend').click(function() - { - var type = $('#type').val(); - withWeekend = withWeekend == 'true' ? 'false' : 'true'; - var begin = Base64.encode(encodeURIComponent($('#begin').val())); - var end = Base64.encode(encodeURIComponent($('#end').val())); - location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + type + '&withWeekend=' + withWeekend + '&begin=' + begin + '&end=' + end); - }); - - $("#end, #begin").datetimepicker('setEndDate', maxDate); - $("#end, #begin").datetimepicker('setStartDate', minDate); - $('.datetimepicker-days table tfoot').append('' + dateRangeTip + ''); -}); diff --git a/module/execution/js/create.js b/module/execution/js/create.js deleted file mode 100644 index cb0c0e1091..0000000000 --- a/module/execution/js/create.js +++ /dev/null @@ -1,255 +0,0 @@ -function setCopyProject(executionID) -{ - location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0©ExecutionID=' + executionID); -} - -$(function() -{ - $(document).on('click', '#copyProjects a', function() - { - setCopyProject($(this).data('id')); $('#copyProjectModal').modal('hide'); - }); - - $('#begin').on('change', function() - { - $("#end").val(''); - $("#days").val(''); - $("input:radio[name='delta']").attr("checked",false); - }); - $('#end').on('change', function() - { - $("input:radio[name='delta']").attr("checked", false); - }) - - if(typeof(currentPlanID) == 'undefined') - { - $('#productsBox select[id^="products"]').each(function() - { - var branchID = 0; - if($(this).closest('.input-group').find('select[id^="branch"]').size() > 0) - { - var branchID = $(this).closest('.input-group').find('select[id^="branch"]').val(); - } - loadPlans($(this), branchID); - }); - } - - /* Assign value to the manage products by the different request type.*/ - var $product = $('#products0'); - if(copyExecutionID) productID = $product.val(); - if(productID) - { - $product.val(productID); - $product.trigger("chosen:updated"); - } - - var adjustMainCol = function() - { - $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#tplBoxWrapper').parent('td').outerWidth() - 50)/3) + 10)); - }; - adjustMainCol(); - $(window).on('resize', adjustMainCol); - - $('#teams_chosen').click(function() - { - $('#teams_chosen ul li').each(function(index) - { - if(index == 0) - { - var projectName = subString($(this).text(), 56); - $(this).text(projectName); - $(this).append(' '); - } - else - { - $(this).prepend('   '); - } - }) - }) - - $('#teams').change(function() - { - var objectID = $(this).val(); - $.get(createLink('execution', 'ajaxGetTeamMembers', 'objectID=' + objectID), function(data) - { - $('#teamMembers').parent().html(data); - $('#teamMembers').picker({chosenMode: true}); - }); - }) - - if(isStage) - { - $('#attribute').change(function() - { - var attribute = $(this).val(); - hidePlanBox(attribute); - }) - - $('#attribute').change(); - } - - if(copyExecutionID != 0 || projectID != 0) $('#teams').change(); - - var acl = $("[name^='acl']:checked").val(); - setWhite(acl); - - $('#submit').click(function() - { - var products = new Array(); - var existedBranch = false; - - /* Determine whether the products of the same branch are linked. */ - $("#productsBox select[name^='products']").each(function() - { - var productID = $(this).val(); - if(typeof(products[productID]) == 'undefined') products[productID] = new Array(); - if(multiBranchProducts[productID]) - { - var branchID = $(this).closest('.input-group').find("select[id^=branch]").val(); - if(products[productID][branchID]) - { - existedBranch = true; - } - else - { - products[productID][branchID] = branchID; - } - if(existedBranch) return false; - } - }); - - if(existedBranch) - { - bootbox.alert(errorSameBranches); - return false; - } - }); - - /* Init for copy execution. */ - $("select[id^=branch]").each(disableSelectedBranch); - disableSelectedProduct(); - - /* Check the all products and branches control when uncheck the product. */ - $(document).on('change', "select[id^='products']", function() - { - if($(this).val() == 0) - { - $("select[id^='branch']").each(disableSelectedBranch); - - disableSelectedProduct(); - } - }); - - $(document).on('change', "select[id^='branch']", disableSelectedBranch); - - if($('.disabledBranch').length > 0) - { - $('.disabledBranch div[id^="branch"]').addClass('chosen-disabled'); - } - - $('[data-toggle="popover"]').popover(); -}); - -function showLifeTimeTips() -{ - var lifetime = $('#lifetime option:selected').val(); - if(lifetime == 'ops') - { - $('#lifeTimeTips').show(); - } - else - { - $('#lifeTimeTips').hide(); - } -} - -/** - * Refresh page. - * - * @param object $projectID - * @access public - * @return void - */ -function refreshPage(projectID) -{ - location.href = createLink('execution', 'create', 'projectID=' + projectID); -} - -/** - * Refresh page. - * - * @param object $projectID - * @access public - * @return void - */ -function setType(type) -{ - location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=0©ExecutionID=&planID=0&confirm=no&productID=0&extra=type=' + type); -} - -/** - * Cut a string of letters and characters with the same length. - * - * @param string $title - * @param int $stringLength - * @access public - * @return string - */ -function subString(title, stringLength) -{ - if(title.replace(/[\u4e00-\u9fa5]/g, "**").length > stringLength) - { - var length = 0; - for(var i = 0; i < title.length; i ++) - { - length += title.charCodeAt(i) > 255 ? 2 : 1; - if(length > stringLength) - { - title = title.substring(0, i) + '...'; - break; - } - } - } - - return title; -} - -/** - * Load project executions. - * - * @param int $projectID - * @access public - * @return void - */ -function loadProjectExecutions(projectID) -{ - $.get(createLink('execution', 'ajaxGetCopyProjectExecutions', 'projectID=' + projectID), function(data) - { - if(data != '[]') - { - $('#copyProjectModal .alert').replaceWith("
"); - $("#copyProjects > div[data-id != '']").remove(); - $(".model-body").remove(); - var data = JSON.parse(data); - if(copyExecutionID != 0) - { - $('#copyProjects').append(""); - } - $.each(data, function(id, execution) - { - var type = execution.type == 'stage' ? 'waterfall' : execution.type; - var active = copyExecutionID == id ? ' active' : ''; - $('#copyProjects').append(""); - }); - } - else if(data == '[]' && copyExecutionID == 0) - { - $('#copyProjects').replaceWith("
" + copyNoExecution + "
"); - } - else if(data == '[]' && copyExecutionID != 0) - { - $("#copyProjects > div[data-id != '']").remove(); - $('#copyProjects').append(""); - } - }); -} diff --git a/module/execution/js/dynamic.js b/module/execution/js/dynamic.js deleted file mode 100755 index 2c5ed5a53e..0000000000 --- a/module/execution/js/dynamic.js +++ /dev/null @@ -1,12 +0,0 @@ -function changeUser(account, projectID) -{ - if(account == '') - { - link = createLink('project', 'dynamic', 'projectID=' + projectID + '&type=all'); - } - else - { - link = createLink('project', 'dynamic', 'projectID=' + projectID + '&type=account¶m=' + account); - } - location.href = link; -} diff --git a/module/execution/js/edit.js b/module/execution/js/edit.js deleted file mode 100644 index ba9a203b05..0000000000 --- a/module/execution/js/edit.js +++ /dev/null @@ -1,142 +0,0 @@ -$().ready(function() -{ - $('#submit').click(function() - { - $('#products0').removeAttr("disabled"); - $('#branch0').removeAttr("disabled"); - var products = new Array(); - var existedBranch = false; - - /* Determine whether the products of the same branch are linked. */ - $("#productsBox select[name^='products']").each(function() - { - var productID = $(this).val(); - if(typeof(products[productID]) == 'undefined') products[productID] = new Array(); - if(multiBranchProducts[productID]) - { - var branchID = $(this).closest('.input-group').find("select[id^=branch]").val(); - if(products[productID][branchID]) - { - existedBranch = true; - } - else - { - products[productID][branchID] = branchID; - } - if(existedBranch) return false; - } - }); - - if(existedBranch) - { - bootbox.alert(errorSameBranches); - return false; - } - }); -}); - -$(function() -{ - $(document).on('change', '[name*=products]', function() - { - var current = $(this).val(); - var last = $(this).attr('data-last'); - var lastBranch = $(this).attr('data-lastBranch') !== undefined ? $(this).attr('data-lastBranch') : 0; - - $(this).attr('data-last', current); - - var $branch = $(this).closest('.has-branch').find("[name^='branch']"); - if($branch.length) - { - var branchID = $branch.val(); - $(this).attr('data-lastBranch', branchID); - } - else - { - $(this).removeAttr('data-lastBranch'); - } - - if(current != last && $.inArray(last, unmodifiableProducts) != -1) - { - if(lastBranch != 0) - { - if($.inArray(lastBranch, unmodifiableBranches) != -1) - { - if(linkedStoryIDList[last][lastBranch]) bootbox.alert(unLinkProductTip.replace("%s", allProducts[last] + branchGroups[last][lastBranch])); - } - } - else - { - bootbox.alert(unLinkProductTip.replace("%s", allProducts[last])); - } - } - }); - - $(document).on('change', '[name*=branch]', function() - { - var current = $(this).val(); - var last = $(this).attr('data-last'); - $(this).attr('data-last', current); - - var $product = $(this).closest('.has-branch').find("[name^='products']"); - $product.attr('data-lastBranch', current); - - if($.inArray(last, unmodifiableBranches) != -1) - { - var productID = $product.val(); - if($.inArray(productID, unmodifiableProducts) != -1 && linkedStoryIDList[productID][last]) - { - bootbox.alert(tip.replace('%s', linkedStoryIDList[productID][last])); - } - } - }); - - /* Init. */ - $("select[id^=branch]").each(disableSelectedBranch); - disableSelectedProduct(); - - /* Check the all products and branches control when uncheck the product. */ - $(document).on('change', "select[id^='products']", function() - { - if($(this).val() == 0) - { - $("select[id^='branch']").each(disableSelectedBranch); - - disableSelectedProduct(); - } - }); - - $(document).on('change', "select[id^='branch']", disableSelectedBranch); - - if($('.disabledBranch').length > 0) - { - $('.disabledBranch div[id^="branch"]').addClass('chosen-disabled'); - } - - $('[data-toggle="popover"]').popover(); - - if(isWaterfall) - { - hidePlanBox(executionAttr); - } -}) -var lastProjectID = $("#project").val(); - -function changeProject(projectID) -{ - if($('#submit').closest('td').find('#syncStories').length == 0) - { - $('#submit').after(""); - } - - var confirmVal = confirm(confirmSync); - $("#syncStories").val(confirmVal ? 'yes' : 'no'); - - if(!confirmVal) - { - $('#project').val(lastProjectID).trigger("chosen:updated"); - return false; - } - - lastProjectID = projectID; -}; diff --git a/module/execution/js/executionkanban.js b/module/execution/js/executionkanban.js deleted file mode 100644 index bc544a2c35..0000000000 --- a/module/execution/js/executionkanban.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Process kanban data - * @returns {Object} kanban data - */ -function processKanbanData() -{ - /* Generate columns */ - var columns = [{id: 'project', type: 'project', name: window.langDoingProject, cardType: 'span'}]; - $.each(kanbanColumns, function(type, name) - { - columns.push({id: type, type: type, name: name, cardType: 'execution'}); - }); - - /* Format lanes data */ - var lanes = []; - $.each(kanbanGroup, function(projectID, statusMap) - { - var projectName = +projectID ? projectNames[projectID] : langMyExecutions; - var cards = {project: [{id: projectID, name: projectName}]}; - - $.each(kanbanColumns, function(type) - { - var cardList = []; - var executions = statusMap[type]; - - if(!executions) return; - - $.each(executions, function(index, execution) - { - var executionCard = $.extend({}, execution, {id: projectID + '-' + execution.id, _id: execution.id}); - cardList.push(executionCard); - }); - cards[type] = cardList; - }); - - lanes.push({id: projectID, name: projectName, cards: cards}); - }); - - return {id: 'executions', columns: columns, lanes: lanes}; -} - -/* Define drag and drop rules */ -if(!window.kanbanDropRules) -{ - window.kanbanDropRules = - { - wait: ['doing', 'suspended', 'closed'], - doing: ['suspended', 'closed'], - suspended: ['doing', 'closed'], - closed: ['doing'] - } -} - -/* -* Find drop columns -* @param {JQuery} $element Drag element -* @param {JQuery} $root Dnd root element -*/ -function findDropColumns($element, $root) -{ - var $col = $element.closest('.kanban-col'); - var col = $col.data(); - var lane = $col.closest('.kanban-lane').data(); - var kanbanID = $root.data('id'); - var kanbanRules = window.kanbanDropRules ? window.kanbanDropRules : null; - - if(!kanbanRules) return $root.find('.kanban-lane[data-id="' + lane.id + '"] .kanban-lane-col:not([data-type="project"],[data-type="' + col.type + '"])'); - - var colRules = kanbanRules[col.type]; - var lane = $col.closest('.kanban-lane').data('lane'); - return $root.find('.kanban-lane-col').filter(function() - { - if(!colRules) return false; - if(colRules === true) return true; - - var $newCol = $(this); - var newCol = $newCol.data(); - if(newCol.id === col.id) return false; - - var $newLane = $newCol.closest('.kanban-lane'); - var newLane = $newLane.data('lane'); - return colRules.indexOf(newCol.type) > -1 && newLane.id === lane.id; - }); -} - -/** - * Change column type for a card - - * @param {Object} card Card object - * @param {String} fromColType The column type before change - * @param {String} toColType The column type after change - * @param {String} kanbanID Kanban ID - */ -function changeCardColType(card, fromColType, toColType, kanbanID) -{ - if(typeof card == 'undefined') return false; - var cardID = card.id; - var executionID = cardID.substr(cardID.indexOf("-") + 1);; - var showIframe = false; - - if(toColType == 'doing') - { - if(fromColType == 'wait' && priv.canStart) - { - var link = createLink('execution', 'start', 'executionID=' + executionID, '', true); - showIframe = true; - } - if((fromColType == 'suspended' || fromColType == 'closed') && priv.canActivate) - { - var link = createLink('execution', 'activate', 'executionID=' + executionID, '', true); - showIframe = true; - } - } - else if(toColType == 'suspended') - { - if((fromColType == 'wait' || fromColType == 'doing') && priv.canSuspend) - { - var link = createLink('execution', 'suspend', 'executionID=' + executionID, '', true); - showIframe = true; - } - } - else if(toColType == 'closed') - { - if(priv.canClose) - { - var link = createLink('execution', 'close', 'executionID=' + executionID, '', true); - showIframe = true; - } - } - - if(showIframe) - { - var modalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '80%', url: link}); - modalTrigger.show(); - } - - /* - // TODO: The server must return a updated kanban data 服务器返回更新后的看板数据 - - // 调用 updateKanban 更新看板数据 - updateKanban(kanbanID, newKanbanData); - */ -} - -/** - * Handle finish drop task - * @param {Object} event Event object - * @returns {void} - */ -function handleFinishDrop(event) -{ - var $card = $(event.element); // The drag card - var $dragCol = $card.closest('.kanban-lane-col'); - var $dropCol = $(event.target); - - /* Get d-n-d(drag and drop) infos 获取拖放操作相关信息 */ - var card = $card.data('item'); - var fromColType = $dragCol.data('type'); - var toColType = $dropCol.data('type'); - var kanbanID = $card.closest('.kanban').data('id'); - - changeCardColType(card, fromColType, toColType, kanbanID); -} - -$(function() -{ - var kanbanGroup = window.kanbanGroup; - if(!kanbanGroup) return; - - $('#kanban').kanban( - { - data: processKanbanData(), - laneNameWidth: 5, - virtualize: true, - virtualCardList: true, - droppable: - { - selector: '.kanban-item:not(.kanban-item-span)', - target: findDropColumns, - finish: handleFinishDrop, - mouseButton: 'left' - } - }); -}); diff --git a/module/execution/js/grouptask.js b/module/execution/js/grouptask.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/execution/js/importbug.js b/module/execution/js/importbug.js deleted file mode 100644 index 9464587e8b..0000000000 --- a/module/execution/js/importbug.js +++ /dev/null @@ -1,31 +0,0 @@ -$(function() -{ - $(".preview").modalTrigger({width:1000, type:'iframe'}); - $('#' + browseType + 'Tab').addClass('active'); - - if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide(); -}); - -/** - * Go back. - * - * @param int $executionID - * @access public - * @return void - */ -function goback(executionID) -{ - var link = createLink('execution', 'ajaxGetExecutionKanban', "executionID=" + executionID); - $.get(link, function(data) - { - if(data) - { - kanbanData = $.parseJSON(data); - parent.updateKanban(kanbanData); - } - else - { - parent.location.reload(); - } - }); -} diff --git a/module/execution/js/importtask.js b/module/execution/js/importtask.js deleted file mode 100644 index f3626b5617..0000000000 --- a/module/execution/js/importtask.js +++ /dev/null @@ -1,23 +0,0 @@ -function reload(toProject, fromProject) -{ - link = createLink('execution','importtask','toProject='+toProject + '&fromProject='+fromProject); - location.href = link; -} - -$(function() -{ - $(".preview").modalTrigger({width:1000, type:'iframe'}); - - if(isonlybody == true) parent.$('#triggerModal .modal-content .modal-header .close').hide(); -}); - -/** - * Go back. - * - * @access public - * @return void - */ -function goback() -{ - parent.location.reload(); -} diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js deleted file mode 100644 index 0b0cc2fdda..0000000000 --- a/module/execution/js/kanban.js +++ /dev/null @@ -1,1878 +0,0 @@ -$(function() -{ - $('#products').change(function() - { - var selectProductID = $('#products').val(); - var attr = createLink('story', 'batchCreate', 'productID=' + selectProductID + '&branch=0' + '&moduleID=0&story=0&execution=' + executionID, '', true); - $('#batchCreateStoryButton').attr('href',attr); - }); -}) - -/** - * When execution status change. - * - * @param stirng executionStatus - * @access public - * @return void - */ -function changeStatus(executionStatus) -{ - if(executionStatus == 'wait') - { - $('.startButton').removeClass('hidden'); - $('.putoffButton').removeClass('hidden'); - $('.suspendButton').removeClass('hidden'); - $('.closeButton').removeClass('hidden'); - $('.activateButton').addClass('hidden'); - } - else if(executionStatus == 'doing') - { - $('.startButton').addClass('hidden'); - $('.putoffButton').removeClass('hidden'); - $('.suspendButton').removeClass('hidden'); - $('.closeButton').removeClass('hidden'); - $('.activateButton').addClass('hidden'); - } - else if(executionStatus == 'suspended') - { - $('.startButton').addClass('hidden'); - $('.putoffButton').addClass('hidden'); - $('.suspendButton').addClass('hidden'); - $('.closeButton').removeClass('hidden'); - $('.activateButton').removeClass('hidden'); - } - else if(executionStatus == 'closed') - { - $('.startButton').addClass('hidden'); - $('.putoffButton').addClass('hidden'); - $('.suspendButton').addClass('hidden'); - $('.closeButton').addClass('hidden'); - $('.activateButton').removeClass('hidden'); - } -} - -/** - * Hide all action. - * - * @access public - * @return void - */ -function hideAction() -{ - $('.actions').hide(); - $('.action').hide(); - $('.avatar').removeAttr('data-toggle'); - $('.kanban-group-header').hide(); - $(".title").attr("disabled", true).css("pointer-events", "none"); - $(".avatar").attr("disabled", true).css("pointer-events", "none"); - window.sortableDisabled = true; -} - -/** - * Display the kanban in full screen. - * - * @access public - * @return void - */ -function fullScreen() -{ - var element = document.getElementById('kanbanContainer'); - var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; - - if(requestMethod) - { - var afterEnterFullscreen = function() - { - $('#kanbanContainer').addClass('fullscreen') - .on('scroll', tryUpdateKanbanAffix); - - hideAction(); - $.cookie('isFullScreen', 1); - }; - - var whenFailEnterFullscreen = function(error) - { - exitFullScreen(); - }; - - try - { - var result = requestMethod.call(element); - if(result && (typeof result.then === 'function' || result instanceof window.Promise)) - { - result.then(afterEnterFullscreen).catch(whenFailEnterFullscreen); - } - else - { - afterEnterFullscreen(); - } - } - catch (error) - { - whenFailEnterFullscreen(error); - } - } -} - -/** - * Exit full screen. - * - * @access public - * @return void - */ -function exitFullScreen() -{ - $('#kanbanContainer').removeClass('fullscreen') - .off('scroll', tryUpdateKanbanAffix); - $('.actions').show(); - $('.action').show(); - $('.avatar').attr('data-toggle', 'modal'); - $('.kanban-group-header').show(); - $(".title").attr("disabled", false).css("pointer-events", "auto"); - $(".avatar").attr("disabled", false).css("pointer-events", "auto"); - window.sortableDisabled = false; - $.cookie('isFullScreen', 0); -} - -document.addEventListener('fullscreenchange', function (e) -{ - if(!document.fullscreenElement) exitFullScreen(); -}); - -document.addEventListener('webkitfullscreenchange', function (e) -{ - if(!document.webkitFullscreenElement) exitFullScreen(); -}); - -document.addEventListener('mozfullscreenchange', function (e) -{ - if(!document.mozFullScreenElement) exitFullScreen(); -}); - -document.addEventListener('msfullscreenChange', function (e) -{ - if(!document.msfullscreenElement) exitFullScreen(); -}); - -/** Change kanban scale size */ -function changeKanbanScaleSize(newScaleSize) -{ - var newScaleSize = Math.max(1, Math.min(4, newScaleSize)); - if(newScaleSize === window.kanbanScaleSize) return; - - window.kanbanScaleSize = newScaleSize; - $.zui.store.set('executionKanbanScaleSize', newScaleSize); - $('#kanbanScaleSize').text(newScaleSize); - $('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', newScaleSize >= 4 ? 'disabled' : null); - $('#kanbanScaleControl .btn[data-type="-"]').attr('disabled', newScaleSize <= 1 ? 'disabled' : null); - - if(groupBy == 'default') - { - $('#kanban').children('.region').children("div[id^='kanban']").each(function() - { - var kanban = $(this).data('zui.kanban'); - if(!kanban) return; - kanban.setOptions({cardsPerRow: newScaleSize, cardHeight: getCardHeight()}); - }); - } - else - { - var kanban = $('#kanban' + executionID).data('zui.kanban'); - if(!kanban) return; - kanban.setOptions({cardsPerRow: newScaleSize, cardHeight: getCardHeight()}); - } - - if(laneCount == 1) resetRegionHeight('open'); - - return newScaleSize; -} - -/** Get card height */ -function getCardHeight() -{ - return [60, 60, 62, 62, 47][window.kanbanScaleSize]; -} - -$('#type').change(function() -{ - var type = $('#type').val(); - if(type != 'all') - { - $('.c-group').show(); - $.get(createLink('execution', 'ajaxGetGroup', 'type=' + type), function(data) - { - $('#group_chosen').remove(); - $('#group').replaceWith(data); - $('#group').chosen(); - }) - } - - var link = createLink('execution', 'kanban', "executionID=" + executionID + '&browseType=' + type); - location.href = link; -}); - -$('.c-group').change(function() -{ - $('.c-group').show(); - - var type = $('#type').val() ? $('#type').val() : browseType; - var group = $('#group').val(); - var link = createLink('execution', 'kanban', 'executionID=' + executionID + '&type=' + type + '&orderBy=id_asc' + '&groupBy=' + group); - location.href = link; -}); - -/** - * Create lane menu. - * - * @param object $options - * @access public - * @return void - */ -function createLaneMenu(options) -{ - var lane = options.$trigger.closest('.kanban-lane').data('lane'); - - var privs = lane.actions; - if(!privs.length) return []; - - var items = []; - var regionID = lane.$kanbanData.region; - var kanbanID = lane.$kanbanData.kanban; - if(privs.includes('editLaneName')) items.push({label: kanbanLang.editLaneName, icon: 'edit', url: createLink('kanban', 'editLaneName', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('editLaneColor')) items.push({label: kanbanLang.editLaneColor, icon: 'color', url: createLink('kanban', 'editLaneColor', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('deleteLane')) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'regionID=' + regionID + '&kanbanID=' + kanbanID + '&lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); - - var bounds = options.$trigger[0].getBoundingClientRect(); - items.$options = {x: bounds.right, y: bounds.top}; - return items; -} - -function createColumnMenu(options) -{ - var column = options.$trigger.closest('.kanban-col').data('col'); - var privs = column.actions; - if(!privs.length) return []; - - var items = []; - if(privs.includes('setColumn')) items.push({label: kanbanLang.editColumn, icon: 'edit', url: createLink('kanban', 'setColumn', 'columnID=' + column.id + '&executionID=' + executionID + '&from=RDKanban', '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(privs.includes('setWIP')) items.push({label: kanbanLang.setWIP, icon: 'alert', url: createLink('kanban', 'setWIP', 'columnID=' + column.id + '&executionID=' + executionID + '&from=RDKanban', '' ,'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width' : '500px'}}); - - var bounds = options.$trigger[0].getBoundingClientRect(); - items.$options = {x: bounds.right, y: bounds.top}; - return items; -} - -/** - * Create column create button menu - * @returns {Object[]} - */ -function createColumnCreateMenu(options) -{ - var $col = options.$trigger.closest('.kanban-col'); - var col = $col.data('col'); - var items = []; - var laneID = col.$kanbanData.lanes[0].id ? col.$kanbanData.lanes[0].id : 0; - var regionID = col.$kanbanData.region == undefined ? 0 : col.$kanbanData.region; - - if(col.type == 'backlog') - { - if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&objectID=' + executionID + '&bugID=0&planID=0&todoID=0&extra=regionID=' + regionID + ',laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStory, url: productCount > 1 ? '#batchCreateStory' : $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID + '&plan=0&type=story&extra=regionID=' + regionID + ',laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe',attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); - if(priv.canLinkStory) items.push({label: executionLang.linkStory, url: $.createLink('execution', 'linkStory', 'executionID=' + executionID + '&browseType=¶m=0&recPerPage=50,&pageID=1&extra=laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); - if(priv.canLinkStoryByPlan) items.push({label: executionLang.linkStoryByPlan, url: '#linkStoryByPlan', 'attrs' : {'data-toggle': 'modal', 'data-target': '#linkStoryByPlan','data-col' : col.id, 'data-lane' : laneID, 'class' : 'linkStoryByPlanButton'}}); - } - else if(col.type == 'unconfirmed') - { - if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=' + productID + '&moduleID=0&extra=regionID=' + regionID + ',laneID=' + laneID + ',columnID=' + col.id + ',executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateBug) - { - if(productNum > 1) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}}); - else items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&branch=&executionID=' + executionID + '&module=0&extra=regionID=' + regionID + ',laneID=' + laneID + ',columnID=' + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); - } - } - else if(col.type == 'wait') - { - if(priv.canCreateTask) items.push({label: taskLang.create, url: $.createLink('task', 'create', 'executionID=' + executionID + "&storyID=0&moduleID=0&taskID=0&todoID=0&extra=regionID=" + regionID + ",laneID=" + laneID + ",columnID=" + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateTask) items.push({label: taskLang.batchCreate, url: $.createLink('task', 'batchcreate', 'executionID=' + executionID + "&storyID=0&moduleID=0&taskID=0&iframe=0&extra=regionID=" + regionID + ",laneID=" + laneID + ",columnID=" + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); - if(priv.canImportBug && vision == 'rnd') items.push({label: executionLang.importBug, url: $.createLink('execution', 'importBug', 'executionID=' + executionID + "&storyID=0&moduleID=0&taskID=0&todoID=0&extra=laneID=" + laneID + ",columnID=" + col.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '90%'}}); - } - return items; -} - -/** - * Update region name. - * - * @param int $regionID - * @param string $name - * @access public - * @return void - */ -function updateRegionName(regionID, name) -{ - $('.region[data-id="' + regionID + '"] > .region-header > strong:first').text(name); -} - -/** - * Update lane name. - * - * @param int $laneID - * @param string $name - * @access public - * @return void - */ -function updateLaneName(laneID, name) -{ - $('.kanban-lane[data-id="' + laneID + '"] > .kanban-lane-name > span').text(name).attr('title', name); -} - -/** - * Update lane color. - * - * @param int $laneID - * @param string $color - * @access public - * @return void - */ -function updateLaneColor(laneID, color) -{ - $('.kanban-lane[data-id="' + laneID + '"] > .kanban-lane-name').css('background-color', color); -} - -/** - * Update column name. - * - * @param int $columnID - * @param string $name - * @param string $color - * @access public - * @return void - */ -function updateColumnName(columnID, name, color) -{ - $('.kanban-col[data-id="' + columnID + '"] > div.title > span:first').text(name).attr('title', name).css('color', color); -} - -/** - * Hide kanban action - */ -function hideKanbanAction() -{ - $('.kanban').attr('data-action-enabled', null); - $('.contextmenu').removeClass('contextmenu-show'); - $('.contextmenu .contextmenu-menu').removeClass('open').removeClass('in'); - $('#moreTasks, #moreColumns').animate({right: -400}, 500); - $('.storyColumn').parent().removeClass('open'); -} - -/** - * Handle finish drop task - */ -function handleFinishDrop() -{ - $('.kanban').find('.can-drop-here').removeClass('can-drop-here'); -} - -/* Define drag and drop rules */ -if(!window.kanbanDropRules) -{ - window.kanbanDropRules = - { - story: - { - backlog: ['ready', 'backlog'], - ready: ['backlog', 'ready'], - tested: ['verified'], - verified: ['tested', 'released'], - released: ['verified', 'closed'], - closed: ['released'], - }, - bug: - { - 'unconfirmed': ['unconfirmed', 'confirmed', 'fixing', 'fixed'], - 'confirmed': ['confirmed', 'fixing', 'fixed'], - 'fixing': ['fixing', 'fixed'], - 'fixed': ['fixed', 'testing', 'tested', 'fixing'], - 'testing': ['testing', 'tested', 'closed', 'fixing'], - 'tested': ['tested', 'closed', 'fixing'], - 'closed': ['closed', 'fixing'], - }, - task: - { - 'wait': ['wait', 'developing', 'developed', 'canceled'], - 'developing': ['developing', 'developed', 'pause', 'canceled'], - 'developed': ['developed', 'developing', 'closed'], - 'pause': ['pause', 'developing', 'canceled'], - 'canceled': ['canceled', 'developing', 'closed'], - 'closed': ['closed', 'developing'], - } - } -} - -/* - * Find drop columns - * @param {JQuery} $element Drag element - * @param {JQuery} $root Dnd root element - */ -function findDropColumns($element, $root) -{ - var $col = $element.closest('.kanban-col'); - var col = $col.data(); - var laneType = $element.closest('.kanban-lane').data().lane.type; - var kanbanRules = window.kanbanDropRules ? window.kanbanDropRules[laneType] : null; - - hideKanbanAction(); - - if(!kanbanRules) return $root.find('.kanban-lane-col:not([data-type="' + col.type + '"])'); - - var colRules = kanbanRules[col.type]; - var groupID = $col.closest('.kanban-board').data().id; - var oldLaneID = $col.closest('.kanban-lane').data().id; - return $root.find('.kanban-lane-col').filter(function() - { - if(!colRules) return false; - if(colRules === true) return true; - if($.cookie('isFullScreen') == 1) return false; - - var $newCol = $(this); - var newCol = $newCol.data(); - var newGroupID = $newCol.closest('.kanban-board').data().id; - var newLaneID = $newCol.closest('.kanban-lane').data().id; - - var canDropHere = colRules.indexOf(newCol.type) > -1 && newGroupID === groupID; - if(groupBy && groupBy != 'default' && canDropHere) canDropHere = oldLaneID === newLaneID; - if(canDropHere) $newCol.addClass('can-drop-here'); - return canDropHere; - }); -} - -/** - * Render user avatar - * - * @param array $user - * @param string $objectType - * @param int $objectID - * @param int $size - * @param string $objectStatus - * @access public - * @return void - */ -function renderUserAvatar(user, objectType, objectID, size, objectStatus) -{ - var avatarSizeClass = 'avatar-' + (size || 'sm'); - var $noPrivAndNoAssigned = $('
'); - if(objectType == 'task') - { - if(!priv.canAssignTask && !user) return $noPrivAndNoAssigned; - var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID + '&kanbanGroup=' + groupBy, '', true); - } - if(objectType == 'story') - { - if(!priv.canAssignStory && !user) return $noPrivAndNoAssigned; - var link = createLink('story', 'assignto', 'id=' + objectID + '&kanbanGroup=' + groupBy, '', true); - } - if(objectType == 'bug') - { - if(!priv.canAssignBug && !user) return $noPrivAndNoAssigned; - var link = createLink('bug', 'assignto', 'id=' + objectID + '&kanbanGroup=' + groupBy, '', true); - } - - if(!user) return objectStatus == 'closed' ? '' : $(''); - - if(typeof user === 'string') user = {account: user}; - if(!user.avatar && window.userList && window.userList[user.account]) user = {avatar: userList[user.account].avatar, account: user.account, realname: userList[user.account].realname}; - - var $noPrivAvatar = $('
').avatar({user: user}); - if(objectType == 'task' && !priv.canAssignTask) return $noPrivAvatar; - if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar; - if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar; - - var realname = user.realname ? user.realname : user.account; - return objectStatus == 'closed' ? '' : $('').avatar({user: user}).attr('data-toggle', 'modal').attr('data-width', '80%'); -} - -/** - * Render deadline - * @param {String|Date} deadline Deadline - * @param {string} status - * @returns {JQuery} - */ -function renderDeadline(deadline, status) -{ - if(deadline == '0000-00-00') return; - - var date = $.zui.createDate(deadline); - var now = new Date(); - now.setHours(0); - now.setMinutes(0); - now.setSeconds(0); - now.setMilliseconds(0); - var isEarlyThanToday = date.getTime() < now.getTime(); - var deadlineDate = $.zui.formatDate(date, 'MM-dd'); - var statusList = ['doing','pause']; - var textColor = isEarlyThanToday && typeof(status) != 'undefined' && statusList.indexOf(status) != -1 ? 'text-red' : 'text-muted'; - - return $('').text(deadlineLang + ' ' + deadlineDate).addClass(textColor); -} - -/** - * Render estStarted - * - * @param {String|Date} estStarted EstStarted - * @param {string} status - * @access public - * @return void - */ -function renderEstStarted(estStarted, status) -{ - if(estStarted == '0000-00-00') return; - - var date = $.zui.createDate(estStarted); - var now = new Date(); - now.setHours(0); - now.setMinutes(0); - now.setSeconds(0); - now.setMilliseconds(0); - var isEarlyThanToday = date.getTime() < now.getTime(); - var estStartedDate = $.zui.formatDate(date, 'MM-dd'); - var textColor = isEarlyThanToday && typeof(status) != 'undefined' && status == 'wait' ? 'text-red' : 'text-muted'; - - return $('').text(estStartedLang + ' ' + estStartedDate).addClass(textColor); -} - -/** - * Render story item - * @param {Object} item Story item object - * @param {JQuery} $item Kanban item element - * @param {Object} col Column object - * @returns {JQuery} $item Kanban item element - */ -function renderStoryItem(item, $item, col) -{ - if(groupBy == 'story' && item.id == '0') - { - $('.storyCell').css('width', '100%'); - $parentItem = $item[0] == undefined ? $('.storyCell') : $item.parent(); - $parentItem.addClass('text-center storyCell'); - $parentItem.css('line-height', ($parentItem.parent().height() - 20) + 'px'); - $item.replaceWith('' + item.title + ''); - return; - } - var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); - - if(scaleSize <= 3) - { - var $title = $item.find('.title'); - if(!$title.length) - { - $title = $('' + (scaleSize <= 1 ? ' ' : '') + ''); - if(priv.canViewStory) $title = $title.attr('href', $.createLink('execution', 'storyView', 'storyID=' + item.id + '&executionID=' + execution.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '95%'); - $title.appendTo($item); - } - var title = rdSearchValue != '' ? "" + item.title.replaceAll(rdSearchValue, "" + rdSearchValue + "") + "": "" + item.title + ""; - $title.attr('title', item.title).find('.text').replaceWith(title); - } - - if(scaleSize <= 2) - { - var idHtml = scaleSize <= 1 ? ('#' + item.id + '') : ''; - var priHtml = '' + item.pri + ''; - var hoursHtml = (item.estimate && scaleSize <= 1) ? ('' + item.estimate + hourUnit + '') : ''; - var avatarHtml = renderUserAvatar(item.assignedTo, 'story', item.id, '', col.type); - var $infos = $item.find('.infos'); - if(!$infos.length) $infos = $('
'); - $infos.html([idHtml, priHtml, hoursHtml].join('')); - - $infos[scaleSize <= 1 ? 'append' : 'prepend'](avatarHtml); - if(scaleSize <= 1) $infos.appendTo($item); - else if(scaleSize === 2) $infos.prependTo($item); - else $infos.prependTo($item.find('.title')); - } - else if(scaleSize === 4) - { - $item.html(renderUserAvatar(item.assignedTo, 'story', item.id, 'md')); - } - - if(scaleSize <= 1) - { - var $actions = $item.find('.actions'); - if(!$actions.length && (priv.canEditStory || priv.canActivateStory || priv.canChangeStory || priv.canCreateTask || priv.canBatchCreate || priv.canUnlinkStory)) - { - $actions = $([ - '
', - '', - '', - '', - '
' - ].join('')).appendTo($item); - } - } - - if($.cookie('isFullScreen') == 1) hideAction(); - - return $item.attr('data-type', 'story').addClass('kanban-item-story'); -} - -/** - * Render bug item - * @param {Object} item Bug item object - * @param {JQuery} $item Kanban item element - * @param {Object} col Column object - * @returns {JQuery} $item Kanban item element - */ -function renderBugItem(item, $item, col) -{ - var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); - - if(scaleSize <= 3) - { - var $title = $item.find('.title'); - if(!$title.length) - { - $title = $('' + (scaleSize <= 1 ? ' ' : '') + ''); - if(priv.canViewBug) $title =$title.attr('href', $.createLink('bug', 'view', 'bugID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%'); - $title.appendTo($item); - } - var title = rdSearchValue != '' ? "" + item.title.replaceAll(rdSearchValue, "" + rdSearchValue + "") + "": "" + item.title + ""; - $title.attr('title', item.title).find('.text').replaceWith(title); - } - - if(scaleSize <= 2) - { - var idHtml = scaleSize <= 1 ? ('#' + item.id + '') : ''; - var severityHtml = scaleSize <= 1 ? ('') : ''; - var priHtml = '' + item.pri + ''; - var avatarHtml = renderUserAvatar(item.assignedTo, 'bug', item.id, '', col.type); - - var $infos = $item.find('.infos'); - if(!$infos.length) $infos = $('
'); - $infos.html([idHtml, severityHtml, priHtml].join('')); - if(item.deadline && scaleSize <= 1) $infos.append(renderDeadline(item.deadline)); - $infos[scaleSize <= 1 ? 'append' : 'prepend'](avatarHtml); - - if(scaleSize <= 1) $infos.appendTo($item); - else if(scaleSize === 2) $infos.prependTo($item); - else $infos.prependTo($item.find('.title')); - } - else if(scaleSize === 4) - { - $item.html(renderUserAvatar(item.assignedTo, 'bug', item.id, 'md')); - } - - if(scaleSize <= 1) - { - var $actions = $item.find('.actions'); - if(!$actions.length && (priv.canEditBug || priv.canResolveBug || priv.canConfirmBug || priv.canCopyBug || priv.canToStoryBug || priv.canDeleteBug)) - { - $actions = $([ - '
', - '', - '', - '', - '
' - ].join('')).appendTo($item); - } - } - - if($.cookie('isFullScreen') == 1) hideAction(); - - return $item.attr('data-type', 'bug').addClass('kanban-item-bug'); -} - -/** - * Render task item - * @param {Object} item Task item object - * @param {JQuery} $item Kanban item element - * @param {Object} col Column object - * @returns {JQuery} $item Kanban item element - */ -function renderTaskItem(item, $item, col) -{ - var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); - - if(scaleSize <= 3) - { - var $title = $item.find('.title'); - if(!$title.length) - { - $title = $('' + (scaleSize <= 1 ? ' ' : '') + ''); - if(priv.canViewTask) $title = $title.attr('href', $.createLink('task', 'view', 'taskID=' + item.id, '', true)).attr('data-toggle', 'modal').attr('data-width', '80%'); - $title.appendTo($item); - } - var name = rdSearchValue != '' ? "" + item.name.replaceAll(rdSearchValue, "" + rdSearchValue + "") + "": "" + item.name + ""; - $title.attr('title', item.name).find('.text').replaceWith(name); - } - - if(scaleSize <= 2) - { - var priHtml = '' + item.pri + ''; - var hoursHtml = scaleSize <= 1 && item.status != 'wait' ? ('' + taskLang.leftAB + ' ' + item.left + 'h') : ('' + taskLang.estimateAB + ' ' + item.estimate + 'h'); - var avatarHtml = renderUserAvatar(item.assignedTo, 'task', item.id, '', col.type); - - var $infos = $item.find('.infos'); - if(!$infos.length) $infos = $('
'); - $infos.html([priHtml, hoursHtml].join('')); - if(item.deadline && scaleSize <= 1 && (item.status == 'doing' || item.status == 'pause')) $infos.append(renderDeadline(item.deadline, item.status)); - if(item.estStarted && scaleSize <= 1 && item.status == 'wait') $infos.append(renderEstStarted(item.estStarted, item.status)); - $infos[scaleSize <= 1 ? 'append' : 'prepend'](avatarHtml); - - if(scaleSize <= 1) $infos.appendTo($item); - else if(scaleSize === 2) $infos.prependTo($item); - else $infos.prependTo($item.find('.title')); - } - else if(scaleSize === 4) - { - $item.html(renderUserAvatar(item.assignedTo, 'task', item.id, 'md')); - } - - if(scaleSize <= 1) - { - var $actions = $item.find('.actions'); - if(!$actions.length && (priv.canEditTask || priv.canRecordWorkhourTask || priv.canCreateTask || priv.canCancelTask)) - { - $actions = $([ - '
', - '', - '', - '', - '
' - ].join('')).appendTo($item); - } - } - - $item.attr('data-type', 'task').addClass('kanban-item-task'); - - if($.cookie('isFullScreen') == 1) hideAction(); - - return $item; -} - -/* Add column renderer */ -addColumnRenderer('story', renderStoryItem); -addColumnRenderer('bug', renderBugItem); -addColumnRenderer('task', renderTaskItem); - -/** - * Render items count of a column. - */ -function renderCount($count, count, column) -{ - if(groupBy == 'story' && column.type == 'story') - { - var orderButton = '' - + "" - + '' - + ''; - - $count.parent().next().html(orderButton); - $count.parent().next().addClass('createButton'); - $count.remove(); - return; - } - - /* Render WIP. */ - var limit = !column.limit || column.limit == '-1' ? '' : column.limit; - if($count.parent().find('.limit').length) - { - $count.parent().find('.limit').html(limit); - } - else - { - $count.parent().find('.count').before("("); - $count.parent().find('.count').after("/" + limit + ")"); - } - - if(column.limit != -1 && column.limit < count) - { - $count.parents('.title').parent('.kanban-header-col').css('background-color', '#F6A1A1'); - $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 200); - $count.css('color', '#E33030'); - if(!$count.parent().find('.error').length) $count.parent().find('.include-last').after(""); - } - else - { - $count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent'); - $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 120); - $count.css('color', '#8B91A2'); - $count.parent().find('.error').remove(); - } -} - -/** - * Alert to link product. - * - * @access public - * @return void - */ -function tips() -{ - bootbox.alert(needLinkProducts); -} - -/** - * Render header of a column. - */ -function renderHeaderCol($column, column, $header, kanbanData) -{ - if(groupBy == 'story' && column.type == 'story') return; - /* Render group header. */ - var privs = kanbanData.actions; - var columnPrivs = kanbanData.columns[0].actions; - var $actions = $column.children('.actions'); - - if(column.parent == -1) - { - $column.append('
'); - $actions = $column.children('.actions'); - } - - if(groupBy == 'default' && privs.includes('sortGroup')) - { - var groups = regions[column.region].groups; - if($header.closest('.kanban').data('zui.kanban')) - { - groups = $header.closest('.kanban').data('zui.kanban').data; - } - if(groups.length > 1) - { - $column.closest('.kanban-board').addClass('sort'); - $column.closest('.kanban-header').find('.kanban-group-header').remove(); - $column.closest('.kanban-header').prepend('
'); - } - } - - var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP')); - - /* Render more menu. */ - if((column.type == 'backlog' || column.type == 'wait' || column.type == 'unconfirmed') && $actions.children('.text-primary').length == 0) - { - var tips = productID ? '' : 'onclick="tips()"'; - $actions.append([ - '', - '', - '' - ].join('')); - } - if(printMoreBtn && $actions.children('.btn').length == 0) - { - $actions.append(' '); - } -} - -/** - * Render lane name. - * - * @param object $lane - * @param int lane - * @param object $kanban - * @param array columns - * @param object $kanban - * @access public - * @return void - */ -function renderLaneName($lane, lane, $kanban, columns, kanban) -{ - if(groupBy == 'story') - { - $lane.hide(); - return; - } - if(groupBy != 'default') return; - var canEditLaneColor = lane.actions.includes('editLaneColor'); - var canEditLaneName = lane.actions.includes('editLaneName'); - var canSort = lane.actions.includes('sortLane') && kanban.lanes.length > 1; - var canDelete = lane.actions.includes('deleteLane'); - - $lane.parent().toggleClass('sort', canSort); - - if(!$lane.children('.actions').length && (canEditLaneColor || canEditLaneName || canDelete)) - { - $([ - '
', - '', - '', - '', - '
' - ].join('')).appendTo($lane); - } -} - -/** - * Update a region. - * - * @param int regionID - * @param array regionData - * @access public - * @return boolean - */ -function updateRegion(regionID, regionData = []) -{ - if(groupBy != 'default') regionID = executionID; - - if(!regionID) return false; - - var $region = $('#kanban'+ regionID).kanban(); - - if(!$region.length) return false; - if(!regionData) regionData = regions[regionID]; - - var data = groupBy == 'default' ? regionData.groups : regionData; - if((data == null || data.length == 0) && rdSearchValue != '') - { - if(groupBy == 'default') $("div[data-id^=" + regionID + "].region").hide(); - if(groupBy != 'default') $("div[data-id^=" + regionID + "].kanban").hide(); - return false; - } - else - { - if(groupBy == 'default') $("div[data-id^=" + regionID + "].region").show(); - if(groupBy != 'default') $("div[data-id^=" + regionID + "].kanban").show(); - } - $region.data('zui.kanban').render(data); - resetRegionHeight('open'); - return true; -} - -/** - * Handle drop task. - * - * @param object $element - * @param object $event - * @param object $kanban - * @access public - * @return void - */ -function handleDropTask($element, event, kanban) -{ - if(!event.target || !event.isNew) return; - - var $card = $element; - var $oldCol = $card.closest('.kanban-col'); - var $newCol = $(event.target).closest('.kanban-col'); - var oldCol = $oldCol.data(); - var newCol = $newCol.data(); - var oldLane = $oldCol.closest('.kanban-lane').data('lane'); - var newLane = $newCol.closest('.kanban-lane').data('lane'); - var cardType = $card.find('.kanban-card').data('type'); - - if(!oldCol || !newCol || !newLane || !oldLane) return false; - if(oldCol.id === newCol.id && newLane.id === oldLane.id) return false; - - var cardID = $card.data().id; - var fromColType = $oldCol.data('type'); - var toColType = $newCol.data('type'); - var regionID = $card.closest('.region').data().id; - - changeCardColType(cardID, oldCol.id, newCol.id, oldLane.id, newLane.id, cardType, fromColType, toColType, regionID); -} - -var kanbanActionHandlers = -{ - dropItem: handleDropTask -}; - -/** - * Handle kanban action - */ -function handleKanbanAction(action, $element, event, kanban) -{ - $('.kanban').attr('data-action-enabled', action); - var handler = kanbanActionHandlers[action]; - if(handler) handler($element, event, kanban); -} - -/** - * changeCardColType - * - * @param int cardID - * @param int fromColID - * @param int toColID - * @param int fromLaneID - * @param int toLaneID - * @param string cardType - * @param string fromColType - * @param string toColType - * @param int regionID - * @access public - * @return void - */ -function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, cardType, fromColType, toColType, regionID = 0) -{ - var objectID = cardID; - var showIframe = false; - var moveCard = false; - - regionID = regionID ? regionID : 0; - - /* Task lane. */ - if(cardType == 'task') - { - if(toColType == 'developed') - { - if((fromColType == 'developing' || fromColType == 'wait') && priv.canFinishTask) - { - var link = createLink('task', 'finish', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'pause') - { - if(fromColType == 'developing' && priv.canPauseTask) - { - var link = createLink('task', 'pause', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'developing') - { - if((fromColType == 'canceled' || fromColType == 'closed' || fromColType == 'developed') && priv.canActivateTask) - { - var link = createLink('task', 'activate', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - if(fromColType == 'pause' && priv.canActivateTask) - { - var link = createLink('task', 'restart', 'taskID=' + objectID, '', true); - showIframe = true; - } - if(fromColType == 'wait' && priv.canStartTask) - { - var link = createLink('task', 'start', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'canceled') - { - if((fromColType == 'developing' || fromColType == 'wait' || fromColType == 'pause') && priv.canCancelTask) - { - var link = createLink('task', 'cancel', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'closed') - { - if((fromColType == 'developed' || fromColType == 'canceled') && priv.canCloseTask) - { - var link = createLink('task', 'close', 'taskID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - - if(fromLaneID != toLaneID && fromColID == toColID) shiftCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID); - } - - /* Bug lane. */ - if(cardType == 'bug') - { - if(toColType == 'confirmed') - { - if(fromColType == 'unconfirmed' && priv.canConfirmBug) - { - var link = createLink('bug', 'confirm', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'fixing') - { - if(fromColType == 'confirmed' || fromColType == 'unconfirmed') moveCard = true; - if((fromColType == 'closed' || fromColType == 'fixed' || fromColType == 'testing' || fromColType == 'tested') && priv.canActivateBug) - { - var link = createLink('bug', 'activate', 'bugID=' + objectID + '&kanbanInfo=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'fixed') - { - if(fromColType == 'fixing' || fromColType == 'confirmed' || fromColType == 'unconfirmed') - { - var link = createLink('bug', 'resolve', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - else if(toColType == 'testing') - { - if(fromColType == 'fixed') moveCard = true; - } - else if(toColType == 'tested') - { - if(fromColType == 'fixed' || fromColType == 'testing') moveCard = true; - } - else if(toColType == 'closed') - { - if(fromColType == 'testing' || fromColType == 'tested') - { - var link = createLink('bug', 'close', 'bugID=' + objectID + '&extra=fromColID=' + fromColID + ',toColID=' + toColID + ',fromLaneID=' + fromLaneID + ',toLaneID=' + toLaneID + ',regionID=' + regionID, '', true); - showIframe = true; - } - } - - if(moveCard || (fromLaneID != toLaneID && fromColID == toColID)) shiftCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID); - } - - /* Story lane. */ - if(cardType == 'story') - { - if(toColType == 'closed' && priv.canCloseStory) - { - var link = createLink('story', 'close', 'storyID=' + objectID, '', true); - showIframe = true; - } - else - { - if(toColType == 'ready') - { - $.get(createLink('story', 'ajaxGetInfo', "storyID=" + cardID), function(data) - { - if(data) - { - data = $.parseJSON(data); - if(data.status == 'draft' || data.status == 'changing' || data.status == 'reviewing') - { - bootbox.alert(executionLang.storyDragError); - } - else - { - ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID); - } - } - }); - } - else - { - ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID); - } - - } - } - - if(showIframe) - { - var modalTrigger = new $.zui.ModalTrigger({type: 'iframe', width: '80%', url: link}); - modalTrigger.show(); - } -} - -/** - * AJAX: move card. - * - * @param int $objectID - * @param int $fromColID - * @param int $toColID - * @param int $fromLaneID - * @param int $toLaneID - * @param int $regionID - * @access public - * @return void - */ -function ajaxMoveCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID) -{ - var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy + '®ionID=' + regionID+ '&orderBy=' + orderBy ); - $.ajax( - { - method: 'post', - dataType: 'json', - url: link, - success: function(data) - { - data = groupBy == 'default' ? data[regionID] : data[groupBy]; - updateRegion(regionID, data); - }, - error: function(xhr, status, error) - { - showErrorMessager(error || lang.timeout); - } - }); -} - -/** - * Delete a card. - * - * @param string objectType - * @param int objectID - * @param int regionID - * @access public - * @return void - */ -function deleteCard(objectType, objectID, regionID) -{ - $.zui.ContextMenu.hide(); - - regionID = regionID ? regionID : 0; - setTimeout(function() - { - var objectLang = objectType + 'Lang'; - var result = confirm(window[objectLang].confirmDelete); - - if(!result || !objectID) return false; - - var url = createLink('kanban', 'deleteObjectCard', 'objectType=' + objectType + '&objectID=' + objectID + '®ionID=' + regionID); - return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - data = groupBy == 'default' ? data[regionID] : data[groupBy]; - updateRegion(regionID, data); - } - }); - }, 200) -} - -/** - * Close modal and update kanban data. - * - * @param string kanbanData - * @param int regionID - * @access public - * @return void - */ -function updateKanban(kanbanData, regionID) -{ - if(typeof(regionID) == 'undefined') regionID = 0; - setTimeout(function() - { - $.zui.closeModal(); - if(regionID && groupBy == 'default') - { - updateRegion(regionID, kanbanData[regionID]); - } - else - { - $('#kanban').children('.region').children("div[id^='kanban']").each(function() - { - var regionID = $(this).attr('data-id'); - var data = groupBy == 'default' ? kanbanData[regionID] : kanbanData[groupBy] - updateRegion(regionID, data); - }); - } - }, 200); - resetRegionHeight('open'); -} - -/** - * Shift card. - * - * @param int objectID - * @param int fromColID - * @param int toColID - * @param int fromLaneID - * @param int toLaneID - * @param int regionID - * @access public - * @return void - */ -function shiftCard(objectID, fromColID, toColID, fromLaneID, toLaneID, regionID) -{ - var link = createLink('kanban', 'ajaxMoveCard', 'cardID=' + objectID + '&fromColID=' + fromColID + '&toColID=' + toColID + '&fromLaneID=' + fromLaneID + '&toLaneID=' + toLaneID + '&execitionID=' + executionID + '&browseType=' + browseType + '&groupBy=' + groupBy + '®ionID=' + regionID + '&orderBy=' + orderBy ); - $.ajax( - { - method: 'post', - dataType: 'json', - url: link, - success: function(data) - { - data = groupBy == 'default' ? data[regionID] : data[groupBy]; - updateRegion(regionID, data); - }, - error: function(xhr, status, error) - { - showErrorMessager(error || lang.timeout); - } - }); -} - -/** - * Process minus button. - * - * @access public - * @return void - */ -function processMinusBtn() -{ - var columnCount = $('#splitTable .child-column').size(); - if(columnCount > 2 && columnCount < 10) - { - $('#splitTable .btn-plus').show(); - $('#splitTable .btn-close').show(); - } - else if(columnCount <= 2) - { - $('#splitTable .btn-close').hide(); - } - else if(columnCount >= 10) - { - $('#splitTable .btn-plus').hide(); - } -} - - /** - * Create story menu - * @returns {Object[]} - */ -function createStoryMenu(options) -{ - var $card = options.$trigger.closest('.kanban-item'); - var story = $card.data('item'); - - var items = []; - var showAction = story.$col.type == 'backlog' || story.$col.type == 'ready' || story.$col.type == 'developing' || story.$col.type == 'developed' || story.$col.type == 'testing' || story.$col.type == 'tested' || story.$col.type == 'verified' || story.$col.type == 'released'; - - if(priv.canEditStory) items.push({label: storyLang.edit, icon: 'edit', url: createLink('story', 'edit', 'storyID=' + story.id + '&kanbanGroup=' + groupBy, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); - if(priv.canChangeStory && showAction && story.status == 'active') items.push({label: storyLang.change, icon: 'change', url: createLink('story', 'change', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canCreateTask && showAction && story.status == 'active') items.push({label: executionLang.wbs, icon: 'plus', url: createLink('task', 'create', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateTask && showAction && story.status == 'active') items.push({label: executionLang.batchWBS, icon: 'pluses', url: createLink('task', 'batchCreate', 'executionID=' + execution.id + '&storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canActivateStory && story.$col.type == 'closed') items.push({label: executionLang.activate, icon: 'magic', url: createLink('story', 'activate', 'storyID=' + story.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canUnlinkStory) items.push({label: executionLang.unlinkStory, icon: 'unlink', url: createLink('execution', 'unlinkStory', 'executionID=' + execution.id + '&storyID=' + story.id + '&confirm=no&from=' + '&laneID=' + story.lane + '&columnID=' + story.column, '', 'false'), attrs: {target: 'hiddenwin'}}); - if(priv.canDeleteStory) items.push({label: storyLang.delete, icon: 'trash', onClick: function(){deleteCard('story', story.id, story.$lane.region)}}); - return items; -} - - /** - * Create task menu - * @returns {Object[]} - */ -function createTaskMenu(options) -{ - var $card = options.$trigger.closest('.kanban-item'); - var task = $card.data('item'); - var items = []; - if(priv.canEditTask) items.push({label: taskLang.edit, icon: 'edit', url: createLink('task', 'edit', 'taskID=' + task.id + '&comment=&kanbanGroup=' + groupBy, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); - if(priv.canRestartTask && task.$col.type == 'pause') items.push({label: taskLang.restart, icon: 'play', url: createLink('task', 'restart', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canPauseTask && task.$col.type == 'developing') items.push({label: taskLang.pause, icon: 'pause', url: createLink('task', 'pause', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canRecordWorkhourTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordWorkhour', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canActivateTask && (task.$col.type == 'developed' || task.$col.type == 'canceled' || task.$col.type == 'closed')) items.push({label: executionLang.activate, icon: 'magic', url: createLink('task', 'activate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'executionID=' + executionID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canCancelTask && (task.$col.type == 'wait' || task.$col.type == 'developing' || task.$col.type == 'pause')) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canDeleteTask) items.push({label: taskLang.delete, icon: 'trash', onClick: function(){deleteCard('task', task.id, task.$lane.region)}}); - return items; -} - - /** - * Create bug menu - * @returns {Object[]} - */ -function createBugMenu(options) -{ - var $card = options.$trigger.closest('.kanban-item'); - var bug = $card.data('item'); - var items = []; - if(priv.canEditBug) items.push({label: bugLang.edit, icon: 'edit', url: createLink('bug', 'edit', 'bugID=' + bug.id + '&comment=&kanbanGroup=' + groupBy, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '95%'}}); - if(priv.canResolveBug && (bug.$col.type == 'unconfirmed' || bug.$col.type == 'confirmed' || bug.$col.type == 'fixing')) items.push({label: bugLang.resolve, icon: 'checked', url: createLink('bug', 'resolve', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canConfirmBug && (bug.$col.type == 'fixed' || bug.$col.type == 'testing' || bug.$col.type == 'tested')) items.push({label: bugLang.close, icon: 'off', url: createLink('bug', 'close', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canConfirmBug && bug.$col.type == 'unconfirmed') items.push({label: bugLang.confirm, icon: 'ok', url: createLink('bug', 'confirm', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canCopyBug) items.push({label: bugLang.copy, icon: 'copy', url: createLink('bug', 'create', 'productID=' + productID + '&branch=&extras=bugID=' + bug.id + ',regionID=' + bug.$lane.region + ',laneID=' + bug.lane + ',columnID=' + bug.column + ',executionID=' + executionID, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canToStoryBug && (bug.$col.type != 'closed')) items.push({label: bugLang.toStory, icon: 'lightbulb', url: createLink('story', 'create', 'product=' + productID + '&branch=' + '0' + '&module=' + '0' + '&story=' + '0' + '&execution=' + '0' + '&bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canActivateBug && (bug.$col.type == 'fixed') || bug.$col.type == 'testing' || bug.$col.type == 'tested' || bug.$col.type == 'closed') items.push({label: bugLang.activate, icon: 'magic', url: createLink('bug', 'activate', 'bugID=' + bug.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canDeleteBug) items.push({label: bugLang.delete, icon: 'trash', onClick: function(){deleteCard('bug', bug.id, bug.$lane.region)}}); - return items; -} - -/** - * Handle sort cards. - * - * @param object event -* @access public - * @return void - */ -function handleSortCards(event) -{ - if(window.sortableDisabled || groupBy != 'default' || rdSearchValue != '') return; - var newLaneID = event.element.closest('.kanban-lane').data('id'); - var newColID = event.element.closest('.kanban-col').data('id'); - var cards = event.element.closest('.kanban-lane-items').data('cards'); - var orders = cards.map(function(card){return card.id}); - var fromID = String(event.element.data('id')); - var toID = String(event.target.data('id')); - - orders.splice(orders.indexOf(fromID), 1); - orders.splice(orders.indexOf(toID) + (event.insert === 'before' ? 0 : 1), 0, fromID); - - var url = createLink('kanban', 'sortCard', 'kanbanID=' + executionID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',')); - $.getJSON(url, function(response) - { - if(response.result === 'fail') - { - if(typeof response.message === 'string' && response.message.length) - { - bootbox.alert(response.message); - } - setTimeout(function(){return location.reload()}, 3000); - } - else - { - $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD' + '&serachValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data) - { - if(data && lastUpdateData !== data) - { - lastUpdateData = data; - kanbanData = $.parseJSON(data); - for(var region in kanbanData) - { - updateRegion(region, kanbanData[region]); - } - } - }); - } - }); -} - -/* Define menu creators */ -window.menuCreators = -{ - lane: createLaneMenu, - column: createColumnMenu, - columnCreate: createColumnCreateMenu, - task: createTaskMenu, - story: createStoryMenu, - bug: createBugMenu, -}; - -/** - * Init kanban. - * - * @param object $kanban - * @access public - * @return void - */ -function initKanban($kanban) -{ - var id = $kanban.data('id'); - var region = regions[id]; - - $kanban.kanban( - { - data: groupBy == 'default' ? region.groups : kanbanData[groupBy], - maxColHeight: 'auto', - calcColHeight: calcColHeight, - minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : defaultMinColWidth, - maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : defaultMaxColWidth, - cardHeight: getCardHeight(), - fluidBoardWidth: fluidBoard, - displayCards: typeof window.displayCards === 'number' ? window.displayCards : 2, - createColumnText: kanbanLang.createColumn, - addItemText: '', - cardsPerRow: window.kanbanScaleSize, - onAction: handleKanbanAction, - onRenderLaneName: renderLaneName, - onRenderHeaderCol: renderHeaderCol, - onRenderCount: renderCount, - droppable: {target: findDropColumns, finish:handleFinishDrop}, - sortable: handleSortCards, - virtualize: true, - virtualCardList: true, - virtualRenderOptions: {container: $(window).add($('#kanbanContainer'))} - }); - - $kanban.on('click', '.action-cancel', hideKanbanAction); - $kanban.on('scroll', function() - { - $.zui.ContextMenu.hide(); - }); - var kanbanMinColWidth = typeof window.minColWidth === 'number' ? window.minColWidth : defaultMinColWidth; - if(kanbanMinColWidth < 190) - { - var miniColWidth = kanbanMinColWidth * 0.2; - $('.kanban-header-col>.title>span:not(.text)').hide(); - $('.kanban-header-col>.title > span.text').css('max-width', miniColWidth + 'px'); - } -} - -/** - * Init when page ready - */ -$(function() -{ - changeStatus(execution.status); - - if($.cookie('isFullScreen') == 1) $.cookie('isFullScreen', 0); - - changeOrder = false; - - window.kanbanScaleSize = +$.zui.store.get('executionKanbanScaleSize', 1); - $('#kanbanScaleSize').text(window.kanbanScaleSize); - $('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null); - $('#kanbanScaleControl .btn[data-type="-"]').attr('disabled', window.kanbanScaleSize <= 1 ? 'disabled' : null); - - /* Make kanbanScaleControl works */ - $('#kanbanScaleControl').on('click', '.btn', function() - { - changeKanbanScaleSize(window.kanbanScaleSize + ($(this).data('type') === '+' ? 1 : -1)); - }); - - /* Init first kanban */ - $('.kanban').each(function() - { - initKanban($(this)); - }); - - $('.icon-chevron-double-up,.icon-chevron-double-down').on('click', function() - { - $(this).toggleClass('icon-chevron-double-up icon-chevron-double-down'); - $(this).parents('.region').find('.kanban').toggle(); - hideKanbanAction(); - resetRegionHeight($(this).hasClass('icon-chevron-double-up') ? 'open' : 'close'); - }); - - $('.region-header').on('click', '.action', hideKanbanAction); - $('#TRAction').on('click', '.btn', hideKanbanAction); - - /* Hide action box when user click document */ - $(document).on('click', function(e) - { - $('.kanban').each(function() - { - var currentAction = $(this).kanban().attr('data-action-enabled'); - var canHideAction = (currentAction === 'headerMore' || currentAction === 'editLaneName') - && !$(e.target).closest('.action,.action-box').length; - if(canHideAction) hideKanbanAction(); - }); - }); - - /* Init contextmenu */ - $('#kanban').on('click', '[data-contextmenu]', function(event) - { - var $trigger = $(this); - var menuType = $trigger.data('contextmenu'); - var menuCreator = window.menuCreators[menuType]; - if(!menuCreator) return; - - var options = $.extend({event: event, $trigger: $trigger}, $trigger.data()); - var items = menuCreator(options); - if(!items || !items.length) return; - - $.zui.ContextMenu.show(items, items.$options || {event: event}); - }); - - /* Hide contextmenu when page scroll */ - $(window).on('scroll', function() - { - $.zui.ContextMenu.hide(); - }); - - $('#toStoryButton').on('click', function() - { - var planID = $('#plan').val(); - if(planID) - { - var vars = $('.linkStoryByPlanButton').data('lane') != null ? '&extra=laneID='+ $('.linkStoryByPlanButton').data('lane') + ',columnID=' + $('.linkStoryByPlanButton').data('col') : ''; - var param = "¶m=executionID=" + executionID + ",browseType=" + browseType + ",orderBy=id_asc,groupBy=" + groupBy; - location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID + '&productID=0' + vars + param); - $.closeModal(); - } - }); - - $('#product').change(function() - { - var product = $('#product').val(); - if(product) - { - var link = createLink('bug', 'batchCreate', 'productID=' + product + '&branch=&executionID=' + executionID, '', true); - $('#batchCreateBugButton').attr('href', link); - } - }); - - $(document).on('click', '#splitTable .btn-plus', function() - { - var tr = $(this).closest('tr'); - tr.after($('#childTpl').html().replace(/key/g, key)); - tr.next().find('input[name^=color]').colorPicker(); - key++; - processMinusBtn(); - return false; - }); - - /* Remove a trade detail item. */ - $(document).on('click', '#splitTable .btn-close', function() - { - $(this).closest('tr').remove(); - processMinusBtn(); - return false; - }); - - /* Modify color's border color. */ - $(document).on('mouseout', '.color0', function() - { - $('.color0 .cardcolor').css('border', '1px solid #b0b0b0'); - }); - - /* Modify default color's border color. */ - $(document).on('mouseover', '.color0', function() - { - $('.color0 .cardcolor').css('border', '1px solid #fff'); - }); - - document.addEventListener('scroll', function() - { - hideKanbanAction(); - }, true); - - /* Init sortable */ - var sortType = ''; - var $cards = null; - $('#kanban').sortable( - { - selector: '.region, .kanban-board, .kanban-lane', - trigger: '.region.sort > .region-header, .kanban-board.sort > .kanban-header > .kanban-group-header, .kanban-lane.sort > .kanban-lane-name', - dropOnMouseleave: true, - container: function($ele) - { - return $ele.parent(); - }, - targetSelector: function($ele) - { - /* Sort regions */ - if($ele.hasClass('region')) - { - sortType = 'region'; - return $ele.parent().children('.region'); - } - - /* Sort boards */ - if($ele.hasClass('kanban-board')) - { - sortType = 'board'; - return $ele.parent().children('.kanban-board'); - } - - /* Sort lanes */ - if($ele.hasClass('kanban-lane')) - { - sortType = 'lane'; - $cards = $ele.find('.kanban-item'); - - return $ele.parent().children('.kanban-lane'); - } - }, - before: function() - { - return !window.sortableDisabled; - }, - start: function(e) - { - if(sortType == 'region') - { - showRegionIdList = ''; - $('.icon-chevron-double-up').each(function() - { - showRegionIdList += $(this).attr('data-id') + ','; - $(this).attr('class', 'icon-chevron-double-down'); - }); - - $('.region').find('.kanban').hide(); - hideKanbanAction(); - } - }, - finish: function(e) - { - if(!e.changed) return; - - var url = ''; - var orders = []; - - if(sortType == 'region') - { - e.list.each(function(index, data) - { - if(data.item.hasClass('region') && data.item.hasClass('sort')) orders.push(data.item.data('id')); - }); - - $('.region').each(function() - { - if(showRegionIdList.includes($(this).attr('data-id'))) - { - $(this).find('.icon-chevron-double-down').attr('class', 'icon-chevron-double-up'); - $(this).find('.kanban').show(); - } - }) - - url = createLink('kanban', 'sortRegion', 'regions=' + orders.join(',')); - } - if(sortType == 'board') - { - var regionID = e.element.closest('.region').data('id'); - e.list.each(function(index, data) - { - if(data.item.hasClass('kanban-board') && data.item.hasClass('sort') && regionID == data.item.parent().data().id) orders.push(data.item.data('id')); - }); - - url = createLink('kanban', 'sortGroup', 'region=' + regionID + '&groups=' + orders.join(',')); - } - if(sortType == 'lane') - { - var groupID = e.element.closest('.kanban-board').data('id'); - e.list.each(function(index, data) - { - if(data.item.hasClass('kanban-lane') && data.item.hasClass('sort') && groupID == data.item.data().lane.group) orders.push(data.item.data('id')); - }); - - var regionID = e.element.closest('.region').data('id'); - url = createLink('kanban', 'sortLane', 'region=' + regionID + '&lanes=' + orders.join(',')); - } - - if(!url) return true; - - $.getJSON(url, function(response) - { - if(response.result == 'fail' && response.message.length) - { - bootbox.alert(response.message); - setTimeout(function(){return location.reload()}, 3000); - } - }); - }, - always: function(e) - { - if(sortType == 'lane') $cards.show(); - } - }); - - /* Ajax update kanban. */ - if(groupBy == 'default') - { - setInterval(function() - { - if(rdSearchValue == '') - { - $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data) - { - if(lastUpdateData == '') lastUpdateData = data; - if(data && lastUpdateData !== data) - { - lastUpdateData = data; - kanbanData = $.parseJSON(data); - for(var region in kanbanData) - { - updateRegion(region, kanbanData[region]); - } - } - }); - } - }, 10000); - } - - if(groupBy != 'default') - { - $('.region').css('padding-bottom', '10px'); - $('.region').css('border', '0px'); - } - - resetRegionHeight('open'); -}); - -/** Calculate column height */ -function calcColHeight(col, lane, colCards, colHeight, kanban) -{ - var options = kanban.options; - if(!options.displayCards) return colHeight; - - var displayCards = +(options.displayCards || 2); - - if (typeof displayCards !== 'number' || displayCards < 2) displayCards = 2; - return (displayCards * (options.cardHeight + options.cardSpace) + options.cardSpace); -} - -/** - * Reset region height according to window height. - * - * @param string fold - * @access public - * @return void - */ -function resetRegionHeight(fold) -{ - var laneCount = $('.kanban-lane').length; - - if(laneCount > 1 || $('.region').length > 0) return; - - var regionHeaderHeight = $('.region-header').outerHeight(); - if(fold == 'open') - { - var windowHeight = $(window).height(); - var headerHeight = $('#mainHeader').outerHeight(); - var mainPadding = $('#main').css('padding-top'); - var menuHeight = $('#mainMenu').height(); - var panelBorder = $('.panel').css('border-top-width'); - var bodyPadding = $('.panel-body').css('padding-top'); - var regionBorder = $('.region').css('border-top-width'); - var regionPadding = $('.kanban').css('padding-bottom'); - var columnHeight = $('.kanban-header').outerHeight(); - var height = windowHeight - (parseInt(mainPadding) * 2) - menuHeight - (parseInt(bodyPadding) * 2) - headerHeight - (parseInt(panelBorder) * 2) - (parseInt(regionBorder) * 2); - - if(groupBy == 'default') $('.region').css('height', height); - $('.kanban-lane').css('height', height - regionHeaderHeight - parseInt(regionPadding) - columnHeight); - } - else - { - $('.region').css('height', regionHeaderHeight); - } -} - -/** - * Toggle RDSearchBox. - * - * @access public - * @return void - */ -function toggleRDSearchBox() -{ - $('#rdSearchBox').toggle(); - - if($('#rdSearchBox').css('display') == 'block') - { - $(".querybox-toggle").css("color", "#0c64eb"); - } - else - { - $(".querybox-toggle").css("color", "#3c495c"); - $('#rdKanbanSearchInput').attr('value', ''); - searchCards(''); - } -} - -/** - * Search all cards. - * - * @param string $value - * @param string order - * - * @access public - * @return void - */ -function searchCards(value, order = '') -{ - rdSearchValue = value; - orderBy = order == '' ? orderBy : order; - if(order != '') changeOrder = true; - $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data) - { - lastUpdateData = data; - kanbanData = $.parseJSON(data); - var hideAll = true; - $('#kanban').children('.region').children("div[id^='kanban']").each(function() - { - var regionID = $(this).attr('data-id'); - if(kanbanData != null) data = groupBy == 'default' ? kanbanData[regionID] : kanbanData[groupBy]; - - if(rdSearchValue != '' && groupBy == 'default' && data.laneCount != 0) $(this).parent().show(); - if(rdSearchValue != '' && groupBy == 'default' && data.laneCount == 0) $(this).parent().hide(); - - $(this).empty(); - hideAll = !updateRegion(regionID, data) && hideAll; - }); - - if(hideAll && rdSearchValue != '') - { - if($('.table-empty-tip').length == 0) $('#kanban').append('

' + kanbancardLang.empty + '

'); - } - else - { - $('.table-empty-tip').remove(); - } - }); -} diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js deleted file mode 100644 index fd9ff37373..0000000000 --- a/module/execution/js/managemembers.js +++ /dev/null @@ -1,163 +0,0 @@ -/* Update other picker on change */ -$.zui.Picker.DEFAULTS.onChange = function(event) -{ - var picker = event.picker; - if(!picker.$formItem.is('[name^=accounts]')) return; - - var select = picker.$formItem[0]; - var newItem = event.value.length ? $.extend({}, picker.getListItem(event.value), {disabled: true}) : $.extend({}, picker.getListItem(event.oldValue), {disabled: false}); - - $('.picker-select[name^=accounts]').each(function() - { - if(this === select) return; - - var $select = $(this); - var selectPicker = $select.data('zui.picker'); - - if(selectPicker) selectPicker.updateOptionList([$.extend({}, newItem)]); - }); -} - -$(function() -{ - $('#execution_chosen, #execution + .picker').click(function() - { - $('#execution_chosen ul li, #pickerDropMenu-pk_execution div a').each(function(index) - { - if(index == 0) - { - var projectName = subString($(this).text(), 56); - $(this).text(projectName); - $(this).append(' '); - } - else - { - $(this).prepend('   '); - } - }) - }); -}) - -/** - * Set role when select an account. - * - * @param string $account - * @param int $roleID - * @access public - * @return void - */ -function setRole(account, roleID) -{ - role = roles[account]; // get role according the account. - roleOBJ = $('#role' + roleID); // get role object. - roleOBJ.val(role) // set the role. -} - -/** - * Add item. - * - * @param object $obj - * @access public - * @return void - */ -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, itemIndex); - $('' + item + '').insertAfter($(obj).closest('tr')); - var $accounts = $('#hours' + itemIndex).closest('tr').find('select:first') - - if($accounts.attr('data-pickertype') != 'remote') - { - $accounts.addClass('picker-select').picker({chosenMode: true}); - } - else - { - $accounts.parent().find('.picker.picker-ready').remove(); - var pickerremote = $accounts.attr('data-pickerremote'); - $accounts.addClass('picker-select').picker({chosenMode: true, remote: pickerremote}); - } - itemIndex ++; - - var disabledItems = []; - $('.picker-select[name^=accounts]').each(function() - { - if(this === $accounts[0]) return; - var $select = $(this); - var picker = $select.data('zui.picker'); - if(!picker) return; - var selectItem = picker.getListItem(picker.getValue()); - if(selectItem) disabledItems.push($.extend({}, selectItem, {disabled: true})); - }); - if(disabledItems.length) $accounts.data('zui.picker').updateOptionList(disabledItems); -} - -/** - * Delete item. - * - * @param object $obj - * @access public - * @return void - */ -function deleteItem(obj) -{ - if($('#teamForm .table tbody').children().length < 2) return false; - - $(obj).closest('tr').find('.picker .picker-selection-remove').click(); - $(obj).closest('tr').remove(); -} - -/** - * Set dept users. - * - * @param object $obj - * @access public - * @return void - */ -function setDeptUsers(obj) -{ - dept = $(obj).val(); // Get dept ID. - link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team2Import + '&dept=' + dept); // Create manageMembers link. - location.href=link; -} - -/** - * Chose team to copy. - * - * @param object $obj - * @access public - * @return void - */ -function choseTeam2Copy(obj) -{ - team = $(obj).val(); - dept = $('#dept').val(); - link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team + '&dept=' + dept); - location.href=link; -} - -/** - * Cut a string of letters and characters with the same length. - * - * @param string $title - * @param int $stringLength - * @access public - * @return string - */ -function subString(title, stringLength) -{ - if(title.replace(/[\u4e00-\u9fa5]/g, "**").length > stringLength) - { - var length = 0; - for(var i = 0; i < title.length; i ++) - { - length += title.charCodeAt(i) > 255 ? 2 : 1; - if(length > stringLength) - { - title = title.substring(0, i) + '...'; - break; - } - } - } - - return title; -} diff --git a/module/execution/js/manageproducts.js b/module/execution/js/manageproducts.js deleted file mode 100644 index 5ed5d3fb60..0000000000 --- a/module/execution/js/manageproducts.js +++ /dev/null @@ -1,45 +0,0 @@ -$(function() -{ - $('#productsBox input:checkbox').each(function() - { - var $cb = $(this); - if($cb.prop('checked')) $cb.closest('.product').addClass('checked'); - }); - - $('#productsBox input:checkbox').change(function() - { - var $cb = $(this); - $cb.closest('.product').toggleClass('checked', $cb.prop('checked')); - - if($cb.prop('checked')) return true; - - var productID = String($cb.val()); - if($.inArray(productID, unmodifiableProducts) != -1) - { - var $branch = $cb.closest('.product').find('[name^=branch]'); - if($branch.length) - { - var branchID = String($branch.val()); - - if($.inArray(branchID, unmodifiableBranches) != -1 && linkedStoryIDList[productID][branchID]) - { - bootbox.alert(unLinkProductTip.replace("%s", allProducts[productID] + branchGroups[productID][branchID])); - } - } - else - { - bootbox.alert(unLinkProductTip.replace("%s", allProducts[productID])); - } - } - }); - - $("select[id^=branch]").change(function() - { - var checked = $(this).closest('div').hasClass('checked'); - if(!checked) - { - $(this).closest('div').addClass('checked'); - $(this).closest('div').find("input[id^=products]").prop('checked', true); - } - }); -}); diff --git a/module/execution/js/setkanban.js b/module/execution/js/setkanban.js deleted file mode 100644 index b6cec9aa53..0000000000 --- a/module/execution/js/setkanban.js +++ /dev/null @@ -1,6 +0,0 @@ -$(function() -{ - var heightType = $("[name='heightType']:checked").val(); - setCardCount(heightType); - handleKanbanWidthAttr(); -}); diff --git a/module/execution/js/story.js b/module/execution/js/story.js deleted file mode 100644 index 1b3a50a524..0000000000 --- a/module/execution/js/story.js +++ /dev/null @@ -1,170 +0,0 @@ -$(function() -{ - if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150); - - if(isDropMenu) - { - $('#navbar .nav li').removeClass('active'); - $("#navbar .nav li[data-id=" + storyType + ']').addClass('active'); - - $('#navbar .nav>li[data-id=story]').addClass('active'); - $('#navbar .nav>li[data-id=story]>a').html($('.active [data-id=' + storyType + ']').text() + ''); - } - - $('#storyList td.has-child .story-toggle').each(function() - { - var $td = $(this).closest('td'); - var labelWidth = 0; - if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); - $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); - }); - - $(document).on('click', '.story-toggle', function(e) - { - var $toggle = $(this); - var id = $(this).data('id'); - var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); - $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); - - e.stopPropagation(); - e.preventDefault(); - }); - - $('#storyList').on('sort.sortable', function(e, data) - { - var list = ''; - for(i = 0; i < data.list.length; i++) list += $(data.list[i].item).attr('data-id') + ','; - $.post(createLink('execution', 'storySort', 'executionID=' + executionID), {'storyList' : list, 'orderBy' : orderBy}, function() - { - var $target = $(data.element[0]); - $target.hide(); - $target.fadeIn(1000); - order = 'order_desc' - history.pushState({}, 0, createLink('execution', 'story', "executionID=" + executionID + '&orderBy=' + order)); - }); - }); - - $('#module' + moduleID).parent().addClass('active'); - $('#product' + productID).addClass('active'); - $('#branch' + branchID).addClass('active'); - $(document).on('click', "#storyList tbody tr, .table-footer .check-all, #storyList thead .check-all", function(){showCheckedSummary();}); - $(document).on('change', "#storyList :checkbox", function(){showCheckedSummary();}); - - $('#toTaskButton').on('click', function() - { - var planID = $('#plan').val(); - if(planID) - { - location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID); - } - }) - - /* Get checked stories. */ - $(document).on('click', '#batchToTaskButton', function() - { - storyIdList = ''; - linedTaskIdList = ''; - unlinkTaskIdList = ''; - $("input[name^='storyIdList']:checked").each(function() - { - if(linkedTaskStories[$(this).val()]) - { - linedTaskIdList += '[' + $(this).val() +']'; - } - else - { - unlinkTaskIdList += $(this).val() + ','; - } - storyIdList += $(this).val() + ','; - }); - - $('#type').val('').trigger("chosen:updated"); - $('#hourPointValue').val(''); - $('input[name^=fields]').prop('checked', true); - }); - - $('#submit').click(function() - { - var taskType = $('#type').val(); - var hourPoint = $('#hourPointValue').val(); - if(taskType.length == 0) - { - alert(typeNotEmpty); - return false; - } - - if(hourPoint == 0) - { - alert(hourPointNotEmpty); - return false; - } - else if(typeof(hourPoint) != 'undefined' && (isNaN(hourPoint) || hourPoint < 0)) - { - alert(hourPointNotError); - return false; - } - hourPoint = typeof(hourPoint) == 'undefined' ? 0 : hourPoint; - - if(linedTaskIdList) - { - confirmStoryToTask = confirmStoryToTask.replace('%s', linedTaskIdList); - if(confirm(confirmStoryToTask)) - { - $('#storyIdList').val(storyIdList); - } - else - { - if(!unlinkTaskIdList) return false; - - $('#storyIdList').val(unlinkTaskIdList); - } - } - else - { - $('#storyIdList').val(storyIdList); - } - }); - - $('.sorter-false a').unwrap(); - - /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ - $(".sidebar-toggle").click(function() - { - $("#sidebarHeader").toggle("fast"); - }); - if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); -}); - -/** - * Show checked summary. - * - * @access public - * @return void - */ -function showCheckedSummary() -{ - var $summary = $('#main #mainContent form.main-table .table-header .table-statistic'); - - var checkedTotal = 0; - var checkedEstimate = 0; - var checkedCase = 0; - $('[name^="storyIdList"]').each(function() - { - if($(this).prop('checked')) - { - checkedTotal += 1; - var taskID = $(this).val(); - $tr = $("#storyList tbody tr[data-id='" + taskID + "']"); - checkedEstimate += Number($tr.data('estimate')); - if(Number($tr.data('cases')) > 0) checkedCase += 1; - } - }); - if(checkedTotal > 0) - { - rate = Math.round(checkedCase / checkedTotal * 10000) / 100 + '' + '%'; - summary = checkedSummary.replace('%total%', checkedTotal) - .replace('%estimate%', checkedEstimate) - .replace('%rate%', rate) - $summary.html(summary); - } -} diff --git a/module/execution/js/storyestimate.js b/module/execution/js/storyestimate.js deleted file mode 100644 index 98b0e4c576..0000000000 --- a/module/execution/js/storyestimate.js +++ /dev/null @@ -1,48 +0,0 @@ -$('.new-estimate input').keyup(function() -{ - computeAverage(); -}) - -$(function() -{ - $('#round_chosen').click(function() - { - var maxHeight = $(window).height() - 150; - $('.chosen-container .chosen-results').attr('style', 'max-height: ' + maxHeight + 'px !important;'); - }) -}) - -function computeAverage() -{ - var summary = 0; - var count = 0; - var average = 0; - $('.new-estimate').each(function() - { - var value = $(this).find('input').val(); - if(value) - { - value = parseFloat(value); - if(isNaN(value)) value = 0; - summary += value; - count += 1; - } - }) - - if(count) average = summary / count; - $('#average').val(average.toFixed(2)); - $('#showAverage').html(average.toFixed(2)); -} - -function showNewEstimate() -{ - $('.th-new-estimate').removeClass('hide'); - $('.new-estimate').removeClass('hide'); - $('.form-actions').removeClass('hide'); - $('.empty-th').addClass('hide'); -} - -function selectRound(round) -{ - location.href = createLink('execution', 'storyEstimate', 'executionID=' + executionID + '&storyID=' + storyID + '&round=' + round); -} diff --git a/module/execution/js/storykanban.js b/module/execution/js/storykanban.js deleted file mode 100644 index e7d1fc7045..0000000000 --- a/module/execution/js/storykanban.js +++ /dev/null @@ -1,129 +0,0 @@ -$(function() -{ - var isFirefox = $.zui.browser.firefox; - $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot}); - var $kanban = $('#kanban'); - - var stageMap = new Object(); - if(canBeChanged) - { - stageMap = - { - story: - { - projected : {verified: 'batchChangeStage'}, - developing : {verified: 'batchChangeStage'}, - developed : {verified: 'batchChangeStage'}, - testing : {verified: 'batchChangeStage'}, - tested : {verified: 'batchChangeStage'}, - } - }; - } - - var fixBoardWidth = function() - { - var $table = $kanban.find('.table'); - var kanbanWidth = $table.width(); - var $cBoards = $table.find('thead>tr>th.c-board:not(.c-side)'); - var boardCount = $cBoards.length; - if (boardCount <= 1) { - return; - } - var $cSide = $table.find('thead>tr>th.c-board.c-side'); - var totalWidth = kanbanWidth; - if ($cSide.length) totalWidth = totalWidth - ($cSide.outerWidth() + 5); - var cBoardWidth = Math.floor(totalWidth/boardCount); - - $cBoards.not(':last').css('width', cBoardWidth); - $cBoards.last().css('width', totalWidth - cBoardWidth * (boardCount - 1)); - var $boards = $kanban.find('.boards > .board'); - $boards.not(':last').css('width', cBoardWidth); - $boards.last().css('width', totalWidth - cBoardWidth * (boardCount - 1)); - }; - fixBoardWidth(); - $(window).on('resize', fixBoardWidth); - - var refresh = function() - { - var selfClose = $.cookie('selfClose'); - $.cookie('selfClose', 0, {expires:config.cookieLife, path:config.webRoot}); - if(selfClose == 1) $kanban.load(location.href + ' #kanban', fixBoardWidth); - }; - - var dropTo = function(id, from, to, type) - { - if(stageMap[type][from] && stageMap[type][from][to]) - { - $.post(createLink(type, stageMap[type][from][to], 'stage=' + to), {'storyIdList[]':[id]}, function() - { - refresh(); - location.reload(); - }); - return true; - } - return false; - }; - - $kanban.droppable( - { - selector: '.board-item:not(.disabled)', - target: function($ele) - { - var itemType = $ele.data('type'); - var $board = $ele.closest('.board'); - var type = $board.data('type'); - return $board.siblings('.board').filter(function() - { - var typeMap = stageMap[itemType]; - var actionMap = typeMap && typeMap[type]; - return !!actionMap && actionMap[$(this).data('type')]; - }); - }, - start: function(e) - { - $kanban.addClass('dragging'); - e.targets.addClass('can-drop-in'); - var $item = $(e.element).addClass('dragging'); - $item.closest('.boards').addClass('dragging'); - }, - drag: function(e) - { - var $item = $(e.element); - var $target = $(e.target); - var $holder = $target.find('.board-drag-holder'); - if (!$holder.length) $holder = $('
').appendTo($target); - $kanban.find('.c-board.dragging').removeClass('dragging'); - $kanban.find('.c-board.s-' + $target.data('type')).addClass('dragging'); - $holder.height($item.outerHeight()); - }, - drop: function(e) - { - var result = dropTo(e.element.data('id'), e.element.closest('.board').data('type'), e.target.data('type'), e.element.data('type')); - if(result !== false) - { - e.element.insertBefore(e.target.find('.board-drag-holder')); - } - }, - finish: function() - { - $kanban.removeClass('dragging').find('.can-drop-in').removeClass('can-drop-in'); - $kanban.find('.dragging').removeClass('dragging'); - } - }); - - $kanban.on('click', '.kanbaniframe', function(e) - { - var $link = $(this); - new $.zui.ModalTrigger($.extend( - { - type: 'iframe', - url: $link.attr('href'), - width: '80%', - }, $link.data())).show( - { - shown: function(){$('.modal-iframe').data('cancel-reload', true)}, - hidden: refresh - }); - return false; - }); -}); diff --git a/module/execution/js/task.js b/module/execution/js/task.js deleted file mode 100644 index 8a8d1f948f..0000000000 --- a/module/execution/js/task.js +++ /dev/null @@ -1,69 +0,0 @@ -$(function() -{ - if($('#taskList thead th.c-name').width() < 150) $('#taskList thead th.c-name').width(150); - $('#taskList td.has-child .task-toggle').each(function() - { - var $td = $(this).closest('td'); - var labelWidth = 0; - if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); - $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); - }); - - toggleFold('#executionTaskForm', unfoldTasks, executionID, 'execution'); - - adjustTableFooter(); - $('body').on('click', '#toggleFold', adjustTableFooter); - $('body').on('click', '.icon.icon-angle-right', adjustTableFooter); - - /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ - $(".sidebar-toggle").click(function() - { - $("#sidebarHeader").toggle("fast"); - }); - if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); -}); - -$('#module' + moduleID).closest('li').addClass('active'); -$('#product' + productID).closest('li').addClass('active'); - -/** - * Adjust the table footer style. - * - * @access public - * @return void - */ -function adjustTableFooter() -{ - if($('.main-col').height() < $(window).height()) - { - $('.table.with-footer-fixed').css('margin-bottom', '0'); - $('.table-footer').removeClass('fixed-footer'); - $('.table-footer').css({'left': 0, 'bottom': 0, 'width': 'unset'}); - } -} - -/** - * Ajax refresh. - * - * @access public - * @return void - */ -function ajaxRefresh() -{ - var $table = $('#executionTaskForm').closest('[data-ride="table"]'); - if($table.length) - { - var table = $table.data('zui.table'); - if(table) - { - table.options.replaceId = 'executionTaskForm'; - table.reload(); - } - } - $.get(location.href, function(data) - { - var $data = $(data); - $('#mainMenu > div.btn-toolbar.pull-left').html($data.find('#mainMenu > div.btn-toolbar.pull-left').html()); - if($data.find('#mainContent .main-col .table-empty-tip').length) $('#mainContent .main-col').html($data.find('#mainContent .main-col')); - }); -} diff --git a/module/execution/js/team.js b/module/execution/js/team.js deleted file mode 100644 index 31f06eeaaa..0000000000 --- a/module/execution/js/team.js +++ /dev/null @@ -1,38 +0,0 @@ -function checkUserDept(userID) -{ - alert(noAccess); -} - -/** - * Delete memeber of project team. - * - * @param int $executionID - * @param int $userID - * @access public - * @return void - */ -function deleteMember(executionID, userID) -{ - bootbox.confirm(confirmUnlinkMember, function(result) - { - if(!result) return true; - var unlinkURL = createLink('execution', 'unlinkMember', 'executionID=' + executionID + '&userID=' + userID + '&confirm=yes'); - unlinkMember(unlinkURL); - }); -} - -/** - * Unlink member from project. - * - * @param unlinkURL $unlinkURL - * @access public - * @return void - */ -function unlinkMember(unlinkURL) -{ - $.get(unlinkURL, function(data) - { - data = JSON.parse(data); - if(data.result == 'success') window.location.reload(); - }); -} diff --git a/module/execution/js/testcase.js b/module/execution/js/testcase.js deleted file mode 100644 index 07d0894912..0000000000 --- a/module/execution/js/testcase.js +++ /dev/null @@ -1,14 +0,0 @@ -var runCase = false; -/** - * Define triggerModal hidden event. - * - * @access public - * @return void - */ -function triggerHidden() -{ - $('#triggerModal').on('hidden.zui.modal', function() - { - if(runCase == true) window.location.reload(); - }); -} diff --git a/module/execution/js/testtask.js b/module/execution/js/testtask.js deleted file mode 100644 index 7b904e5b23..0000000000 --- a/module/execution/js/testtask.js +++ /dev/null @@ -1,24 +0,0 @@ -$(function() -{ - $('#testtaskForm').table( - { - replaceId: 'taskIdList', - statisticCreator: function(table) - { - var $table = table.getTable(); - var $checkedRows = $table.find('tbody>tr.checked'); - var checkedTotal = $checkedRows.length; - var checkedWait = $checkedRows.filter("[data-status=wait]").length; - var checkedTesting = $checkedRows.filter("[data-status=doing]").length; - var checkedBlocked = $checkedRows.filter("[data-status=blocked]").length; - var checkedDone = $checkedRows.filter("[data-status=done]").length; - var checkedStatistics = checkedAllSummary.replace('%total%', checkedTotal) - .replace('%wait%', checkedWait) - .replace('%testing%', checkedTesting) - .replace('%blocked%', checkedBlocked) - .replace('%done%', checkedDone); - - return checkedTotal ? checkedStatistics : pageSummary; - } - }); -}); diff --git a/module/execution/js/tree.js b/module/execution/js/tree.js deleted file mode 100644 index 5503634ad1..0000000000 --- a/module/execution/js/tree.js +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Expand or collapse text. - * - * @access public - * @return void - */ -function limitText() -{ - var fullText; - var limitText; - var $text = $(this); - var options = $.extend({limitSize: 40, suffix: '…'}, $text.data()); - var text = $text.text(); - if(text.length > options.limitSize) - { - fullText = $text.html(); - limitText = text.substring(0, options.limitSize) + options.suffix; - $text.text(limitText).addClass('limit-text-on'); - - var $toggleBtn = options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle'); - $toggleBtn.text($toggleBtn.data('textExpand')); - $toggleBtn.on('click', function() - { - var isLimitOn = $text.toggleClass('limit-text-on').hasClass('limit-text-on'); - if(isLimitOn) $text.text(limitText); - else $text.html(fullText); - $toggleBtn.text($toggleBtn.data(isLimitOn ? 'textExpand' : 'textCollapse')); - }); - } - else - { - (options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle')).hide(); - } - $text.removeClass('hidden'); -}; -$.fn.textLimit = function(){return this.each(limitText);}; - -$(function() -{ - var $taskTree = $('#taskTree').tree( - { - name: 'taskTree', - initialState: 'preserve' - }); - - var taskTree = $taskTree.data('zui.tree'); - if(!taskTree) return; - - var sortItems = function($items) - { - var items = $items.toArray(); - for(i = 0; i < items.length; i++) - { - for(j = 0; j < items.length - 1 - i; j++) - { - if($(items[j + 1]).data('id').toString() > $(items[j]).data('id').toString()) - { - var tmp = items[j + 1]; - items[j + 1] = items[j]; - items[j] = tmp; - } - } - } - return items; - } - - /* Expand the tree list according to the list config.*/ - var showTreeLevel = function(level) - { - if(level === 'task' || level === 'story') $('.btn-tree-view').removeClass('btn-active-text'); - $('#taskTree li.item-product').removeClass('hidden'); - $('#taskTree li.item-module').removeClass('hidden'); - $('#taskTree li.item-story').removeClass('hidden'); - $('#taskTree li.item-task').removeClass('hidden'); - - if((level === 'root' && collapse == false) || (level === 'task' && collapse == true) || (level === 'story' && collapse == true)) - { - taskTree.collapse(); - collapse = true; - if(level === 'task') type = 'task'; - if(level === 'story') type = 'story'; - $('[data-type=' + type + ']').addClass('btn-active-text'); - } - else if((level === 'all' && type === 'task') || level === 'task') - { - type = 'task'; - collapse = false; - $('[data-type=task]').addClass('btn-active-text'); - taskTree.collapse(); - taskTree.expand($taskTree.find('li.has-list'), true); - } - else if((level === 'all' && type === 'story') || level === 'story') - { - type = 'story'; - collapse = false; - $('[data-type=story]').addClass('btn-active-text'); - taskTree.collapse(); - taskTree.show($taskTree.find('li.item-story').parent().parent(), true); - - $('#taskTree li.item-task').addClass('hidden'); - var $moduleItems = $('#taskTree li.item-module'); - moduleItems = sortItems($moduleItems); - for(i = 0; i < moduleItems.length; i++) - { - var items = $(moduleItems[i]).find('ul li:not(.hidden)').length; - if(items == 0) $(moduleItems[i]).addClass('hidden'); - } - var $productItems = $('#taskTree li.item-product'); - $productItems.each(function() - { - var items = $(this).find('ul li:not(.hidden)').length; - if(items == 0) $(this).addClass('hidden'); - }); - } - $('#main').toggleClass('tree-show-root', collapse); - }; - - $(document).on('click', '.btn-tree-view', function() - { - showTreeLevel($(this).data('type')); - return false; - }); - - /* Expand the all nodes of tree when first visit.*/ - showTreeLevel(type); - - /* Show the content of story or task on right area.*/ - var $itemContent = $('#itemContent'); - var $mainContent = $('#mainContent'); - var isItemLoading = false, lastAjaxRequest; - var adjustSidePosition = function() - { - if($mainContent.hasClass('hide-side')) return; - var scrollTop = $(document).scrollTop(); - var $cell = $itemContent.closest('.cell'); - var bounding = $cell.parent()[0].getBoundingClientRect(); - $cell.css( - { - left: bounding.left + 20, - top: Math.max(20, 150 - scrollTop), - bottom: 60, - }); - }; - var showItem = function(url, loadingText) - { - $.zui.messager.hide(); - $mainContent.toggleClass('hide-side', !url); - if (!url) - { - $taskTree.find('li.selected').removeClass('selected'); - isItemLoading = false; - $.zui.store.set('project/tree/showItem', false); - return; - } - adjustSidePosition(); - if (lastAjaxRequest) lastAjaxRequest.abort(); - $itemContent.empty().addClass('loading').attr('data-loading', loadingText || ''); - isItemLoading = true; - lastAjaxRequest = $.ajax( - { - url: url, - success: function(data) - { - if (!isItemLoading) return; - $itemContent.html(data).removeClass('loading'); - lastAjaxRequest = null; - isItemLoading = false; - $itemContent.find('.text-limit').textLimit(); - $itemContent.find('.histories').histories(); - $itemContent.find('.iframe').modalTrigger(); - $.zui.store.set('project/tree/showItem', url); - adjustSidePosition(); - setTimeout(adjustSidePosition, 300); - }, - error: function() - { - $mainContent.addClass('hide-side'); - isItemLoading = false; - $.zui.messager.danger(window.lang.timeout); - } - }); - }; - - var stopPropagation = function(e) {e.stopPropagation();}; - $taskTree.on('click', '.tree-link', function(e) - { - var $link = $(this); - $.zui.store.set('project/tree/parentLi', $link.closest('li').attr('data-id').length > 0 ? $link.closest('li').attr('data-id') : '') - showItem($link.attr('href'), $link.find('.title').text()); - $taskTree.find('li.selected').removeClass('selected'); - $link.closest('li').addClass('selected'); - e.preventDefault(); - stopPropagation(e); - }); - - $itemContent.on('click', function(event) - { - if(!$(event.target).closest('a[data-app]').length || $(event.target).closest('a').hasClass('iframe')) event.stopPropagation(); - }); - $taskTree.on('click', stopPropagation); - $(window).on('resize scroll', adjustSidePosition); - - $(document).on('click', function() - { - showItem(false); - }).on('ready', function() - { - var lastUrl = $.zui.store.get('project/tree/showItem'); - var lastLi = $.zui.store.get('project/tree/parentLi'); - if(lastUrl) - { - showItem(lastUrl); - $taskTree.find('li[data-id="' + lastLi + '"]').find('.tree-link[href="' + lastUrl + '"]').closest('li').addClass('selected'); - } - }); -}); diff --git a/module/execution/js/view.js b/module/execution/js/view.js deleted file mode 100644 index 92fe169bf3..0000000000 --- a/module/execution/js/view.js +++ /dev/null @@ -1,35 +0,0 @@ -(function() -{ - /* Expand or collapse text */ - function limitText() - { - var fullText; - var limitText; - var $text = $(this); - var options = $.extend({limitSize: 40, suffix: '…'}, $text.data()); - var text = $text.text(); - if(text.length > options.limitSize) - { - fullText = $text.html(); - limitText = text.substring(0, options.limitSize) + options.suffix; - $text.text(limitText).addClass('limit-text-on'); - - var $toggleBtn = options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle'); - $toggleBtn.text($toggleBtn.data('textExpand')); - $toggleBtn.on('click', function() - { - var isLimitOn = $text.toggleClass('limit-text-on').hasClass('limit-text-on'); - if(isLimitOn) $text.text(limitText); - else $text.html(fullText); - $toggleBtn.text($toggleBtn.data(isLimitOn ? 'textExpand' : 'textCollapse')); - }); - } - else - { - (options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle')).hide(); - } - $text.removeClass('hidden'); - }; - $.fn.textLimit = function(){return this.each(limitText);}; - $(function(){$('.text-limit').textLimit();}); -})(); diff --git a/module/extension/css/obtain.css b/module/extension/css/obtain.css deleted file mode 100644 index 5ee32db932..0000000000 --- a/module/extension/css/obtain.css +++ /dev/null @@ -1,5 +0,0 @@ -.pager {margin-top: 0;} -.tree li>a:hover {color: #fff; background-color: #0c64eb;} -.tree li>a.active {color: #fff; background-color: #0c64eb;} -.side-col {width: 210px;} -#sidebar .cell {width: 190px;} diff --git a/module/extension/css/upload.css b/module/extension/css/upload.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/gitea/css/browse.css b/module/gitea/css/browse.css deleted file mode 100644 index cb15b6808d..0000000000 --- a/module/gitea/css/browse.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-id {width: 60px;} -.c-name {width: 200px;} diff --git a/module/gitea/css/create.css b/module/gitea/css/create.css deleted file mode 100644 index 807e1a132b..0000000000 --- a/module/gitea/css/create.css +++ /dev/null @@ -1,2 +0,0 @@ -.main-content>.center-block {max-width: 800px;} -#giteaForm table {width: 600px;} diff --git a/module/gitea/js/binduser.js b/module/gitea/js/binduser.js deleted file mode 100644 index 014d06eeb1..0000000000 --- a/module/gitea/js/binduser.js +++ /dev/null @@ -1,24 +0,0 @@ -$(document).ready(function() -{ - $('.gitlab-user-bind').change(function() - { - var user = zentaoUsers[$(this).val()]; - if(user !== undefined) - { - $(this).parent().parent().find('.email').text(user.email) - } - }); - - $(document).on('click', '.zentao-users .chosen-container', function() - { - var $obj = $(this).prev('select'); - var value = $obj.val(); - if($obj.hasClass('filled')) return false; - - $obj.empty(); - $obj.append($('#userList').html()); - $obj.val(value); - $obj.addClass('filled'); - $obj.trigger("chosen:updated"); - }) -}); diff --git a/module/gitlab/css/browse.css b/module/gitlab/css/browse.css deleted file mode 100644 index cb15b6808d..0000000000 --- a/module/gitlab/css/browse.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-id {width: 60px;} -.c-name {width: 200px;} diff --git a/module/gitlab/css/browsegroup.css b/module/gitlab/css/browsegroup.css deleted file mode 100644 index de56d7deb6..0000000000 --- a/module/gitlab/css/browsegroup.css +++ /dev/null @@ -1,2 +0,0 @@ -.text-c-name > .avatar {vertical-align: middle;display: inline-block;margin-right: 5px;} -.text-c-name > span {vertical-align: middle;} \ No newline at end of file diff --git a/module/gitlab/css/browseproject.css b/module/gitlab/css/browseproject.css deleted file mode 100644 index d86ca85e6a..0000000000 --- a/module/gitlab/css/browseproject.css +++ /dev/null @@ -1,2 +0,0 @@ -.text-c-counts > span {margin-left: 5px;} -#mainMenu .pull-left {margin-right: 15px;} diff --git a/module/gitlab/css/browsetag.css b/module/gitlab/css/browsetag.css deleted file mode 100644 index 671f36d275..0000000000 --- a/module/gitlab/css/browsetag.css +++ /dev/null @@ -1,7 +0,0 @@ -.text-c-counts > span {margin-left: 5px;} -#mainMenu .pull-left {margin-right: 15px;} -.c-actions-1 {width: 60px;} - -#gitlabTagList .text-c-name .has-prefix{position: relative; display: flex; align-items: center;} -#gitlabTagList .text-c-name .label {flex: none;} -#gitlabTagList .text-c-name .tag-name {display: inline-block; max-width: calc(100% - 50px); padding-right: 10px;} diff --git a/module/gitlab/css/create.css b/module/gitlab/css/create.css deleted file mode 100644 index 09df31008b..0000000000 --- a/module/gitlab/css/create.css +++ /dev/null @@ -1,2 +0,0 @@ -.main-content>.center-block {max-width: 800px;} -#gitlabForm table {width: 600px;} diff --git a/module/gitlab/css/creategroup.css b/module/gitlab/css/creategroup.css deleted file mode 100644 index 601910c77f..0000000000 --- a/module/gitlab/css/creategroup.css +++ /dev/null @@ -1 +0,0 @@ -.table-form>tbody>tr>th {width: 110px;} diff --git a/module/gitlab/css/createtag.css b/module/gitlab/css/createtag.css deleted file mode 100644 index 025aeb5e7f..0000000000 --- a/module/gitlab/css/createtag.css +++ /dev/null @@ -1,2 +0,0 @@ -.table-form>tbody>tr>th {width: 110px;} -.table-form {width: 50%;} diff --git a/module/gitlab/css/createuser.css b/module/gitlab/css/createuser.css deleted file mode 100644 index 2d047c2e0a..0000000000 --- a/module/gitlab/css/createuser.css +++ /dev/null @@ -1,4 +0,0 @@ -#avatarUpload {display: inline-block; width: 50px; height: 50px; position: relative;} -#avatarUploadBtn {display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0;} -#avatarUploadBtn {opacity: 0; color: #fff; border-radius: 50%; line-height: 50px;} -#avatarUploadBtn:hover {opacity: 1; background-color: rgba(0,0,0,.5);} \ No newline at end of file diff --git a/module/gitlab/css/editgroup.css b/module/gitlab/css/editgroup.css deleted file mode 100644 index 601910c77f..0000000000 --- a/module/gitlab/css/editgroup.css +++ /dev/null @@ -1 +0,0 @@ -.table-form>tbody>tr>th {width: 110px;} diff --git a/module/gitlab/css/edituser.css b/module/gitlab/css/edituser.css deleted file mode 100644 index 2d047c2e0a..0000000000 --- a/module/gitlab/css/edituser.css +++ /dev/null @@ -1,4 +0,0 @@ -#avatarUpload {display: inline-block; width: 50px; height: 50px; position: relative;} -#avatarUploadBtn {display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0;} -#avatarUploadBtn {opacity: 0; color: #fff; border-radius: 50%; line-height: 50px;} -#avatarUploadBtn:hover {opacity: 1; background-color: rgba(0,0,0,.5);} \ No newline at end of file diff --git a/module/gitlab/css/importissue.css b/module/gitlab/css/importissue.css deleted file mode 100644 index 7a0cc8fb4f..0000000000 --- a/module/gitlab/css/importissue.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-issue {width: 60px;} -.c-type, .c-product, .c-execution {width: 30px;} diff --git a/module/gitlab/css/managegroupmembers.css b/module/gitlab/css/managegroupmembers.css deleted file mode 100644 index 16c089036c..0000000000 --- a/module/gitlab/css/managegroupmembers.css +++ /dev/null @@ -1,3 +0,0 @@ -.table-form {min-width: 700px;} -.c-levels {width: 150px;} -.c-names {width: 300px;} diff --git a/module/gitlab/css/manageprojectmembers.css b/module/gitlab/css/manageprojectmembers.css deleted file mode 100644 index 16c089036c..0000000000 --- a/module/gitlab/css/manageprojectmembers.css +++ /dev/null @@ -1,3 +0,0 @@ -.table-form {min-width: 700px;} -.c-levels {width: 150px;} -.c-names {width: 300px;} diff --git a/module/gitlab/js/binduser.js b/module/gitlab/js/binduser.js deleted file mode 100644 index 014d06eeb1..0000000000 --- a/module/gitlab/js/binduser.js +++ /dev/null @@ -1,24 +0,0 @@ -$(document).ready(function() -{ - $('.gitlab-user-bind').change(function() - { - var user = zentaoUsers[$(this).val()]; - if(user !== undefined) - { - $(this).parent().parent().find('.email').text(user.email) - } - }); - - $(document).on('click', '.zentao-users .chosen-container', function() - { - var $obj = $(this).prev('select'); - var value = $obj.val(); - if($obj.hasClass('filled')) return false; - - $obj.empty(); - $obj.append($('#userList').html()); - $obj.val(value); - $obj.addClass('filled'); - $obj.trigger("chosen:updated"); - }) -}); diff --git a/module/gitlab/js/browsetag.js b/module/gitlab/js/browsetag.js deleted file mode 100644 index 68a15f6a9f..0000000000 --- a/module/gitlab/js/browsetag.js +++ /dev/null @@ -1,17 +0,0 @@ -$(document).ready(function() -{ - $('#tagSearch').click(function() - { - triggerSearch(); - }); - $('#keyword').keypress(function(event) - { - if(event.which == 13) triggerSearch(); - }) - -}); - -function triggerSearch() -{ - $("#tagForm").submit(); -} diff --git a/module/gitlab/js/creategroup.js b/module/gitlab/js/creategroup.js deleted file mode 100644 index f25ff5dff0..0000000000 --- a/module/gitlab/js/creategroup.js +++ /dev/null @@ -1,11 +0,0 @@ -$(function() -{ - $("input[type='radio'][value='public']").parent().parent().css("margin-bottom", "0px"); - - $('input:radio[name="visibility"]').change(function() - { - var visibility = $('input:radio[name="visibility"]:checked').val(); - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - if(visibility != 'public') $('#publicTip').remove(); - }) -}) diff --git a/module/gitlab/js/createproject.js b/module/gitlab/js/createproject.js deleted file mode 100644 index 59d5bc0212..0000000000 --- a/module/gitlab/js/createproject.js +++ /dev/null @@ -1,14 +0,0 @@ -$(function() -{ - $("#name").bind("input propertychange", function(event) - { - $("#path").val($(this).val().toLowerCase()); - }); - - $('input:radio[name="visibility"]').change(function() - { - var visibility = $('input:radio[name="visibility"]:checked').val(); - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - if(visibility != 'public') $('#publicTip').remove(); - }) -}) diff --git a/module/gitlab/js/createuser.js b/module/gitlab/js/createuser.js deleted file mode 100644 index 6ca0c4809d..0000000000 --- a/module/gitlab/js/createuser.js +++ /dev/null @@ -1,20 +0,0 @@ -$(document).ready(function() -{ - setAvatar(); - $('#account').change(function() - { - var account = $(this).val(); - var user = users[account]; - var name = ''; - var email = ''; - if(account && user) - { - name = user.realname; - account = user.account; - email = user.email; - } - $('#name').val(name); - $('#username').val(account); - $('#email').val(email); - }) -}); diff --git a/module/gitlab/js/editgroup.js b/module/gitlab/js/editgroup.js deleted file mode 100644 index a5ce831981..0000000000 --- a/module/gitlab/js/editgroup.js +++ /dev/null @@ -1,13 +0,0 @@ -$(function() -{ - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - - $("input[type='radio'][value='public']").parent().parent().css("margin-bottom", "0px"); - - $('input:radio[name="visibility"]').change(function() - { - var visibility = $('input:radio[name="visibility"]:checked').val(); - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - if(visibility != 'public') $('#publicTip').remove(); - }) -}) diff --git a/module/gitlab/js/editproject.js b/module/gitlab/js/editproject.js deleted file mode 100644 index eb299a8bd7..0000000000 --- a/module/gitlab/js/editproject.js +++ /dev/null @@ -1,11 +0,0 @@ -$(function() -{ - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - - $('input:radio[name="visibility"]').change(function() - { - var visibility = $('input:radio[name="visibility"]:checked').val(); - if(visibility == 'public') $("#visibilitypublic").parent().append(publicTip); - if(visibility != 'public') $('#publicTip').remove(); - }) -}) diff --git a/module/gitlab/js/edituser.js b/module/gitlab/js/edituser.js deleted file mode 100644 index b7407093da..0000000000 --- a/module/gitlab/js/edituser.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready(function() -{ - setAvatar(); -}); \ No newline at end of file diff --git a/module/gitlab/js/importissue.js b/module/gitlab/js/importissue.js deleted file mode 100644 index d48d5a6028..0000000000 --- a/module/gitlab/js/importissue.js +++ /dev/null @@ -1,18 +0,0 @@ -$(document).ready(function() -{ - $('[name^=productList').change(function() - { - var execution = $(this); - host = execution.val(); - if(host == '') return false; - executions = ''; - url = createLink('gitlab', 'ajaxGetExecutionsByProduct', "host=" + host); - - $.get(url, function(response) - { - execution = execution.parent().next().find('select'); - execution.html('').append(response); - execution.chosen().trigger("chosen:updated"); - }); - }); -}); diff --git a/module/gitlab/js/managebranchpriv.js b/module/gitlab/js/managebranchpriv.js deleted file mode 100644 index 5a7931c5e8..0000000000 --- a/module/gitlab/js/managebranchpriv.js +++ /dev/null @@ -1,74 +0,0 @@ -/* Update other picker on change */ -$.zui.Picker.DEFAULTS.onChange = function(event) -{ - var picker = event.picker; - if(!picker.$formItem.is('[name^=branches]')) return; - - var select = picker.$formItem[0]; - var newItem = event.value.length ? $.extend({}, picker.getListItem(event.value), {disabled: true}) : $.extend({}, picker.getListItem(event.oldValue), {disabled: false}); - - $('.user-picker[name^=branches]').each(function() - { - if(this === select) return; - - var $select = $(this); - var selectPicker = $select.data('zui.picker'); - - if(selectPicker) selectPicker.updateOptionList([$.extend({}, newItem)]); - }); -} - -/** - * Save branch priv. - * - * @access public - * @return void - */ -function savePriv() -{ - $('#saveBtn').addClass('hidden'); - $('#submit').removeClass('hidden'); - $('#submit').click(); -} - -/** - * Add item. - * - * @param object $obj - * @access public - * @return void - */ -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, itemIndex); - var $tr = $('' + item + '').insertAfter($(obj).closest('tr')); - var $branches = $tr.find('select').addClass('user-picker').trigger('list:updated').picker({type: 'user'}); - itemIndex++; - - var disabledItems = []; - $('.user-picker[name^=branches]').each(function() - { - if(this === $branches[0]) return; - var $select = $(this); - var picker = $select.data('zui.picker'); - if(!picker) return; - var selectItem = picker.getListItem(picker.getValue()); - if(selectItem) disabledItems.push($.extend({}, selectItem, {disabled: true})); - }); - if(disabledItems.length) $branches.data('zui.picker').updateOptionList(disabledItems); -} - -/** - * Delete item. - * - * @param object $obj - * @access public - * @return void - */ -function deleteItem(obj) -{ - if($('#privForm .table tbody').children().length < 2) return false; - - $(obj).closest('tr').find('.picker .picker-selection-remove').click(); - $(obj).closest('tr').remove(); -} diff --git a/module/gitlab/js/managegroupmembers.js b/module/gitlab/js/managegroupmembers.js deleted file mode 100644 index 48aaa55e1b..0000000000 --- a/module/gitlab/js/managegroupmembers.js +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Save team members. - * - * @access public - * @return void - */ -function saveMembers() -{ - $('#saveBtn').addClass('hidden'); - $('#submit').removeClass('hidden'); - $('#submit').click(); -} - -/** - * Add item. - * - * @param object $obj - * @access public - * @return void - */ -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, i); - $(obj).closest('tr').after('' + item + ''); - var selects = $(obj).closest('tr').next('tr').find('select'); - selects.each(function() - { - $(this).trigger('liszt:updated'); - $(this).chosen(); - }); - $(obj).closest('tr').next('tr').find('.form-date').datetimepicker(); - i ++; -} - -/** - * Delete item. - * - * @param object $obj - * @access public - * @return void - */ -function deleteItem(obj) -{ - if($(obj).hasClass('disabled')) return false; - if($('#teamForm .table-form tbody').children().length < 2) return false; - $(obj).closest('tr').remove(); -} - -$(document).on('change', '[id^="levels"]', function() -{ - $tr = $(this).closest('tr'); - $next = $(this).closest('td').next() - var ownerLevel = 50; - if($(this).val() == ownerLevel) - { - $next.prepend(''); - $next.find('[id^="expires"]').addClass('hidden'); - $tr.find('a[onclick^="deleteItem"]').addClass('disabled'); - } - else - { - $next.find('[id^="expires"]').removeClass('hidden'); - $next.find('input.disabled').remove(); - $tr.find('a[onclick^="deleteItem"]').removeClass('disabled'); - } -}) diff --git a/module/gitlab/js/manageprojectmembers.js b/module/gitlab/js/manageprojectmembers.js deleted file mode 100644 index f67e13d81e..0000000000 --- a/module/gitlab/js/manageprojectmembers.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Save team members. - * - * @access public - * @return void - */ -function saveMembers() -{ - $('#saveBtn').addClass('hidden'); - $('#submit').removeClass('hidden'); - $('#submit').click(); -} - -/** - * Add item. - * - * @param object $obj - * @access public - * @return void - */ -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, i); - $(obj).closest('tr').after('' + item + ''); - var selects = $(obj).closest('tr').next('tr').find('select'); - selects.each(function() - { - $(this).trigger('liszt:updated'); - $(this).chosen(); - }); - $(obj).closest('tr').next('tr').find('.form-date').datetimepicker(); - i ++; -} - -/** - * Delete item. - * - * @param object $obj - * @access public - * @return void - */ -function deleteItem(obj) -{ - if($('#teamForm .table-form tbody').children().length < 2) return false; - $(obj).closest('tr').remove(); -} diff --git a/module/gitlab/js/managetagpriv.js b/module/gitlab/js/managetagpriv.js deleted file mode 100644 index c431f79906..0000000000 --- a/module/gitlab/js/managetagpriv.js +++ /dev/null @@ -1,74 +0,0 @@ -/* Update other picker on change */ -$.zui.Picker.DEFAULTS.onChange = function(event) -{ - var picker = event.picker; - if(!picker.$formItem.is('[name^=tags]')) return; - - var select = picker.$formItem[0]; - var newItem = event.value.length ? $.extend({}, picker.getListItem(event.value), {disabled: true}) : $.extend({}, picker.getListItem(event.oldValue), {disabled: false}); - - $('.user-picker[name^=tags]').each(function() - { - if(this === select) return; - - var $select = $(this); - var selectPicker = $select.data('zui.picker'); - - if(selectPicker) selectPicker.updateOptionList([$.extend({}, newItem)]); - }); -} - -/** - * Save tag priv. - * - * @access public - * @return void - */ -function savePriv() -{ - $('#saveBtn').addClass('hidden'); - $('#submit').removeClass('hidden'); - $('#submit').click(); -} - -/** - * Add item. - * - * @param object $obj - * @access public - * @return void - */ -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, itemIndex); - var $tr = $('' + item + '').insertAfter($(obj).closest('tr')); - var $tags = $tr.find('select').addClass('user-picker').trigger('list:updated').picker({type: 'user'}); - itemIndex++; - - var disabledItems = []; - $('.user-picker[name^=tags]').each(function() - { - if(this === $tags[0]) return; - var $select = $(this); - var picker = $select.data('zui.picker'); - if(!picker) return; - var selectItem = picker.getListItem(picker.getValue()); - if(selectItem) disabledItems.push($.extend({}, selectItem, {disabled: true})); - }); - if(disabledItems.length) $tags.data('zui.picker').updateOptionList(disabledItems); -} - -/** - * Delete item. - * - * @param object $obj - * @access public - * @return void - */ -function deleteItem(obj) -{ - if($('#privForm .table tbody').children().length < 2) return false; - - $(obj).closest('tr').find('.picker .picker-selection-remove').click(); - $(obj).closest('tr').remove(); -} diff --git a/module/gogs/css/browse.css b/module/gogs/css/browse.css deleted file mode 100644 index cb15b6808d..0000000000 --- a/module/gogs/css/browse.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-id {width: 60px;} -.c-name {width: 200px;} diff --git a/module/gogs/css/create.css b/module/gogs/css/create.css deleted file mode 100644 index eca6cd5850..0000000000 --- a/module/gogs/css/create.css +++ /dev/null @@ -1,2 +0,0 @@ -.main-content>.center-block {max-width: 800px;} -#gogsForm table {width: 600px;} diff --git a/module/gogs/js/binduser.js b/module/gogs/js/binduser.js deleted file mode 100644 index 014d06eeb1..0000000000 --- a/module/gogs/js/binduser.js +++ /dev/null @@ -1,24 +0,0 @@ -$(document).ready(function() -{ - $('.gitlab-user-bind').change(function() - { - var user = zentaoUsers[$(this).val()]; - if(user !== undefined) - { - $(this).parent().parent().find('.email').text(user.email) - } - }); - - $(document).on('click', '.zentao-users .chosen-container', function() - { - var $obj = $(this).prev('select'); - var value = $obj.val(); - if($obj.hasClass('filled')) return false; - - $obj.empty(); - $obj.append($('#userList').html()); - $obj.val(value); - $obj.addClass('filled'); - $obj.trigger("chosen:updated"); - }) -}); diff --git a/module/group/css/browse.css b/module/group/css/browse.css deleted file mode 100644 index b5b8a32691..0000000000 --- a/module/group/css/browse.css +++ /dev/null @@ -1,6 +0,0 @@ -.user {display: block; width: 80px; float: left; overflow: hidden;} -.c-name {width: 130px;} -.c-desc {width: 300px;} -.btn-admin {margin-left: 0px !important} - -#groupList tbody tr.even td {word-wrap: break-word;} diff --git a/module/group/css/copy.css b/module/group/css/copy.css deleted file mode 100644 index 79fdcfe687..0000000000 --- a/module/group/css/copy.css +++ /dev/null @@ -1 +0,0 @@ -.checkbox-inline {display: inline-block !important; padding-left: 0px;} diff --git a/module/group/css/managemember.css b/module/group/css/managemember.css deleted file mode 100644 index 8d6249cdba..0000000000 --- a/module/group/css/managemember.css +++ /dev/null @@ -1,6 +0,0 @@ -.group-item {display: block; width: 100px; float: left; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;} -.group-item .checkbox-primary {margin-left: 2px;} -.group-item .checkbox-primary > input {cursor: pointer;} -.group-item .checkbox-primary > label {width: 100px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;} -.table th {vertical-align: top;} -.main-table tbody > tr > td {border-bottom: 0px;} diff --git a/module/group/css/managepriv.css b/module/group/css/managepriv.css deleted file mode 100644 index 27e561a224..0000000000 --- a/module/group/css/managepriv.css +++ /dev/null @@ -1,87 +0,0 @@ -.flex-center {display: flex; justify-content: center; align-items: center;} -#mainContainer {display: flex; gap: 16px; height: calc(100vh - 165px);} -#mainContainer > .main {flex: 1 1 75%; overflow-y: auto; padding: 0px; border: 1px solid #FFF; box-sizing: content-box;} -#mainContainer > .side {flex: 1 1 25%;} -#mainContainer .main .btn-group {position: absolute; visibility: hidden; top: 2px; display: inline-block; z-index: 2;} -.priv-panel {background: #fff; padding: 10px 16px; box-shadow: 0 1px 1px rgb(0 0 0 / 5%), 0 2px 6px 0 rgb(0 0 0 / 5%);} -.priv-panel {height: 40%;} -.priv-panel .table-empty-tip {padding: calc(15% - 10px) 10px;} -.priv-panel + .priv-panel .table-empty-tip {padding: calc(30% - 20px) 10px;} -.priv-panel + .priv-panel {margin-top: 16px; height: calc(60% - 16px);} -.priv-panel > .panel-content {height: calc(100% - 25px); overflow-y: auto; padding-left: 4px; margin-top: 10px;} -.priv-panel > .panel-bottom {padding-top: 20px;} -.priv-panel > .panel-title {position: relative;} -.priv-panel > .panel-title > .icon-help {position: absolute; top: 3px; margin-left: 8px;} -.icon-help + .popover {font-weight: 400;} -.menuTree li.has-list:not(:first-child) {margin-top: 20px;} - -/* tree */ -.tree ul > li {display: inline-block; width: 50%;} -.menuTree li > ul {margin-bottom: 0px;} -.menuTree > li.has-list.open:before {top: 25px;} -.priv-item > .icon {padding-left: 5px;} -.empty-tip {height: 100%;} -.menuTree > li {padding-left: 2px;} -.menuTree > li.has-list.open:before {left: 9px;} -.menuTree ul > li {padding-left: 20px; padding-top: 10px;} - -.table-bymodule select.form-control {height: 250px;} -.group-item {display: block; width: 170px; float: left; font-size: 13px;} -.group-item .checkbox-inline label {padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;} -#privList .package label, #privList .module label {overflow: visible;} -.table.table-form tbody > tr:last-child td {border-top: 1px solid #ddd;} -@-moz-document url-prefix() {.table.table-form tbody > tr:last-child td, .table.table-form tbody > tr:last-child th {border-bottom: 1px solid #ddd;};} - -#mainMenu #groupName {line-height: 33px; float: left;} -.checkbox-right {padding-left: 0px !important;} - -#privList td.menus {border-right: 0; padding-right: 0; width: 170px !important;} -#privList td.menus + td {border-left: 0; padding-left: 0px; padding} -#privList .menus .checkbox-primary {float: left; width: 160px;} -#privList .menus .checkbox-primary:first-child {float: left; width: auto;} -#privList .menus a {margin-left: 10px;} - -#privList {margin-bottom: 0px;} -#privList tr:hover>td {background-color: #FFF;} -#privList th.module {width: 142px; min-width: 142px; background-color: #EDEEF28C; font-weight: 600;} -#privList th.package {width: 142px; min-width: 142px; background-color: #F4F5F78C; font-weight: 600;} -#privList th .checkbox-inline input {margin-left: 0px;} -#privList .check-all {display: inline-block;} -#privList .check-all > label {padding-left: 0; font-weight: 600;} -#privList .text-middle.text-left {padding-left: 24px;} -#privList tbody > tr > td {padding: 4px 20px 20px 20px;} -#privList .group-item {margin-top: 16px;} -#privList .group-item .checkbox-inline label {padding-left: 3px;} -.table-bordered td, .table-bordered th {border-top-style: dashed; border-bottom-style: dashed; border-color: #FFF;} -.table-bordered td, .table-bordered thead th:last-child {border-color: #F5F6F8;} -.check-all>label.checkbox-indeterminate-block:before {content: ' '; opacity: 1; transform: scale(1);} -.priv-footer {padding: 14px; z-index: 11; box-shadow: inset 0 0px 0px rgb(0 0 0 / 10%), 0 0 5px rgb(0 0 0 / 10%); position: relative; min-height: 40px; background: #fff; border-radius: 0 0 4px 4px;} -.priv-footer .btn {margin 0px; padding-top: 7px;} -.priv-footer .check-all {display: inline-block;} -.priv-footer .check-all label {padding-left: 0px; margin-bottom: 0px; font-weight: 400;} -.priv-footer #submit {margin: 0px 20px;} -main#main {padding-bottom: 0px;} -.side .priv-panel {padding: 16px;} - -#privPackageList th.module {width: 142px; min-width: 142px; max-width: 142px; background-color: #EDEEF28C; font-weight: 600; padding-left: 20px; border-color: #FFF;} -#privPackageList .module label {padding-left: 0; overflow: visible;} -#privPackageList td.package-column {padding: 20px 16px; background-color: #FFF;} -#privPackageList div.package {display: inline-block; width: calc(25% - 5px); padding: 10px 0;} -#privPackageList .package + .package {padding: 0;} -#privPackageList .package .check-all {display: inline-block; height: 20px;} -#privPackageList .package input {margin-top: 0px; margin-left: 0px; left: 0px; height: 20px;} -#privPackageList .package label {padding-left: 0; display: inline-block;} -#privPackageList .privs, #privPackageList .menus-privs {padding: 20px 20px 0 20px; margin: 10px 0px;border: 1px solid #D9DBE1; background-color: #F9FAFB; position: relative; display: block; max-width: unset; box-shadow: unset; z-index: 1;} -#privPackageList .menus-privs {margin-top: 35px; border-style: dashed;} -#privPackageList .popover .popover-content {display: inline-block; padding: 0;} -#privPackageList .popover .arrow {border-bottom-color: #D9DBE1; top: -10px;} -#privPackageList .popover .arrow:after {border-bottom-color: #F9FAFB;} -#privPackageList .group-item .checkbox-inline label {padding-left: 0} -#privPackageList .group-item {display: inline-block; width: 158px; margin-bottom: 15px;} -#privPackageList .group-item > .checkbox-primary {display: inline-block;} -#privPackageList .priv-toggle.icon {width: 12px; height: 12px; position: relative; display: inline-block; color: #9EA3B0; margin-left: 4px; line-height: 12px;} -#privPackageList .priv-toggle.icon:before {content: "\e925"; font-size: 12px; min-width: unset; transform: scale(0.5); font-weight: 900;} -#privPackageList .priv-toggle.icon:after {position: absolute; top: 0px; right: 0px; bottom: 0px; left: 0px; display: inline-block; content: ""; border: 1px solid; border-radius: 10%;} -#privPackageList .priv-toggle.icon.open:before {content: "\e926";} - -.table-bymodule select option:hover {color: #fff;} diff --git a/module/group/css/manageprojectadmin.css b/module/group/css/manageprojectadmin.css deleted file mode 100644 index 02ae152621..0000000000 --- a/module/group/css/manageprojectadmin.css +++ /dev/null @@ -1 +0,0 @@ -#sidebar .cell {margin-top: 40px;} diff --git a/module/group/css/manageview.css b/module/group/css/manageview.css deleted file mode 100644 index 72dcb7ae30..0000000000 --- a/module/group/css/manageview.css +++ /dev/null @@ -1,8 +0,0 @@ -.group-item {display: block; width: 93px; float: left; margin-top: 5px;} -.action-item {display: block; width: 200px; float: left; margin-top: 5px;} - -.checkbox-primary>label {padding-left: 20px;} -.pl-0px {padding-left: 0px !important;} -.pt-0px {padding-top: 0px !important;} - -#manageViewForm {margin-bottom: 200px;} diff --git a/module/group/js/managemember.js b/module/group/js/managemember.js deleted file mode 100644 index 256d67edf1..0000000000 --- a/module/group/js/managemember.js +++ /dev/null @@ -1,34 +0,0 @@ -$(function() -{ - $('.check-all input[type=checkbox]').change(function() - { - var checked = $(this).prop('checked'); - $(this).parents('tr').find('input[type=checkbox]').prop('checked', checked); - }); - - $('.table-members table tr').selectable( - { - selector: 'input', - listenClick: false, - select: function(e) - { - $('[data-id=' + e.id + ']').prop('checked', true); - - var checked = true; - var memberNum = $('[data-id=' + e.id + ']').closest('td').find('input').length; - var checkedMemberNum = $('[data-id=' + e.id + ']').closest('td').find('input:checked').length; - if(memberNum > checkedMemberNum) checked = false; - $('[data-id=' + e.id + ']').closest('tr').find('.check-all input').prop('checked', checked); - }, - unselect: function(e) - { - $('[data-id=' + e.id + ']').prop('checked', false); - - var checked = true; - var memberNum = $('[data-id=' + e.id + ']').closest('td').find('input').length; - var checkedMemberNum = $('[data-id=' + e.id + ']').closest('td').find('input:checked').length; - if(memberNum > checkedMemberNum) checked = false; - $('[data-id=' + e.id + ']').closest('tr').find('.check-all input').prop('checked', checked); - } - }); -}); diff --git a/module/group/js/managepriv.js b/module/group/js/managepriv.js deleted file mode 100644 index a68b434178..0000000000 --- a/module/group/js/managepriv.js +++ /dev/null @@ -1,566 +0,0 @@ -function showPriv(value) -{ - location.href = createLink('group', 'managePriv', "type=" + type + "¶m="+ groupID + "&menu=&version=" + value); -} - -/** - * Control the packages select control for a module. - * - * @param string $module - * @access public - * @return void - */ -function setModulePackages(module) -{ - $('#packageBox select').addClass('hidden'); // Hide all select first. - $('#packageBox select').val(''); // Unselect all select. - $("select[data-module='" + module + "']").removeClass('hidden'); // Show the action control for current module. - - updatePrivList('module', module); -} - -/** - * Control the actions select control for a package. - * - * @access public - * @return void - */ -function setActions() -{ - $('#actionBox select').val(''); - - var hasSelectedPackage = ',' + $('#packageBox select').not('.hidden').val().join(',') + ','; - - updatePrivList('package', hasSelectedPackage); - -} - -function setNoChecked() -{ - var noCheckValue = ''; - $('tbody .group-item > div > div > input').each(function() - { - if(!$(this).prop('checked') && $(this).attr('data-id') != undefined) noCheckValue = noCheckValue + ',' + $(this).attr('data-id'); - }); - $('#noChecked').val(noCheckValue); -} - -/** - * Update the action box when module or package selected. - * - * @param string parentType module|package - * @param string parentList - * @access public - * @return void - */ -function updatePrivList(parentType, parentList) -{ - var selectedModule = $('#module').val(); - $.get(createLink('group', 'ajaxGetPrivByParents', 'module=' + selectedModule + '&parentType=' + parentType + '&parentList=' + parentList), function(data) - { - $('#actions').replaceWith(data); - }) -} - -/** - * Change parent item checked. - * - * @access public - * @return void - */ -function changeParentChecked($item, moduleName, packageID) -{ - var moduleAllPrivs = $item.closest('tbody').find('.group-item[data-module=' + moduleName +']:not(.menus-browse)').length; - var moduleSelectPrivs = $item.closest('tbody').find('.group-item[data-module=' + moduleName +']:not(.menus-browse)').find('[checked=checked]').length; - var $moduleItem = $item.closest('tbody').find('.module[data-module=' + moduleName +']'); - if($item.closest('tbody').find('.menus.' + moduleName).length > 0) - { - moduleAllPrivs += $item.closest('tbody').find('.menus.' + moduleName + ' input[name^=actions]:not(input[value=browse])').length; - moduleSelectPrivs += $item.closest('tbody').find('.menus.' + moduleName + ' input[name^=actions][checked=checked]:not(input[value=browse])').length; - } - if(moduleSelectPrivs == 0) - { - $moduleItem.find('input[type=checkbox]').removeAttr('checked'); - $moduleItem.find('label').removeClass('checkbox-indeterminate-block'); - } - else if(moduleAllPrivs == moduleSelectPrivs) - { - $moduleItem.find('input[type=checkbox]').attr('checked', 'checked'); - $moduleItem.find('label').removeClass('checkbox-indeterminate-block'); - } - else - { - $moduleItem.find('input[type=checkbox]').removeAttr('checked'); - $moduleItem.find('label').addClass('checkbox-indeterminate-block'); - } - - if(packageID == '') return; - - var packageAllPrivs = $item.closest('tbody').find('.group-item[data-module=' + moduleName +'][data-package=' + packageID +']:not(.menus-browse)').length; - var packageSelectPrivs = $item.closest('tbody').find('.group-item[data-module=' + moduleName +'][data-package=' + packageID +']:not(.menus-browse)').find('[checked=checked]').length; - var $packageItem = $item.closest('tbody').find('.package[data-module=' + moduleName +'][data-package=' + packageID +']'); - if($item.closest('tbody').find('.menus.' + moduleName).length > 0) - { - packageAllPrivs += $item.closest('tbody').find('.menus.' + moduleName + ' input[name^=actions]:not(input[value=browse])').length; - packageSelectPrivs += $item.closest('tbody').find('.menus.' + moduleName + ' input[name^=actions][checked=checked]:not(input[value=browse])').length; - } - if(packageSelectPrivs == 0) - { - $packageItem.find('input[type=checkbox]').removeAttr('checked'); - $packageItem.find('label').removeClass('checkbox-indeterminate-block'); - } - else if(packageAllPrivs == packageSelectPrivs) - { - $packageItem.find('input[type=checkbox]').attr('checked', 'checked'); - $packageItem.find('label').removeClass('checkbox-indeterminate-block'); - } - else - { - $packageItem.find('input[type=checkbox]').removeAttr('checked'); - $packageItem.find('label').addClass('checkbox-indeterminate-block'); - } -} - -/** - * Init comp recomend-tree. - * - * @param array data - * @access public - * @return void - */ -function initRecomendTree(data) -{ - $(".menuTree.recommend").tree( - { - data: data, - initialState: 'expand', - itemCreator: function($li, item) - { - var index = item.relationPriv ? recommedSelect.indexOf(item.relationPriv.toString()) : -1; - if(item.relationPriv === undefined) item.relationPriv = ''; - $li.append('
= 0 ? 'checked="checked"' : '') + 'data-has-children="' + (item.children ? !!item.children.length : false) + '"' + (item.children ? '' : 'data-type="recommend" data-privid="' + item.privID + '" data-relationpriv="' + item.relationPriv + '"') + 'type="checkbox" name="recommendPrivs[]" value="' + item.relationPriv + '" title="' + item.title + '" id="recommendPrivs[' + item.module + ']' + item.method + '" data-module="' + item.module + '" data-method="' + item.method + '">
'); - } - }); - $('.menuTree.recommend i.list-toggle').remove(); -} - -/** - * Init comp depend-tree. - * - * @param array data - * @access public - * @return void - */ -function initDependTree(data) -{ - $(".menuTree.depend").tree( - { - data: data, - initialState: 'expand', - itemCreator: function($li, item) - { - $li.append('
'); - } - }); - $('.menuTree.depend i.list-toggle').remove(); -} - -/** - * update comp tree after click checkbox-label. - * - * @param obj objTree - * @access public - * @return void - */ -function updatePrivTree(privList) -{ - if(privList == null) - { - privList = new Array(); - $('tbody .group-item input:checked').each(function() - { - var privID = $(this).closest('.group-item').attr('data-id'); - if($(this).closest('popover-content').length == 0 && privList.indexOf(privID) < 0) privList.push(privID); - }); - selectedPrivIdList = privList; - } - - $.ajax( - { - url: createLink('group', 'ajaxGetRelatedPrivs'), - dataType: 'json', - method: 'post', - data: {"privList" : privList.toString(), "recommedSelect": recommedSelect.toString(), "excludeIdList": Object.values(excludeIdList).toString()}, - success: function(data) - { - if(data.depend == undefined || data.depend.length == 0) - { - $('.side .menuTree.depend').empty(); - $('.side .menuTree.depend').closest('.priv-panel').find('.table-empty-tip').removeClass('hidden'); - } - else - { - $(".menuTree.depend").data('zui.tree').reload(data.depend); - $('.side .menuTree.depend').closest('.priv-panel').find('.table-empty-tip').addClass('hidden'); - } - - if(data.recommend == undefined || data.recommend.length == 0) - { - $('.side .menuTree.recommend').empty(); - $('.side .menuTree.recommend').closest('.priv-panel').find('.table-empty-tip').removeClass('hidden'); - } - else - { - $(".menuTree.recommend").data('zui.tree').reload(data.recommend); - $('.side .menuTree.recommend').closest('.priv-panel').find('.table-empty-tip').addClass('hidden'); - $('.menuTree.recommend > li').each(function(){ - var allItemLength = $(this).find('ul input[type=checkbox]').length; - var checkedItemLength = $(this).find('ul input[type=checkbox][checked=checked]').length; - if(checkedItemLength > 0 && allItemLength == checkedItemLength) - { - $(this).find('.check-all input').attr('checked', 'checked'); - } - else if(checkedItemLength > 0) - { - $(this).find('.check-all label').addClass('checkbox-indeterminate-block'); - } - }); - } - - $('.menuTree i.list-toggle').remove(); - $('.menuTree li.has-list').addClass('open'); - } - }); -} - -/** - * When check all change. - * - * @access public - * @return void - */ -function checkAllChange() -{ - var id = $(this).find('input[type=checkbox]').attr('id'); - var checked = $(this).find('input[type=checkbox]').prop('checked'); - - if(id == 'allChecker') - { - $('input[type=checkbox]').prop('checked', checked); - - if(checked) $('input[type=checkbox]').attr('checked', checked); - if(!checked) $('input[type=checkbox]').removeAttr('checked'); - $('tbody .checkbox-indeterminate-block').removeClass('checkbox-indeterminate-block'); - } - else if($(this).closest('#privList').length > 0) - { - var moduleName = $(this).closest('th').attr('data-module'); - var packageID = $(this).closest('th').hasClass('package') ? $(this).closest('th').attr('data-package') : ''; - var $children = $(this).closest('th').hasClass('package') ? $(this).closest('tbody').find('[data-module=' + moduleName +'][data-package=' + packageID +']') : $(this).closest('tbody').find('[data-module=' + moduleName +']'); - - $children.find('input[type=checkbox]').prop('checked', checked); - $children.find('.checkbox-indeterminate-block').removeClass('checkbox-indeterminate-block'); - - if(checked) $children.find('input[type=checkbox]').attr('checked', checked); - if(!checked) $children.find('input[type=checkbox]').removeAttr('checked'); - - changeParentChecked($(this), moduleName, packageID); - } - else if($(this).closest('#privPackageList').length > 0) - { - var moduleName = $(this).parent().attr('data-module'); - var packageID = $(this).parent().hasClass('package') ? $(this).parent().attr('data-package') : ''; - var $children = $(this).parent().hasClass('package') ? $(this).closest('td').find('[data-module=' + moduleName +'][data-package=' + packageID +']') : $(this).closest('tbody').find('[data-module=' + moduleName +']'); - - $children.find('input[type=checkbox]').prop('checked', checked); - $children.find('.checkbox-indeterminate-block').removeClass('checkbox-indeterminate-block'); - - if(checked) $children.find('input[type=checkbox]').attr('checked', checked); - if(!checked) $children.find('input[type=checkbox]').removeAttr('checked'); - - changeParentChecked($(this), moduleName, packageID); - } - updatePrivTree(null); -} - -/** - * Whrn group item change. - * - * @param object $item - * @access public - * @return void - */ -function groupItemChange() -{ - var checked = $(this).prop('checked'); - if(checked) - { - $(this).attr('checked', 'checked'); - } - else - { - $(this).removeAttr('checked'); - } - if($('#privPackageList').length > 0) - { - var dataid = $(this).attr('data-id'); - var $priv = $('#privPackageList').find('.group-item input[data-id="' + dataid + '"]'); - if(checked) - { - $priv.attr('checked', 'checked'); - } - else - { - $priv.removeAttr('checked'); - } - } - var moduleName = $(this).closest('.group-item').attr('data-module'); - var packageID = $(this).closest('.group-item').attr('data-package'); - changeParentChecked($(this), moduleName, packageID); - - var privID = $(this).closest('.group-item').attr('data-id'); - if(privID != 0) - { - var index = selectedPrivIdList.indexOf(privID); - - if(privID > 0 && index < 0 && checked) selectedPrivIdList.push(privID); - if(privID > 0 && index > -1 && !checked) selectedPrivIdList.splice(index, 1); - - updatePrivTree(selectedPrivIdList); - } -} - -/** - * When recommend privs change. - * - * @param object $item - * @param bool $checked - * @access public - * @return void - */ -function recommendChange($item, checked) -{ - var privModule = $item.attr('data-module'); - var privMethod = $item.attr('data-method'); - var $actionItem = $('#privList').length > 0 ? $('#privList input[data-id="' + privModule + '-' + privMethod + '"]') : $('#privPackageList input[data-id="' + privModule + '-' + privMethod + '"]'); - $actionItem.prop('checked', checked); - if(checked) - { - $item.attr('checked', 'checked'); - $actionItem.attr('checked', 'checked'); - } - else - { - $item.removeAttr('checked'); - $actionItem.removeAttr('checked'); - } - var moduleName = $actionItem.closest('tr').find('.package').attr('data-module'); - var packageID = $('#privList').length > 0 ? $actionItem.closest('tr').find('.package').attr('data-package') : $actionItem.closest('.privs').attr('data-package'); - changeParentChecked($actionItem, moduleName, packageID); - - var $parentItem = $item.closest('ul').closest('li').find('input[data-has-children="true"]'); - var allItemLength = $item.closest('ul').find('input[type=checkbox]').length; - var checkedItemLength = $item.closest('ul').find('input[type=checkbox][checked=checked]').length; - if(checkedItemLength == 0) - { - $parentItem.removeAttr('checked'); - $parentItem.closest('.checkbox-primary').find('label').removeClass('checkbox-indeterminate-block'); - } - else if(allItemLength == checkedItemLength) - { - $parentItem.attr('checked', 'checked'); - $parentItem.closest('.checkbox-primary').find('label').removeClass('checkbox-indeterminate-block'); - } - else - { - $parentItem.removeAttr('checked'); - $parentItem.closest('.checkbox-primary').find('label').addClass('checkbox-indeterminate-block'); - } - - var privID = $item.attr('data-relationpriv'); - if(privID != 0) - { - var index = selectedPrivIdList.indexOf(privID); - - if(privID > 0 && index < 0 && checked) selectedPrivIdList.push(privID); - if(privID > 0 && index > -1 && !checked) selectedPrivIdList.splice(index, 1); - - index = recommedSelect.indexOf(privID); - - if(privID > 0 && index < 0 && checked) recommedSelect.push(privID); - if(privID > 0 && index > -1 && !checked) recommedSelect.splice(index, 1); - } -} - -/** - * Change btn position. - * - * @access public - * @return void - */ -function positionBtn() -{ - var btnLeft = $('.main.main-content > table').width() - 63; - $('.main.main-content > .btn-group').css('left', btnLeft).css('visibility', 'unset'); -} - -$(function() -{ - if($(".side .icon-help").length > 0) $(".side .icon-help").popover(); - - positionBtn(); - $('.main.main-content').resize(positionBtn); - - selectedPrivIdList = Object.values(selectedPrivIdList); - - recommedSelect = new Array(); - - relatedPrivData = $.parseJSON(relatedPrivData); - initDependTree(relatedPrivData.depend); - if(relatedPrivData.depend == undefined || relatedPrivData.depend == 0) $(".menuTree.depend").closest('.priv-panel').find('.table-empty-tip').removeClass('hidden'); - initRecomendTree(relatedPrivData.recommend); - if(relatedPrivData.recommend == undefined || relatedPrivData.recommend == 0) $(".menuTree.recommend").closest('.priv-panel').find('.table-empty-tip').removeClass('hidden'); - - $('#privList > tbody > tr > th .check-all').change(checkAllChange); - $('#privPackageList > tbody > tr .check-all').change(checkAllChange); - $('.priv-footer .check-all').change(checkAllChange); - - $('#privList tbody > tr .group-item input[type=checkbox]').change(groupItemChange); - $('#privPackageList .package-column').on('click', '.privs.popover input[type=checkbox]', groupItemChange); - - $('.side').on('click', '.recommend input[type=checkbox]', (function() - { - var checked = $(this).prop('checked'); - if($(this).attr('data-has-children') == 'true') - { - $(this).closest('li').find('ul > li input[type=checkbox]').each(function(){ - recommendChange($(this), checked); - }); - } - else - { - recommendChange($(this), checked); - } - updatePrivTree(selectedPrivIdList); - })); - - $('#privPackageList .package > .priv-toggle.icon').click(function() - { - var opened = $(this).hasClass('open'); - - $('#privPackageList .package > .priv-toggle.icon').removeClass('open'); - $('.privs.popover').remove(); - - if(!opened) - { - $(this).addClass('open'); - var moduleName = $(this).closest('.package').attr('data-module'); - var packageID = $(this).closest('.package').attr('data-package'); - - /* The privs should be inserted after which permission package. */ - var perRowPackages = Math.floor($(this).closest('td').width() / $(this).closest('td').find('.package').width()); - var packageIndex = $(this).closest('.package').index() / 2 ; - var appendIndex = (Math.floor(packageIndex / perRowPackages) + 1) * perRowPackages - 1; - - var $privs = $(".privs.hidden[data-module='" + moduleName + "'][data-package='" + packageID + "']") - var $showPrivs = $('
' - + $privs.html().replace(/actions/g, 'showPrivs') - + '
'); - - /* Calculate the triangle position of privs popover. */ - var position = $(this).closest('td').find('.package').width() * (packageIndex % perRowPackages) + 30; - - $showPrivs.find('.arrow').css('left', position + 'px'); - - if($(this).closest('td').find('.package').eq(appendIndex).length == 0) - { - $(this).closest('td').find('.package').eq(-1).after($showPrivs); - $showPrivs.css('margin-bottom', '0'); - } - else - { - $(this).closest('td').find('.package').eq(appendIndex).after($showPrivs); - } - } - }); - - $('#privPackageList .package-column').on('click', '.privs .priv-toggle.icon', (function() - { - var opened = $(this).hasClass('open'); - - $('#privPackageList .group-item > .priv-toggle.icon').removeClass('open'); - $('.menus-privs.popover').remove(); - - if(!opened) - { - $(this).addClass('open'); - var moduleName = $(this).closest('.privs').attr('data-module'); - var packageID = $(this).closest('.privs').attr('data-package'); - - /* The menus privs should be inserted after which priv. */ - var perRowPrivs = Math.floor($(this).closest('.popover-content').width() / $(this).closest('.popover-content').find('.group-item').width()); - var privIndex = $(this).closest('.group-item').index(); - var appendIndex = (Math.floor(privIndex / perRowPrivs) + 1) * perRowPrivs - 1; - - var $menusPrivs = $(this).closest('.group-item').find('.menus-privs') - var $showPrivs = $(''); - - /* Calculate the triangle position of privs popover. */ - var position = $(this).closest('.popover-content').width() * (privIndex % perRowPrivs) + 30; - - $showPrivs.find('.arrow').css('left', position + 'px'); - - if($(this).closest('.popover-content').find('.group-item:not(.menus-item)').eq(appendIndex).length == 0) - { - $showPrivs.css('margin-bottom', '0'); - $(this).closest('.popover-content').find('.group-item:not(.menus-item)').eq(-1).after($showPrivs); - } - else - { - $(this).closest('.popover-content').find('.group-item:not(.menus-item)').eq(appendIndex).after($showPrivs); - } - } - })); - - $('#privPackageList .package-column').on('click', '.menus-privs input[type=checkbox]', (function() - { - var $menusPrivs = $(this).closest('.popover-content').find('.menus-item'); - var $parentPrivs = $(this).closest('.privs').find('.checkbox-primary.check-all'); - var allPrivs = $menusPrivs.length; - var selectPrivs = $menusPrivs.find('input[checked=checked]').length; - - if(allPrivs > 0 && allPrivs == selectPrivs) - { - $parentPrivs.find('input').attr('checked', 'checked'); - $parentPrivs.find('label').removeClass('checkbox-indeterminate-block'); - } - else if(selectPrivs == 0) - { - $parentPrivs.find('input').removeAttr('checked'); - $parentPrivs.find('label').removeClass('checkbox-indeterminate-block'); - } - else - { - $parentPrivs.find('input').removeAttr('checked'); - $parentPrivs.find('label').addClass('checkbox-indeterminate-block'); - } - groupItemChange(); - })); - - $('#privPackageList .package-column').on('click', '.privs .check-all', (function() - { - var checked = $(this).find('input[type=checkbox]').prop('checked'); - var $children = $(this).closest('.package-column').find('.menus-privs .menus-item'); - if(checked) - { - $children.find('input').attr('checked', 'checked'); - } - else - { - $children.find('input').removeAttr('checked'); - } - $children.find('label').removeClass('checkbox-indeterminate-block'); - $(this).find('label').removeClass('checkbox-indeterminate-block'); - changeParentChecked($(this), $(this).closest('.group-item').attr('data-module'), $(this).closest('.group-item').attr('data-package')); - })); -}); diff --git a/module/group/js/manageprojectadmin.js b/module/group/js/manageprojectadmin.js deleted file mode 100644 index 27e87c725c..0000000000 --- a/module/group/js/manageprojectadmin.js +++ /dev/null @@ -1,90 +0,0 @@ -function addItem(obj) -{ - var maxNum = 0; - $(obj).closest('table').find("tr[class^='line']").each(function() - { - var trname = $(this).attr('class'); - var index = trname.match(/\d+/g); - - index = parseInt(index); - maxNum = index > maxNum ? index : maxNum; - }) - - maxNum = parseInt(maxNum); - maxNum += 1; - - var className = $(obj).closest('tr').attr('class'); - var lastTr = $('table tr.' + className).last(); - $($('table tr.' + className).get().reverse()).each(function() - { - var $newRow = $(this).clone(); - $newRow.attr('class', className.replace(/\d+/g, maxNum)); - $newRow.addClass('highlight'); - $newRow.find('select').each(function() - { - var name = $(this).attr('name'); - var id = $(this).attr('id'); - $(this).attr('name', name.replace(/\d+/g, maxNum)); - $(this).attr('id', id.replace(/\d+/g, maxNum)); - }) - - $newRow.find("input[type='checkbox']").each(function() - { - var name = $(this).attr('name'); - var id = $(this).attr('id'); - $(this).attr('name', name.replace(/\d+/g, maxNum)); - $(this).attr('id', id.replace(/\d+/g, maxNum)); - $(this).attr('checked', false); - }) - - $(lastTr).after($newRow); - $newRow.find('div.picker').remove(); - $newRow.find('.picker-select').val('').picker({chosenMode: true}); - - var $picker = $newRow.find('.picker-select').data('zui.picker'); - $picker.setDisabled(false); - setTimeout(function() - { - $newRow.removeClass('highlight'); - }, 1600); - }) - - if($("table tr").size() > 6) - { - $('.btn-delete').removeClass('hidden'); - } -} - -function deleteItem(obj) -{ - var currentClass = $(obj).closest('tr').attr('class'); - $(obj).closest('table').find('tr.' + currentClass).remove(); - - if($("table tr").size() <= 6) - { - $('.btn-delete').addClass('hidden'); - return false; - } -} - -function resetProgramName(obj) -{ - var programSelect = $(obj).closest('tr').find('select[name^="program"]'); - var newName = 'program[' + $(obj).val() + '][]'; - programSelect.attr('name', newName); -} - -function toggleDisabled(obj) -{ - var checked = $(obj).is(':checked'); - var $picker = $(obj).closest('tr').find('.input-group select').data('zui.picker'); - - if(checked) - { - $picker.setDisabled(true); - } - else - { - $picker.setDisabled(false); - } -} diff --git a/module/group/js/manageview.js b/module/group/js/manageview.js deleted file mode 100644 index a02bbccc8f..0000000000 --- a/module/group/js/manageview.js +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Toggle program. - * - * @access public - * @return void - */ -function toggleProgram() -{ - $('#programBox').toggle($('#program').prop("checked")); -} - -/** - * Toggle product. - * - * @access public - * @return void - */ -function toggleProduct() -{ - $('#productBox').toggle($('#product').prop("checked")); -} - -/** - * Toggle project. - * - * @access public - * @return void - */ -function toggleProject() -{ - $('#projectBox').toggle($('#project').prop("checked")); -} - -/** - * Toggle execution. - * - * @access public - * @return void - */ -function toggleExecution() -{ - $('#executionBox').toggle($('#execution').prop("checked")); -} - -/** - * Select all. - * - * @param obj $obj - * @access public - * @return void - */ -function selectAll(obj) -{ - $(obj).closest('tr').find(':checkbox').prop('checked', $(obj).prop('checked')); -} - -$('input:checkbox[name^="allchecker"]').change(function() -{ - $('.group-item :checkbox[name^="actions"]').change(); -}); - -$(function() -{ - $('.group-item :checkbox[name^="actions"]').change(function() - { - var allChecked = true; - $('.group-item :checkbox[name^="actions"]').each(function() - { - if(!$(this).prop('checked')) allChecked = false; - }) - $('.group-item input:checkbox[name^="allchecker"]').prop('checked', allChecked); - - var id = $(this).attr('id'); - if(id == 'program') toggleProgram(); - if(id == 'product') toggleProduct(); - if(id == 'project') toggleProject(); - if(id == 'execution') toggleExecution(); - if($('#' + id + 'ActionBox').length == 1) $('#' + id + 'ActionBox').toggle($(this).prop("checked")); - }) - $('.group-item :checkbox[name^="actions"]').change(); - $("tr[id$='ActionBox']").each(function() - { - var allChecked = true; - $(this).find('td:last :checkbox').each(function() - { - if(!$(this).prop('checked')) - { - allChecked = false; - return true; - } - }); - if(allChecked) $(this).find('th :checkbox').prop('checked', true); - }); -}); diff --git a/module/holiday/css/browse.css b/module/holiday/css/browse.css deleted file mode 100644 index 9ee7e73529..0000000000 --- a/module/holiday/css/browse.css +++ /dev/null @@ -1,11 +0,0 @@ -.tree .active{font-weight: bold;} -.with-side .side {position: absolute; width: 130px;} -.with-side .main {padding-left: 145px; float: left;} -.panel-sm .panel-body {padding: 10px;} -#mainMenu .input-control {display: flex; width: 200px;} -#mainMenu .input-control .form-name {margin: 8px 10px; white-space: pre;} -.table-import {padding: 6px 5px 5px 5px; } -.shadow-sm {box-shadow: 0 1px 1px rgb(0 0 0 / 5%), 0 2px 6px 0 rgb(0 0 0 / 25%)} -.flex-center {display: flex; align-items: center; justify-content: center;} -.c-desc {width: 280px;} -p.c-desc {white-space: nowrap; margin-bottom: 0; text-overflow: clip; overflow: hidden;} diff --git a/module/holiday/js/browse.js b/module/holiday/js/browse.js deleted file mode 100644 index 0cfe06705a..0000000000 --- a/module/holiday/js/browse.js +++ /dev/null @@ -1,7 +0,0 @@ -$(function() -{ - $(document).on('change', '#year', function() - { - window.location.href = createLink('holiday', 'browse', 'year=' + $(this).val()) + '?_single=1'; - }); -}); diff --git a/module/host/css/browseimage.css b/module/host/css/browseimage.css deleted file mode 100644 index ef7500cb63..0000000000 --- a/module/host/css/browseimage.css +++ /dev/null @@ -1,4 +0,0 @@ -.c-name,.c-status,.c-progress,.c-osName{width: 130px;} -.main-header-image{border:none;margin-left: 0!important;padding-left:0;} -.body-modal #mainContent{padding-top: 85px; padding-bottom: 50px;} -.dropdown-menu>li>a {margin: 1px 0;} diff --git a/module/host/css/create.css b/module/host/css/create.css deleted file mode 100644 index 00c8e21f88..0000000000 --- a/module/host/css/create.css +++ /dev/null @@ -1,3 +0,0 @@ -#unit {padding: 0px !important; width:0px; border-left: 0px;} -.input-group-addon {border: 0px;} -#unit_chosen a {border-left: 0px; border-radius: 0 2px;} diff --git a/module/host/css/edit.css b/module/host/css/edit.css deleted file mode 100644 index 2d2de85465..0000000000 --- a/module/host/css/edit.css +++ /dev/null @@ -1,2 +0,0 @@ -span#unit {padding: 0px !important; width: 0px;} -#unit {border-left: 0px;} diff --git a/module/host/css/treemap.css b/module/host/css/treemap.css deleted file mode 100644 index 6c0510dcab..0000000000 --- a/module/host/css/treemap.css +++ /dev/null @@ -1,2 +0,0 @@ -#hostsTreemap {white-space: nowrap;} -#mainMenu {padding-bottom: .75rem; padding-top: .75rem;} \ No newline at end of file diff --git a/module/host/css/view.css b/module/host/css/view.css deleted file mode 100644 index 4ca9101427..0000000000 --- a/module/host/css/view.css +++ /dev/null @@ -1 +0,0 @@ -.outer .main .table tr > th:first-child, .outer .main .table tr > td:first-child { padding-left: 10px; } diff --git a/module/host/js/browseimage.js b/module/host/js/browseimage.js deleted file mode 100644 index aa7117f964..0000000000 --- a/module/host/js/browseimage.js +++ /dev/null @@ -1,60 +0,0 @@ -var interval; - -$(function () { - updateProgressInterval(); -}); - -function updateProgressInterval() { - updateProgress(); - interval = setInterval(function () - { - updateProgress(); - }, 3000); -} - -function updateProgress() { - $.get(createLink('zahost', 'ajaxImageDownloadProgress', 'hostID=' + hostID)).done(function (response) - { - var result = JSON.parse(response); - var statusList = result.data; - - var hasInprogress = false; - for (var imageID in statusList) { - if (statusList[imageID].statusCode) { - if (statusList[imageID].statusCode == 'inprogress' || statusList[imageID].statusCode == 'created' || statusList[imageID].statusCode == 'pending') - { - hasInprogress = true; - $('.image-download-' + imageID).addClass('disabled'); - $('.image-cancel-' + imageID).removeClass('disabled'); - } - else if (statusList[imageID].statusCode == 'completed') - { - $('.image-path-' + imageID).text(statusList[imageID].path); - $('.image-path-' + imageID).attr('title', statusList[imageID].path); - $('.image-download-' + imageID).addClass('disabled'); - $('.image-cancel-' + imageID).addClass('disabled'); - $('.image-cancel-' + imageID).attr('href', '#'); - $('.image-progress-' + imageID).text("100%"); - } - else - { - var link = createLink('zahost', 'downloadImage', "hostID="+hostID+"&imageID="+imageID); - $('.image-download-' + imageID).removeClass('disabled'); - $('.image-download-' + imageID).attr('href', link); - $('.image-cancel-' + imageID).addClass('disabled'); - $('.image-cancel-' + imageID).attr('href', '#'); - $('.image-progress-' + imageID).text(''); - } - $('.image-status-' + imageID).text(statusList[imageID].status); - if(statusList[imageID].progress != '' && statusList[imageID].statusCode != 'completed') - { - $('.image-progress-' + imageID).text(statusList[imageID].progress); - } - } - } - if (!hasInprogress) - { - clearInterval(interval) - } - }); -} diff --git a/module/host/js/create.js b/module/host/js/create.js deleted file mode 100644 index 7bdbb6d2ae..0000000000 --- a/module/host/js/create.js +++ /dev/null @@ -1,11 +0,0 @@ -$(document).ready(function(){ - $('#osName').change(function(){ - var selectVal = $('#osName').val(); - $.get(createLink('host', 'ajaxGetOSVersion', 'field=' + selectVal), function(data) - { - $('select#osVersion').replaceWith(data); - $('#osVersion_chosen').remove(); - $("select#osVersion").chosen(); - }); - }); -}); diff --git a/module/host/js/edit.js b/module/host/js/edit.js deleted file mode 100644 index 51bf58b516..0000000000 --- a/module/host/js/edit.js +++ /dev/null @@ -1,20 +0,0 @@ -$(document).ready(function(){ - /* Change the operating system. */ - $('#osName').change(function(){ - var selectVal = $('#osName').val(); - $.get(createLink('host', 'ajaxGetOSVersion', 'field=' + selectVal), function(data) - { - $('select#osVersion').replaceWith(data); - $('#osVersion_chosen').remove(); - $("select#osVersion").chosen(); - }); - }); - - var width = $("[name='unit']").css('width'); - width = parseInt(width); - if(width < 74) - { - $("[name='unit']").css({'width': '74px'}); - } -}); - diff --git a/module/index/css/changelog.css b/module/index/css/changelog.css deleted file mode 100644 index b1b7c5e884..0000000000 --- a/module/index/css/changelog.css +++ /dev/null @@ -1,14 +0,0 @@ -#versionContent {min-height: 240px;} -#featureList {padding: 0 10px;} -#featureList > .item {padding: 0 0 10px 0;} -#featureList > .item > h3 {color: #114f8e; font-size: 16px; margin: 0; padding: 10px 0;} -#featureList > .item > .desc {color: #666; padding-left: 18px;} -#featureList > .item > .more-link {color: #666; padding-left: 18px;} -#featureList > .item > .more {display: none;} -#featureList + #details {padding: 0;} -#details .details-list {display: none; padding: 10px; background: #f1f1f1; border-radius: 4px;} -#details.show-details .details-list {display: block;} -#details > .btn > .icon-angle-right {transition: transform .2s; display: inline-block;} -#details.show-details > .btn > .icon-angle-right {transform: rotate(90deg);} -#details.show-details > .btn:focus {border-radius: 4px 4px 0 0;} -#details.show-details > .btn:focus + .details-list {border-radius: 0 0 4px 4px;} diff --git a/module/index/css/index.css b/module/index/css/index.css deleted file mode 100644 index bd165d5ace..0000000000 --- a/module/index/css/index.css +++ /dev/null @@ -1,124 +0,0 @@ -body {padding-left: 96px;} -#menu {position: fixed; left: 0; top: 0; bottom: 0; width: 96px; z-index: 1015;} -.menu-show .menu-tip {display: none!important;} -#menuNav {position: absolute; top: 5px; bottom: 40px; width: 100%;} -#menu .nav > li {float: none; padding: 2px 8px;} -#menu .nav > li > a {color: #fff; line-height: 24px; padding: 6px; border-radius: 2px; white-space: nowrap; height: 36px;} -#menu .nav > li > a > .icon {display: inline-block; font-size: 16px; position: relative; top: -1px} -#menu .nav > li > a > .icon + .text {margin-left: 4px; position: relative; top: -1px} -#menu .nav > li.active > a, #menu .nav > li > a:hover, #menu .nav > li > a:focus {background-color: #3785ff;} -#menu .nav > li.divider {margin: 8px; background-color: #fff; opacity: 0.24; height: 1px; padding: 0 !important;} -#menuFooter {position: absolute; bottom: 0; left: 0; right: 0;} -#menu .nav > li.has-avatar {padding: 1px 6px;} -#menu .nav > li.has-avatar > a {padding: 4px 0; text-align: center;} -body.menu-hide {padding-left: 0;} -.menu-hide #menu {width: 40px;} -.menu-hide .menu-toggle .icon:before {content: '\e9f1';} -.menu-toggle .is-unfold, .menu-hide .menu-toggle .is-collapse {display: none;} -.menu-hide .menu-toggle .is-unfold {display: inline;} -#menuToggleItem, -.menu-hide #menuToggleItem {display: list-item;} -.menu-hide #menu .nav > li {padding: 2px 4px;} -.menu-hide #menu .nav > li > a {padding: 6px 4px; text-align: center;} -.menu-hide #menu .nav > li > a > .icon {top: 1px} -.menu-hide #menu .nav > li > a > .text {display: none;} -.menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;} -#menuMoreNav {display: none;} -.show-more-nav #menuMoreNav {display: block;} -#menuMoreList {left: 100%; margin-left: -2px; top: 0; background-color: #3c495c;} -#menuMoreList > li {padding: 2px 6px;} -#menuMoreList > li > a {color: #fff; padding: 4px 6px 4px 12px; border-radius: 2px; margin: 0;} -#menuMoreList > li > a > .icon {opacity: 1; font-size: 16px;} -#menuMoreList > li.divider {opacity: .2; margin: 6px; padding: 0;} -#menu .dropdown-hover:hover > a, #menu .dropdown.open > a {background-color: rgba(0,0,0,.3);} - -#moreExecution {display: none; max-height: 520px; min-height: 520px; max-width: 360px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef;} -.more-execution-show {left: 96px;} -.more-execution-hide {left: 40px;} -#moreExecution .icon-search {opacity: 0.5;} -#executionList {max-height: 450px; min-height: 450px; max-width: 360px; min-width: 150px; margin-top: 5px;} - -@media screen and (max-height: 768px) -{ - #moreExecution {max-height: 340px; min-height: 340px;} - #executionList {max-height: 270px; min-height: 270px;} -} - -#apps {position: fixed; left: 96px; bottom: 0; right: 0; top: 0;} -.app-container {position: absolute; left: 0; bottom: 40px; right: 0; top: 0; background-color: #efefef;} -.menu-hide #apps {left: 40px;} -.app-container.loading:before {background-color: rgba(0,0,0,.1);} -.app-container.loading:before, .app-container.loading::after {transition-delay: 3s;} -.app-container.loading.open-from-hidden {transition-delay: 0s;} -.app-container.loading.open-from-hidden > iframe {opacity: 0;} -.app-container.loading.no-delay:before, .app-container.loading.no-delay::after {transition-delay: 0s !important;} - -#appsBar {position: fixed; left: 96px; bottom: 0; right: 0; height: 40px; z-index: 1012; background: #fff; border-top: 1px solid #eff1f7;} -.menu-hide #appsBar {left: 40px;} -#bars {position: absolute; left: 0; top: 0; bottom: 0; padding: 0 5px;} -#bars > li {padding: 8px 2px;} -#bars > li > a {height: 24px; color: #000; padding: 2px 8px; line-height: 20px; border-radius: 2px;} -#bars > li.active > a {background: #fff!important;} -#bars > li > a:hover, #bars > li > a:active, #bars > li > a:focus {background: #16a8f8!important; color: #fff;} -#bars > li.active > a > span, #bars > li.active > a:active > span, #bars > li.active > a:focus > span {padding-bottom: 2px; font-weight: 600; border-bottom: 2px solid #16a8f8;} -#bars > li.active:after {content: ' '; display: block; position: absolute; height: 3px; left: 5px; right: 5px; bottom: 0; border-radius: 2px;} -#bars > li.divider{margin-right: 5px; margin-top: 10px; height: 20px; border-right: 1px solid #d9d9d9;} - -#flodNav {float: none; margin: 0;} -#flodNav>li {text-align: center;} -#flodNav>li>.dropdown-menu {left: 100%; bottom: 0; top: auto; width: 140px; text-align: left; background: #3c495c;} -#flodNav>li>.dropdown-menu a {color: #fff;} -#flodNav>li>.dropdown-menu .dropdown-menu {left: 100%; text-align: left; background: #3c495c;} -#flodNav>li .top .dropdown-menu {top: -60px;} -#flodNav .dropdown-menu>li>a>.icon {position: relative; top: 0; display: inline;} -#flodNav li.open>a {background: #0c64eb;} -#flodNav li.divider {opacity: .24; border-top: 1px solid; height: 2px;} -#flodNav .dropdown-submenu:focus > a, #flodNav .dropdown-submenu:hover > a {background-color: rgba(0,0,0,.2);} -#poweredBy {width: 40%; position: absolute; top: 4px; right: 0; padding: 0;} - -#globalSearchDiv {width: 200px; float: right; margin-right: 4px;} -#globalSearchDiv .input-group {width: 194px; float: right; margin-top: 2px;} -#searchbox .dropdown-menu.show-quick-go.with-active {min-width: 270px;} -#searchbox .dropdown-menu.show-quick-go > li {padding: 0 5px;} -#searchbox .dropdown-menu {min-width: 150px;} - -#globalSearchInput {height: 28px; padding-left: 10px; border-right: 0px;} -#globalSearchButton {height: 28px;} -#globalSearchButton > i {position: relative; top: -2px} - -#globalBarLogo {width: 100%; float: right;} -#globalBarLogo a:first-child {margin-right: 10px;} -#globalBarLogo a {float: right; margin: 0px 2px;} -#globalBarLogo a .icon {font-size: 24px; color: #16a8f8;} -#globalBarLogo a .version {font-size: 13px; position: relative; bottom: 3px;} - -#searchbox a {float: left; width: 100%;} -#searchbox a:hover {color: white;} -#searchbox {width: 100%;} -#searchbox .dropdown-menu {margin-top: 0px; left: 1px; position: absolute; top: -50px;} -#searchbox .dropdown-menu > li > a {padding: 5px 0px 5px 2px;} -#searchbox .dropdown-menu > li {display: none;} -#searchbox .dropdown-menu > li.search-type-all {width: 100%; display: block;} -#searchbox .dropdown-menu > li:hover {position: relative;} -#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: initial; bottom: 4px; min-height: 318px; padding-top: 30px;} -#searchbox .dropdown-menu.show-quick-go > li {display: block;} -#searchbox .dropdown-menu.show-quick-go > li.active {width: 100%; position: absolute; top: 0; left: 0; right: 0;} -#searchbox .dropdown-menu>li.active>a, #searchbox .dropdown-menu>li.selected>a {position: relative; color: #fff; background-color: #16a8f8;} -#searchbox .dropdown-menu>li.selected>a:after {position: absolute; top: 2px; right: 4px; display: block; font-family: ZentaoIcon; font-size: 18px; font-size: 14px; font-style: normal; font-weight: 400; font-variant: normal; line-height: 1; line-height: 20px; text-transform: none; content: "\e5ca"; speak: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;} - -#upgradeContent {display: none; position: absolute; top: -330px; right: 10px; width: 65%; height: 322px; background-color: #fff; padding: 5px 0; border: 1px solid rgba(0,0,0,.15); border-color: rgba(0,0,0,.1); opacity: 1; border-radius: 4px; box-shadow: 0 6px 12px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.1);} -#latestVersionList {height: 270px; overflow: auto;} - -.version-upgrade {width: 14px; height: 16px; float: left; background-repeat: no-repeat; background-position: center ; background-size: cover; display: block;} -.version-content {padding: 10px 15px;} -.version-footer {padding-top: 5px;} -.version-detail {color: #8a8a8a;} -.upgrade-now {float: right;} -.color-primary {color: #3280fc;} - -@media screen and (max-height: 768px) -{ - #upgradeContent{width: 85%;} -} -#searchbox .dropdown-menu > li.search-type-all{max-width: 250px} -#searchbox .dropdown-menu > li.search-type-all a{width: 100%; overflow: hidden; text-overflow: ellipsis;} diff --git a/module/index/js/index.js b/module/index/js/index.js deleted file mode 100644 index b4d155cd38..0000000000 --- a/module/index/js/index.js +++ /dev/null @@ -1,935 +0,0 @@ -(function() -{ - /* Init variables */ - var openedApps = {}; // Key-value to save appCode-app pairs - var appsMap = {}; // Key-value to save opened appCode-app pairs - var openedAppZIndex = 10; // Last opened app z-index - var defaultApp; // Default app code - var lastOpenedApp; // Last opened app code - - /** - * Init apps menu list - */ - function initAppsMenu() - { - var $helpLink = $('#helpLink'); - appsMap.help = - { - code: 'help', - icon: 'icon-help', - url: manualUrl || $helpLink.attr('href'), - external: true, - text: manualText || $helpLink.text(), - appUrl: config.webRoot + '#app=help' - }; - var $menuMainNav = $('#menuMainNav').empty(); - window.appsMenuItems.forEach(function(item) - { - if(item === 'divider') return $menuMainNav.append('
  • '); - - /* Append tid param to app url */ - if($.tabSession && item.url) - { - item.url = $.tabSession.convertUrlWithTid(item.url); - } - - var $link= $('') - .attr('data-app', item.code) - .attr('data-toggle', 'tooltip') - .attr('class', 'show-in-app') - .html(item.title); - - item.icon = ($link.find('.icon').attr('class') || '').replace('icon ', ''); - item.text = $link.text().trim(); - $link.html('' + item.text + ''); - if(item.code === 'devops') $link.find('.text').addClass('num'); - appsMap[item.code] = item; - - $('
  • ').attr('data-app', item.code) - .append($link) - .appendTo($menuMainNav); - - $link.tooltip({title: item.text, container: 'body', placement: 'right', tipClass: 'menu-tip'}); - - if(!defaultApp) defaultApp = item.code; - }); - - appsMap['search'] = - { - opened: false, - code: 'search', - group: 'search', - icon: 'icon-search', - methodName: 'index', - moduleName: 'search', - text: searchCommon, - title: ' ' + searchCommon, - url: '/index.php?m=search&f=index', - vars: '' - }; - } - - /** - * Get app code from url - * @param {String} urlOrModuleName Url string - * @return {String} - */ - function getAppCodeFromUrl(urlOrModuleName) - { - var code = window.navGroup[urlOrModuleName]; - if(code) return code; - - var link = $.parseLink(urlOrModuleName); - if(!link.moduleName || link.isOnlyBody || (link.moduleName === 'index' && link.methodName === 'index')) return ''; - - if(link.hash && link.hash.indexOf('app=') === 0) return link.hash.substr(4); - - /* Handling special situations */ - var moduleName = link.moduleName; - var methodName = link.methodName; - if (moduleName === 'index' && methodName === 'index') return 'my'; - - var methodLowerCase = methodName.toLowerCase(); - if(moduleName === 'doc') - { - if(link.prj) return 'project'; - - if((link.params.from || link.params.$3) == 'product') - { - if(['showfiles', 'browse', 'view', 'edit', 'delete', 'create'].includes(methodLowerCase)) return 'product'; - } - return 'doc'; - } - if(['caselib', 'testreport', 'testsuite', 'testtask', 'testcase', 'bug', 'qa'].includes(moduleName)) - { - return link.prj ? 'project' : 'qa'; - } - if(moduleName === 'report') - { - if(['usereport', 'editreport', 'deletereport', 'custom'].includes(methodLowerCase) && link.params.from) - { - return 'system'; - } - else - { - return link.prj ? 'project' : 'report'; - } - } - if(moduleName === 'story' && vision === 'lite') return 'project' - if(moduleName === 'testcase' && methodLowerCase === 'zerocase') - { - return link.params.from == 'project' ? 'project' : 'qa'; - } - if(moduleName === 'execution' && methodLowerCase === 'all') - { - return (link.params.from || link.params.$3) == 'project' ? 'project' : 'execution'; - } - if(moduleName === 'issue' || moduleName === 'risk' || moduleName === 'opportunity' || moduleName === 'pssp' || moduleName === 'auditplan' || moduleName === 'meeting' || moduleName === 'nc') - { - if(link.params.$2 == 'my' || link.params.from == 'my') return 'my'; - if(link.params.$2 == 'project' || link.params.from == 'project') return 'project'; - if(link.params.$2 == 'execution' || link.params.from == 'execution') return 'execution'; - } - if(moduleName === 'product') - { - if(methodLowerCase === 'create' && (link.params.programID || link.params.$1)) return 'program'; - if(methodLowerCase === 'edit' && (link.params.programID || link.params.$4)) return 'program'; - if(methodLowerCase === 'batchedit') return 'program'; - var moduleGroup = link.params.moduleGroup ? link.params.moduleGroup : link.params.$2; - if(methodLowerCase === 'showerrornone' && link.params.$1 == 'project') return 'project'; - if(methodLowerCase === 'showerrornone' && (moduleGroup || moduleGroup)) return moduleGroup; - } - if(moduleName === 'stakeholder') - { - if(methodLowerCase === 'create' && (link.params.programID || link.params.$1)) return 'program'; - } - if(moduleName === 'user') - { - if(['todo', 'todocalendar', 'effortcalendar', 'effort', 'task', 'todo', 'story', 'bug', 'testtask', 'testcase', 'execution', 'dynamic', 'profile', 'view', 'issue', 'risk'].includes(methodLowerCase)) return 'system'; - } - if(moduleName === 'my') - { - if(['team'].includes(methodLowerCase)) return 'system'; - } - if(moduleName === 'company') if(methodLowerCase == 'browse') return 'admin'; - if(moduleName === 'opportunity' || moduleName === 'risk' || moduleName == 'trainplan') if(methodLowerCase == 'view') return 'project'; - if(moduleName === 'tree') - { - if(methodLowerCase === 'browse') - { - var viewType = link.params.view || link.params.$2; - if(['bug', 'case', 'caselib'].includes(viewType)) return link.params.$5 === 'project' ? 'project' : 'qa'; - - if(viewType === 'doc' && (link.params.from === 'product' || link.params.$5 == 'product')) return 'product'; - if(viewType === 'doc' && (link.params.from === 'project' || link.params.$5 == 'project')) return 'project'; - if(viewType === 'doc') return 'doc'; - if(viewType === 'story') return 'product'; - } - else if(methodLowerCase === 'browsetask') - { - return 'project'; - } - } - if(moduleName === 'search' && methodLowerCase === 'buildindex') return 'admin'; - - code = window.navGroup[moduleName] || moduleName || urlOrModuleName; - return appsMap[code] ? code : ''; - } - - /** - * Open tab of app - * @param {string} [url] Url to open - * @param {string} [appCode] The code of target app to open - * @return {void} - */ - function openTab(url, appCode, forceReload) - { - /* Check params */ - if(!appCode) - { - if(appsMap[url]) - { - appCode = url; - url = ''; - } - else - { - appCode = getAppCodeFromUrl(url); - if(!appCode) return openTab('my'); - } - } - - /* Create pate app object and store it */ - var app = openedApps[appCode]; - if(app) - { - if(app.$iframe && app.$iframe.length) - { - var iframe = app.$iframe[0]; - if(iframe && iframe.contentDocument && iframe.contentWindow && iframe.contentWindow.$) - { - var result = iframe.contentWindow.$(iframe.contentDocument).triggerHandler('openapp.apps', [app, url]); - if (result === false) { - return 'cancel'; - } - } - } - } - else - { - var $iframe = $( - [ - '' - ].join(' ')); - var $app = $('
    ') - .append($iframe) - .appendTo('#apps'); - - app = $.extend({$iframe: $iframe, $app: $app, code: appCode, opened: true}, appsMap[appCode]); - openedApps[appCode] = app; - - /* If first show without url, then use the default url */ - if(!url) url = appsMap[appCode].url; - - var iframe = $iframe.get(0); - iframe.onload = iframe.onreadystatechange = function(e) - { - $app.removeClass('loading').trigger('loadapp', app); - }; - } - - /* Set tab cookie */ - $.cookie('tab', appCode, {expires: config.cookieLife, path: config.webRoot}); - - /* Highlight at main menu */ - var $menuMainNav = $('#menuMainNav,#menuMoreNav'); - var $lastActiveNav = $menuMainNav.find('li.active'); - if($lastActiveNav.data('app') !== appCode) - { - $lastActiveNav.removeClass('active'); - $menuMainNav.find('li[data-app="' + appCode + '"]').addClass('active'); - } - - /* Show page app and update iframe source */ - var iframe = app.$iframe[0]; - var isSameUrl = iframe && url && iframe.contentWindow.location.href.endsWith(url); - if (url && (!isSameUrl || forceReload !== false)) - { - app.$app.toggleClass('open-from-hidden', app.zIndex < openedAppZIndex) - reloadApp(appCode, url, true); - } - app.zIndex = ++openedAppZIndex; - app.$app.show().css('z-index', app.zIndex); - - /* Update task bar */ - var $bars = $('#bars'); - var $bar = $('#appBar-' + appCode); - if(!$bar.length) - { - if (typeof(app.text) == 'undefined') return false; - var $link= $('') - .attr('data-app', appCode) - .attr('class', 'show-in-app') - .html('' + app.text + ''); - var barCount = $('#bars li').length; - - if(barCount) $bar = $('
  • ').appendTo($bars); - $bar = $('
  • ').attr('data-app', appCode) - .attr('id', 'appBar-' + appCode) - .append($link) - .appendTo($bars); - } - var $lastActiveBar = $bars.find('li.active'); - if($lastActiveBar.data('app') !== appCode) - { - $lastActiveBar.removeClass('active'); - $bars.find('li[data-app="' + appCode + '"]').addClass('active'); - } - app.$bar = $bar; - - /* Update others app state */ - for(var theCode in openedApps) - { - if(theCode !== appCode) openedApps[theCode].show = false; - } - - /* Update current app state */ - app.show = true; - if(lastOpenedApp !== appCode) - { - lastOpenedApp = appCode; - updateAppUrl(appCode, null, null, true); - } - - app.$app.trigger('showapp', app); - - return true; - } - - /** - * Get last opened app - * @param {boolean} [onlyShowed] If set to true then only get last app from apps are showed - * @returns {object} The opened app info object - */ - function getLastApp(onlyShowed) - { - var lastShowIndex = 0; - var lastApp = null; - for(var appCode in openedApps) - { - var app = openedApps[appCode]; - if((!onlyShowed || app.show) && lastShowIndex < app.zIndex && !app.closed) - { - lastShowIndex = app.zIndex; - lastApp = app; - } - } - return lastApp; - } - - /** - * Hide app - * @param {string} appCode The app code of target app to hide - * @return {void} - */ - function hideTab(appCode) - { - var app = openedApps[appCode]; - if(!app) return; - app.$app.trigger('hideapp', app); - if(!app.show) return; - - app.$app.hide(); - app.show = false; - lastOpenedApp = null; - - - /* Active last app */ - var lastApp = getLastApp(true) || getLastApp(); - showTab(lastApp ? lastApp.code : defaultApp); - } - - /** - * Show tab of app - * @param {string} appCode The app code of target app to show - * @return {void} - */ - function showTab(appCode) - { - return openTab('', appCode); - } - - /** - * Toggle app - * @param {string} appCode The app code of target app to toggle - * @return {void} - */ - function toggleApp(appCode) - { - var app = openedApps[appCode]; - if(!app || app.code !== lastOpenedApp) showTab(appCode); - else hideTab(appCode); - } - - /** - * Close app - * @param {string} appCode The app code of target app to close - */ - function closeApp(appCode) - { - appCode = appCode || lastOpenedApp; - var app = openedApps[appCode]; - if(!app) return; - - if(app.$iframe && app.$iframe.length) - { - var iframe = app.$iframe[0]; - if(iframe && iframe.contentDocument && iframe.contentWindow && iframe.contentWindow.$) - { - var result = iframe.contentWindow.$(iframe.contentDocument).triggerHandler('closeapp.apps', [app]); - if (result === false) { - return 'cancel'; - } - } - } - - var appKeys = Object.keys(openedApps) - if(appKeys[0] == appCode) - { - $("#bars li.divider:first").remove(); - } - else - { - $("#appBar-" + appCode).prev().remove(); - } - - app.closed = true; - hideTab(appCode); - app.$app.remove(); - app.$bar.remove(); - delete openedApps[appCode]; - - var firstClass = $("#bars li:first").attr('class'); - if(firstClass == 'divider') $("#bars li.divider:first").remove(); - - app.$app.trigger('closeapp', app); - } - - /** - * Reload app - * @param {string} appCode The app code of target app to reload - * @param {string|boolean} [url] The new url to load, it's optional - * @param {boolean} [notTriggerEvent] Skip trigger event - * @return {void} - */ - function reloadApp(appCode, url, notTriggerEvent) - { - var app = openedApps[appCode]; - if(!app) return; - - if(url === true) url = app.url; - else if($.tabSession) url = $.tabSession.convertUrlWithTid(url); - - var iframe = app.$iframe[0]; - var isSameUrl = iframe && url && iframe.contentWindow.location.href.endsWith(url); - - app.$app.trigger('beforereloadapp'); - - /* Add hook to page before reload it */ - if (iframe && iframe.contentWindow.beforeAppReload) - { - iframe.contentWindow.beforeAppReload({app: app, url: url}); - } - - try - { - if(url && !isSameUrl) iframe.contentWindow.location.assign(url); - else iframe.contentWindow.location.reload(true); - } - catch(_) - { - iframe.src = url || app.url || iframe.src; - } - - if(!notTriggerEvent) app.$app.trigger('reloadapp', app); - - if(!isSameUrl || app.zIndex < openedAppZIndex) app.$app.addClass('loading'); - if(app._loadTimer) clearTimeout(app._loadTimer); - app._loadTimer = setTimeout(function() - { - app.$app.removeClass('loading'); - app._loadTimer = null; - }, 15000); - } - - /** - * Update browser url and title for the given app - * @param {string} appCode The app code of target app to update url - * @param {string|boolean} [url] The new url of the app - * @param {string|boolean} [title] The new title of the app - * @param {boolean} [push] Use push instead of replace - * @return {void} - */ - function updateAppUrl(appCode, url, title, push) - { - // if(window.TUTORIAL) return; - var app = openedApps[appCode]; - if(!app || lastOpenedApp !== appCode) return; - - if(url) app.appUrl = url; - else url = app.appUrl || app.url; - if(title) app.appTitle = title; - else title = app.appTitle || app.text; - - if(url && url.indexOf('#') < 0 && getAppCodeFromUrl(url) !== appCode) url = url + '#app=' + appCode; - if(location.href !== url) - { - history[push ? 'pushState' : 'replaceState']({app: appCode}, title, url); - } - document.title = title; - } - - /* Bind helper methods to global object "$.apps" */ - $.apps = window.apps = - { - show: showTab, - open: openTab, - hide: hideTab, - toggle: toggleApp, - close: closeApp, - reload: reloadApp, - updateUrl: updateAppUrl, - getAppCode: getAppCodeFromUrl, - getLastApp: getLastApp, - openedApps: openedApps, - appsMap: appsMap - }; - - /** - * Refresh more menu in #menuNav - * @return {void} - */ - function refreshMoreMenu() - { - var $mainNav = $('#menuMainNav'); - var $list = $('#menuMoreList'); - var $menuNav = $('#menuNav'); - var $menuItems = $mainNav.children('li'); - var itemHeight = $menuItems.first().outerHeight(); - var maxHeight = $menuNav.height() - 10; - var showMoreMenu = false; - var currentHeight = itemHeight; - var moreMenuHeight = 12; - - $menuItems.each(function() - { - var $item = $(this); - var isDivider = $item.hasClass('divider'); - var height = isDivider ? 17 : itemHeight; - currentHeight += height; - - if(currentHeight > maxHeight) - { - $item.addClass('hidden'); - if(!showMoreMenu) - { - showMoreMenu = true; - $list.empty(); - - var $prevItem = $item.prev(); - if($prevItem.hasClass('divider')) $prevItem.addClass('hidden'); - - if(isDivider) return; - } - moreMenuHeight += isDivider ? 13 : 32; - $list.append($item.clone().removeClass('hidden')); - } - else - { - $item.removeClass('hidden'); - } - }); - - /* The magic number "111" is the space between dropdown trigger - btn and the bottom of screen */ - var listStyle = {maxHeight: 'initial', top: moreMenuHeight > 111 ? 111 - moreMenuHeight : ''}; - if($list[0] && $list[0].getBoundingClientRect) - { - var btnBounding = $list.prev('a')[0].getBoundingClientRect(); - if(btnBounding.height) - { - var winHeight = $(window).height(); - if(winHeight < moreMenuHeight) - { - listStyle.maxHeight = winHeight; - listStyle.overflow = 'auto'; - listStyle.top = 5 - btnBounding.top; - } - else if(moreMenuHeight > (winHeight - btnBounding.top)) - { - listStyle.top = winHeight - btnBounding.top - moreMenuHeight + 5; - } - } - } - $list.css(listStyle); - $menuNav.toggleClass('show-more-nav', showMoreMenu); - - if(showMoreMenu && !$list.data('listened-click')) - { - $list.data('listened-click', true).on('click', function() - { - $list.addClass('hidden'); - setTimeout(function(){$list.removeClass('hidden')}, 200); - }); - } - } - - /* Init after current page load */ - $(function() - { - initAppsMenu(); - - /* Bind events */ - $(document).on('click', '.open-in-app,.show-in-app', function(e) - { - var $link = $(this); - if($link.is('[data-modal],[data-toggle][data-toggle!="tooltip"],.iframe,.not-in-app')) return; - var url = $link.hasClass('show-in-app') ? '' : ($link.attr('href') || $link.data('url')); - if(url && url.indexOf('onlybody=yes') > 0) return; - if(openTab(url, $link.data('app'))) - { - e.preventDefault(); - if($link.closest('#userNav').length) - { - var $menu = $('#userNav .dropdown-menu').addClass('hidden'); - setTimeout(function(){$menu.removeClass('hidden')}, 200); - } - } - }).on('contextmenu', '.open-in-app,.show-in-app', function(event) - { - var $btn = $(this); - var appCode = $btn.data('app'); - if(!appCode) return; - - var lang = window.appsLang; - var app = openedApps[appCode]; - var items = [{label: lang.open, disabled: app && lastOpenedApp === appCode, onClick: function(){showTab(appCode)}}]; - if(app) - { - items.push({label: lang.reload, onClick: function(){reloadApp(appCode)}}); - if(appCode !== 'my') items.push({label: lang.close, onClick: function(){closeApp(appCode)}}); - } - - var options = {event: event, onClickItem: function(_item, _$item, e){e.preventDefault();}}; - var pos = $btn.data('pos'); - if(pos) - { - var bounding = $btn.closest('li')[0].getBoundingClientRect(); - if(pos === 'bar') - { - options.x = bounding.left; - options.y = bounding.top - (appCode === 'my' ? 65 : 92); - } - else - { - options.x = bounding.right - 10; - options.y = bounding.top; - } - } - var $dropdown = $btn.closest('.dropdown'); - if($dropdown.length) - { - $dropdown.addClass('open'); - options.onHide = function(){$dropdown.removeClass('open');} - } - - $.zui.ContextMenu.show(items, options); - event.preventDefault(); - }); - - window.addEventListener('popstate', function(event) - { - if(event.state && lastOpenedApp !== event.state.app) openTab(event.state.app); - }); - - /* Redirect or open default app after document load */ - var defaultOpenUrl = window.defaultOpen; - var codeApp = ''; - if(location.hash.indexOf('#app=') === 0) - { - var hashParams = new URLSearchParams(location.hash.substring(1)); - codeApp = hashParams.get('app'); - if(hashParams.has('url')) defaultOpenUrl = hashParams.get('url'); - if(!defaultOpenUrl) - { - defaultOpenUrl = codeApp; - codeApp = ''; - } - } - - openTab(defaultOpenUrl || defaultApp, codeApp); - - /* Refresh more menu on window resize */ - $(window).on('resize', refreshMoreMenu); - refreshMoreMenu(); - setTimeout(refreshMoreMenu, 500); - - /* Fix bug #21331. */ - var vibibleState = ''; - var visibleChange = ''; - if(typeof document.visibilityState != 'undefined') - { - visibleChange = 'visibilitychange'; -   vibibleState = 'visibilityState'; - } - else if(typeof document.webkitVisibilityState != 'undefined') - { - visibleChange = 'webkitvisibilitychange'; -   vibibleState = 'webkitVisibilityState'; - } - if(visibleChange) - { - document.addEventListener(visibleChange, function() - { - if(document[vibibleState] == 'visible') showTab($('#bars>li.active').data('app')); - }); - } - }); -}()); - -(function() -{ - $.toggleMenu = function(toggle) - { - var $body = $('body'); - if (toggle === undefined) toggle = $body.hasClass('menu-hide'); - $body.toggleClass('menu-hide', !toggle).toggleClass('menu-show', !!toggle); - $.cookie('hideMenu', String(!toggle), {expires: config.cookieLife, path: config.webRoot}); - }; - - $(function() - { - /* Click to show more. */ - $(document).on('click', '.menu-toggle', function() - { - $.toggleMenu(); - var $menu = $('#userNav .dropdown-menu').addClass('hidden'); - setTimeout(function(){$menu.removeClass('hidden')}, 200); - }); - - $('.menu-toggle').each(function() - { - $(this).attr('data-toggle', 'tooltip').tooltip({container: 'body', placement: 'right', tipClass: 'menu-tip', title: function() - { - return $(this).data($('body').hasClass('menu-hide') ? 'unfoldText' : 'collapseText'); - }}); - }); - }); -}()); - -$.extend( -{ - gotoObject:function() - { - objectType = $('#searchType').attr('value'); - objectValue = $('#globalSearchInput').attr('value'); - - if(objectType && objectValue) - { - var reg = /[^0-9]/; - if(reg.test(objectValue) || objectType == 'all') - { - var searchLink = createLink('search', 'index'); - searchLink += (searchLink.indexOf('?') >= 0 ? '&' : '?') + 'words=' + objectValue; - $.apps.open(searchLink); - } - else - { - var types = objectType.split('-'); - var searchModule = types[0]; - var searchMethod = typeof(types[1]) == 'undefined' ? 'view' : types[1]; - var searchLink = createLink(searchModule, searchMethod, "id=" + objectValue); - var assetType = ',story,issue,risk,opportunity,doc,'; - if(vision == 'or' && searchModule == 'story') searchLink = createLink(searchModule, searchMethod, "id=" + objectValue + '&version=0¶m=0&storyType=requirement'); - if(assetType.indexOf(',' + searchModule + ',') > -1) - { - var link = createLink('index', 'ajaxGetViewMethod' , 'objectID=' + objectValue + '&objectType=' + searchModule); - $.get(link, function(data) - { - if(data) - { - searchModule = 'assetlib'; - searchMethod = data; - searchLink = createLink(searchModule, searchMethod, "id=" + objectValue); - } - $.apps.open(searchLink); - }); - } - else - { - $.apps.open(searchLink); - } - } - - $.post(createLink('index', 'ajaxClearObjectSession'), {objectType: objectType}); - $('#globalSearchInput').click(); - } - } -}); - -/* Initialize global search. */ -$(function() -{ - var reg = /[^0-9]/; - var $searchbox = $('#searchbox'); - var $typeSelector = $searchbox.find('.input-group-btn'); - var $dropmenu = $typeSelector.children('.dropdown-menu'); - var $searchQuery = $('#globalSearchInput'); - - var toggleMenu = function(show) - { - $searchbox.toggleClass('open', show); - $dropmenu.toggleClass('show', show).toggleClass('in', show); - if(show) $dropmenu.show(); - else $dropmenu.hide(); - }; - - var hideMenu = function(){toggleMenu(false);}; - - var refreshMenu = function() - { - var val = $searchQuery.val(); - var searchType = changeSearchObject(); - if(val) - { - var isQuickGo = !reg.test(val); - $dropmenu.toggleClass('show-quick-go', isQuickGo); - var $typeAll = $dropmenu.find('li.search-type-all > a'); - $typeAll.text(searchAB + ' ' + val); - if(isQuickGo) - { - $typeAll.closest('li').removeClass('active'); - $dropmenu.removeClass('with-active').find('li:not(.search-type-all) > a').each(function() - { - var $this = $(this); - var isActiveType = $this.data('value') === searchType && searchType !== 'all'; - $this.closest('li').toggleClass('selected active', isActiveType); - $this.text($this.data('name') + ' #' + (val.length > 7 ? (val.substr(0, 7) + '...') : val)); - if(isActiveType) $dropmenu.addClass('with-active'); - }); - } - else - { - $dropmenu.find('li.active').removeClass('active'); - $typeAll.closest('li').addClass('active'); - } - toggleMenu(true); - } - else - { - hideMenu(); - } - }; - - $dropmenu = $dropmenu.appendTo($searchbox); - $dropmenu.on('click', 'a', function(e) - { - $('#searchType').val($(this).data('value')); - $.gotoObject(); - e.stopPropagation(); - }).find('li > a').each(function() - { - var $this = $(this); - $this.attr('data-name', $this.text()); - }); - - var $allItem = $dropmenu.find('li > a[data-value="all"]'); - if($allItem.length) - { - $allItem.closest('li').addClass('search-type-all').prependTo($dropmenu); - } - - $searchQuery.on('change keyup paste input propertychange', refreshMenu).on('focus', function() - { - setTimeout(refreshMenu, 300); - }); - - $(document).on('click', hideMenu); - - $(document).on('click', function() - { - $("#upgradeContent").hide(); - }); - - $("#upgradeContent").click(function(event) - { - event.stopPropagation(); - }); - - $("#bizLink").click(function(event) - { - var $upgradeContent = $('#upgradeContent').toggle(); - if(!$upgradeContent.is(':hidden')) - { - getLatestVersion(); - event.stopPropagation(); - } - }); - - $('.has-avatar').hover(function(event) - { - $('.contextmenu').attr('class', 'contextmenu'); - $('.contextmenu-menu').attr('class', 'contextmenu-menu fade'); - }); - - $('#bars').mousedown(function() - { - $('#globalSearchInput').click(); - }); - - /* Update patch, plugin, news, publicclass from zetao.net. */ - if(isAdminUser && !isIntranet) $.get(createLink('admin', 'ajaxSetZentaoData')); -}); - -/* Change the search object according to the module and method. */ -function changeSearchObject() -{ - var appInfo = $.apps.getLastApp(); - var appPageModuleName = appInfo.$iframe[0].contentWindow.config.currentModule; - var appPageMethodName = appInfo.$iframe[0].contentWindow.config.currentMethod; - - var searchType = appPageModuleName; - if(appPageModuleName == 'product' && appPageMethodName == 'browse') var searchType = 'story'; - - var projectMethod = 'task|story|bug|build'; - if(appPageModuleName == 'project' && projectMethod.indexOf(appPageMethodName) != -1) var searchType = appPageMethodName; - - if(appPageModuleName == 'my' || appPageModuleName == 'user') var searchType = appPageMethodName; - - if(searchObjectList.indexOf(',' + searchType + ',') == -1) var searchType = 'bug'; - - if(vision == 'lite') var searchType = 'story'; - if(vision == 'or') var searchType = 'demand'; - - if(searchType == 'program') var searchType = 'program-product'; - if(searchType == 'deploystep') var searchType = 'deploy-viewstep'; - - $("#searchType").val(searchType); - $('#searchTypeMenu li:first').attr('class', 'search-type-all'); - - return searchType; -} - -function getLatestVersion() -{ - $('#globalSearchInput').click(); - $('#upgradeContent').toggle(); -} diff --git a/module/install/css/index.css b/module/install/css/index.css deleted file mode 100644 index 975c586da7..0000000000 --- a/module/install/css/index.css +++ /dev/null @@ -1,26 +0,0 @@ -h3 {font-size: 16px; margin-bottom: 20px;} -blockquote {padding: 0; border-left: 0;} -li {line-height: 2em;} -.modal-dialog {position: relative; line-height: 20px;} -.modal-header {position: absolute; right: 15px; top: 10px; border: none; z-index: 999;} -.modal-body {padding: 20px 50px;} - -.dropdown-menu {min-width: 120px; margin-top: 0;} - -.col-md-4 {width: 20%;} -.card {position: relative; display: block; padding: 0; overflow: hidden; border: 1px solid #ddd; border-radius: 0; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.075); box-shadow: 0 1px 2px rgba(0,0,0,.075); -webkit-transition: all .5s cubic-bezier(.175,.885,.32,1); -o-transition: all .5s cubic-bezier(.175,.885,.32,1); transition: all .5s cubic-bezier(.175,.885,.32,1);} - -.card .card-heading {display: block; padding: 10px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} - -.card .card-content {padding: 0 10px 10px 10px; overflow: hidden; text-overflow: ellipsis;} - -.card > .card-reveal {position: absolute; top: 100%; left: 0; width: 100%; height: 100%; background-color: #f1f1f1; -webkit-transition: all .8s cubic-bezier(.175,.885,.32,1); -o-transition: all .8s cubic-bezier(.175,.885,.32,1); transition: all .8s cubic-bezier(.175,.885,.32,1);} - -.card>.card-reveal>.card-heading {padding: 20px 10px;} -.card:hover>.card-reveal {top: 0;} - -.card.ad > .img-wrapper {height: 110px; line-height: 110px; text-align: center; font-size: 25px; width: 100%;} -.card.ad > .card-heading {text-align: center;} -.card.ad > .card-reveal > .card-heading {padding: 12px 10px 10px 15px;} -.card.ad > .card-reveal {color: #333;} -.card.ad > .card-reveal li {line-height: 1.5; font-size: 12px;} diff --git a/module/install/css/step4.css b/module/install/css/step4.css deleted file mode 100644 index d9f2770656..0000000000 --- a/module/install/css/step4.css +++ /dev/null @@ -1,15 +0,0 @@ -.panel {width: 1200px; margin: auto; padding: 0px 40px 40px 40px;} -.panel h1 {margin-top: 20px; margin-bottom: 20px;} -.panel .icon {font-size: 20px;} - -#mainContent tr td .icon-close {font-weight: bold; color: #ea644a;} -#mainContent tr td .icon-check {font-weight: bold; color: #329d38;} - -#mainContent tr th {background-color: rgb(241, 241, 241);} -#mainContent tr td {background-color: rgb(255, 255, 255); border-bottom: 1px solid rgb(238, 238, 238); border-right: 1px solid rgb(238, 238, 238);} - -.btn-wide {padding: 6px 85px;} -#useLight:hover, #useALM:hover{color: #fff; background-color: #2e7fff; border-color: transparent;} - -#mainContent .datatable {cursor: default;} -.container {padding-top: 20px;} diff --git a/module/install/css/step5.css b/module/install/css/step5.css deleted file mode 100644 index a9270b2176..0000000000 --- a/module/install/css/step5.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-company {width: 85px !important;} -.c-company-value {width: 300px !important;} diff --git a/module/install/js/license.js b/module/install/js/license.js deleted file mode 100644 index a6f1c1055b..0000000000 --- a/module/install/js/license.js +++ /dev/null @@ -1,8 +0,0 @@ -$(document).ready(function() -{ - $('#agree').change(function() - { - $('.btn-install').attr('disabled', !$(this).prop('checked')); - $('.btn-install').css('pointer-events', $(this).prop('checked') ? 'auto' : 'none'); - }); -}); diff --git a/module/install/js/step2.js b/module/install/js/step2.js deleted file mode 100644 index f88019d583..0000000000 --- a/module/install/js/step2.js +++ /dev/null @@ -1,7 +0,0 @@ -$(document).ready(function() -{ - $.get("pathinfo.php", function(result) - { - $('#requestType').val('PATH_INFO'); - }); -}); diff --git a/module/install/js/step4.js b/module/install/js/step4.js deleted file mode 100644 index 03ccc7472b..0000000000 --- a/module/install/js/step4.js +++ /dev/null @@ -1,14 +0,0 @@ -$(function() -{ - $("#useLight").click(function() - { - $('#mode').val('light'); - $('form').submit(); - }) - - $("#useALM").click(function() - { - $('#mode').val('ALM'); - $('form').submit(); - }) -}); diff --git a/module/install/js/step5.js b/module/install/js/step5.js deleted file mode 100644 index 66eaff6a09..0000000000 --- a/module/install/js/step5.js +++ /dev/null @@ -1,21 +0,0 @@ -$(function() -{ - $('#submit').click(function() - { - if($('#company').val().length == 0) - { - alert(errorEmpty.company); - return false; - } - else if($('#account').val().length == 0) - { - alert(errorEmpty.account); - return false; - } - else if($('#password').val().length == 0) - { - alert(errorEmpty.password); - return false; - } - }) -}) diff --git a/module/instance/css/upgrade.css b/module/instance/css/upgrade.css deleted file mode 100644 index dc896b7a03..0000000000 --- a/module/instance/css/upgrade.css +++ /dev/null @@ -1 +0,0 @@ -.modal-message {font-weight: bold; padding: 20px;} diff --git a/module/instance/css/view.css b/module/instance/css/view.css deleted file mode 100644 index 693f0a86bf..0000000000 --- a/module/instance/css/view.css +++ /dev/null @@ -1,32 +0,0 @@ -#mainContent .nav-tabs li>a::before {height: 0;} -.instance-name h3 {display: inline-block; padding-left: 10px;} -.instance-name > span {font-size: 14px; font-weight: bolder; padding: 3px 3px; margin: 0 5px;} -.instance-panel .btn-group .btn {width: 60px;} -.instance-panel .btn-group i {font-size: 24px;} -.instance-status span {display: inline-block; margin-right: 10px; padding-bottom: 1px;} -.instance-status i {font-size: 18px;} -.instance-source span {display: inline-block; margin-right: 10px; width: 100px;} -#senior-app-desc a {color: #61be68} -a#serialDiff {color: #ff9800;} -#seniorAppPanel span.text-info:hover {color: #2196f3;} -.instance-log .panel-body {padding-bottom: 8px; padding-left: 10px;} -.instance-log .panel-body table {margin-bottom: 0;} -.usage-box {border-radius: 3px;} -.c-title {text-align: center; padding-top: 10px; font-size: 15px} -.progress-pie {margin: 10px auto;} -.instance-panel > div > a:last-child { margin-left: 8px;} -.solution-link {display: inline-block; margin-left: 20px;} - -#backup .panel {padding: 10px;} -#backup .panel .btn-toolbar{padding: 0 0 10px 0;} -#backup .panel .panel-heading {height: 50px;} -#backup table.table {margin-bottom: 20px; width: auto;} -#backup table th.actions {padding-left: 15px;} -#backup table td>.btn {padding-left: 5px; padding-right: 5px;} -#backup .btn.btn-info[disabled] {color: rgba(255,255,255,.7); background-color: #61be68;} - -#advance .panel-title span {padding-left: 10px;} -#advance hr {margin: 5px 20px;} -#advance .scalable-input{height: 26px;} -#advance .center{text-align: center;} -#advance .hide{display: none} diff --git a/module/instance/js/upgrade.js b/module/instance/js/upgrade.js deleted file mode 100644 index ee3d82b731..0000000000 --- a/module/instance/js/upgrade.js +++ /dev/null @@ -1,30 +0,0 @@ -$(function() -{ - $('#upgradeForm').on('submit', function(event) - { - event.preventDefault(); - - var loadingDialog = bootbox.dialog( - { - message: '
      ' + instanceNotices.upgrading + '
    ', - }); - - $.post($('#upgradeForm').attr('action'), $('#upgradeForm').serializeArray()).done(function(response) - { - loadingDialog.modal('hide'); - window.parent.$('#triggerModal').modal('hide'); - - let res = JSON.parse(response); - if(res.result == 'success') - { - config.onlybody = 'no'; - window.parent.$.apps.reload('space', createLink('space', 'browse'), 'space'); - window.parent.location.reload(); - } - else - { - alert(res.message); - } - }); - }); -}); diff --git a/module/job/css/browse.css b/module/job/css/browse.css deleted file mode 100644 index 4ccf112cf1..0000000000 --- a/module/job/css/browse.css +++ /dev/null @@ -1,6 +0,0 @@ -.c-id {width: 60px !important;} -.c-repo {width: 150px;} -.c-engine {width: 100px;} -.c-frame {width: 80px;} -.c-server {width: 250px;} -.c-exec {width: 130px;} diff --git a/module/job/css/create.css b/module/job/css/create.css deleted file mode 100644 index ab92639f76..0000000000 --- a/module/job/css/create.css +++ /dev/null @@ -1,22 +0,0 @@ -.row.text-with-input .col {line-height: 32px;} -.only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} -.checkbox-primary.checkbox-inline {display: inline-block !important;} -.checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -.jktask-label {width: 326px; border-radius: 0px 4px 4px 0px;} -.search-list {max-width: 500px;} -.input-group-addon {border-radius: 2px 0px 0px 2px !important;} -button.text-right {min-width: 100px; text-align: right;} -#server_chosen .chosen-single {border-right: 0px;} -#pipelineBox {width: 385px;} -#svnDirBox .input-group {width: unset !important;} -#jenkinsServerTR .input-group-addon {border-left-width: 0 !important;} -#jenkinsServerTR .dropdown {position: relative;} -#jenkinsServerTR .table-col:first-child {width: 375px;} - -.chosen-container .chosen-drop{z-index: 1100;} /* from c20b7e7a5 */ - -#dropMenuTasks>.table-row {width: unset;} - -#paramName {width: 324px;} -#paramValue {width: 181px;} -#paramDiv .table-row {table-layout: unset;} diff --git a/module/job/css/edit.css b/module/job/css/edit.css deleted file mode 100644 index 93aa7f302b..0000000000 --- a/module/job/css/edit.css +++ /dev/null @@ -1,16 +0,0 @@ -.row.text-with-input .col {line-height: 32px;} -.only-pick-time thead th, .only-pick-time tfoot th {color: transparent !important;} -.checkbox-primary.checkbox-inline {display: inline-block !important;} -.checkbox-primary.checkbox-inline label {padding-left: 5px !important;} -#server_chosen .chosen-single {border-right: 0px;} -#pipelineBox {width: 385px;} -#svnDirBox .input-group {width: unset !important;} -#jenkinsServerTR .input-group-addon {border-left-width: 0 !important;} -#jenkinsServerTR .dropdown {position: relative;} -#jenkinsServerTR .table-col:first-child {width: 375px;} - -#paramName {width: 324px;} -#paramValue {width: 181px;} -#paramDiv .table-row {table-layout: unset;} -.jktask-label {width: 326px; border-radius: 0px 4px 4px 0px;} -.search-list {max-width: 500px;} diff --git a/module/job/css/view.css b/module/job/css/view.css deleted file mode 100644 index 2c887b7bc6..0000000000 --- a/module/job/css/view.css +++ /dev/null @@ -1,5 +0,0 @@ -#mainContent {padding: 0px; padding-top: 5px;} -th.c-side {width: 260px;} -td.pass {color: green;} -td.fail {color: red;} -#pageNav .btn-group.open ul.dropdown-menu {max-height: 350px; overflow-y: auto;} diff --git a/module/job/js/browse.js b/module/job/js/browse.js deleted file mode 100644 index b801c52f3b..0000000000 --- a/module/job/js/browse.js +++ /dev/null @@ -1,16 +0,0 @@ -$(document).ready(function() -{ - $('.icon-job-exec').parent().click(function() - { - link = $(this).attr('href'); - $.getJSON(link, function(response) - { - if(response.result == 'success') bootbox.alert(response.message); - if(response.result != 'success') bootbox.alert(response.message, function() - { - if(typeof(response.locate) == 'string') location.href = response.locate; - }); - }); - return false; - }); -}); diff --git a/module/job/js/create.js b/module/job/js/create.js deleted file mode 100644 index 48a4cb6b16..0000000000 --- a/module/job/js/create.js +++ /dev/null @@ -1,264 +0,0 @@ -$(document).ready(function() -{ - /* - * Get frame select. - * param string engine eg. jenkins|gitlab - */ - function getFrameSelect(engine) - { - $('#frameBox .input-group').empty(); - $('#frameBox .input-group').append("
    "); - var html = "'; - - $('#frameBox .loading').remove(); - $('#frameBox .input-group').append(html); - $('#frameBox #frame').chosen(); - - $('#frame').change(); - } - getFrameSelect(''); - - /* - * Check sonarqube linked. - */ - function checkSonarquebLink() - { - var repoID = $('#repo').val(); - var frame = $('#frame').val(); - - if(frame != 'sonarqube' || repoID == 0) return false; - - $.getJSON(createLink('job', 'ajaxCheckSonarqubeLink', 'repoID=' + repoID), function(result) - { - if(result.result != 'success') - { - alert(result.message); - $('#repo').val(0).trigger('chosen:updated'); - $('#reference').val('').trigger('chosen:updated'); - $('.reference').hide(); - return false; - } - }) - } - - $(document).on('change', '#repo', function() - { - var repoID = $(this).val(); - if(repoID <= 0) return; - - var link = createLink('repo', 'ajaxLoadProducts', 'repoID=' + repoID); - $.get(link, function(data) - { - if(data) - { - $('#product').replaceWith(data); - $('#product_chosen').remove(); - $('#product').chosen(); - } - }); - - /* Add new way get repo type. */ - var link = createLink('job', 'ajaxGetRepoType', 'repoID=' + repoID); - $.getJSON(link, function(data) - { - if(data.result == 'success') - { - if(data.type.indexOf('git') != -1) - { - $('.reference').show(); - $('.svn-fields').addClass('hidden'); - $('#reference option').remove(); - - $.getJSON(createLink('job', 'ajaxGetRefList', "repoID=" + repoID), function(response) - { - if(response.result == 'success') - { - $.each(response.refList, function(reference, name) - { - $('#reference').append(""); - }); - } - $('#reference').trigger('chosen:updated'); - }); - } - else - { - if($('#triggerType').val() == 'tag') $('.svn-fields').removeClass('hidden'); - - $('#svnDirBox .input-group').empty(); - $('#svnDirBox .input-group').append("
    "); - $.getJSON(createLink('repo', 'ajaxGetSVNDirs', 'repoID=' + repoID), function(tags) - { - html = "'; - $('#svnDirBox .loading').remove(); - $('#svnDirBox .input-group').append(html); - $('#svnDirBox #svnDir').chosen(); - }) - } - $('#triggerggerType option[value=tag]').html(data.type == 'gitlab' ? buildTag : dirChange).trigger('chosen:updated'); - } - }); - - /* Check exists sonarqube data. */ - checkSonarquebLink(); - }); - - $(document).on('change', '[name^=svnDir]', function() - { - var repoID = $('#repo').val(); - var selectedTag = $(this).val(); - var encodePath = $(this).find("option:selected").attr('data-encodePath'); - $(this).next('[id$=_chosen]').nextAll('[id^=svnDir]').remove(); - $(this).next('[id$=_chosen]').nextAll('[id$=_chosen]').remove(); - if(selectedTag == '/') return true; - - $('#svnDirBox .input-group').append("
    "); - $.getJSON(createLink('repo', 'ajaxGetSVNDirs', 'repoID=' + repoID + '&path=' + encodePath), function(tags) - { - html = ''; - length = $('#svnDirBox .input-group [name^=svnDir]').length; - length++; - - if(tags.length != 0) - { - html = "'; - } - - $('#svnDirBox .loading').remove(); - $('#svnDirBox .input-group').append(html); - $('#svnDirBox #svnDir' + length).chosen(); - $('#svnDir' + length + '_chosen .chosen-single').css('border-left', '0px'); - }) - }) - - $('#triggerType').change(function() - { - var type = $(this).val(); - $('.svn-fields').addClass('hidden'); - $('.comment-fields').addClass('hidden'); - $('.custom-fields').addClass('hidden'); - if(type == 'commit') $('.comment-fields').removeClass('hidden'); - if(type == 'schedule') $('.custom-fields').removeClass('hidden'); - if(type == 'tag') - { - var repoID = $('#repo').val(); - var type = 'Git'; - if(typeof(repoTypes[repoID]) != 'undefined') type = repoTypes[repoID]; - if(type == 'Subversion') $('.svn-fields').removeClass('hidden'); - } - }); - - $('#jkServer').change(function() - { - var jenkinsID = $(this).val(); - $('#jenkinsServerTR .dropdown,#jenkinsServerTR .input-group-addon').hide(); - $('#jenkinsServerTR .input-group').append("
    "); - setJenkinsJob('', ''); - - $.get(createLink('jenkins', 'ajaxGetJenkinsTasks', 'jenkinsID=' + jenkinsID), function(tasks) - { - $('#jenkinsServerTR .loading').remove(); - $('#dropMenuTasks').html(tasks); - $('#jenkinsServerTR .dropdown,.input-group-addon').show(); - }); - - /* There has been a problem with handling the prompt label. */ - $('#jkTaskLabel').remove(); - $('.jktask-label').addClass('text-right'); - }) - - $(document).on('change', '#frame', function() - { - var frame = $(this).val(); - if(frame == 'sonarqube') - { - $('tr.sonarqube').removeClass('hide'); - - /* Check exists sonarqube data. */ - checkSonarquebLink(); - } - else - { - $('tr.sonarqube').addClass('hide'); - } - }) - - $(document).on('change', '#sonarqubeServer', function() - { - var sonarqubeID = $(this).val(); - $('#sonarProject #projectKey').remove(); - $('#sonarProject #projectKey_chosen').remove(); - $('#sonarProject .input-group').append("
    "); - $.get(createLink('sonarqube', 'ajaxGetProjectList', 'sonarqubeID=' + sonarqubeID), function(html) - { - $('#sonarProject .loading').remove(); - $('#sonarProject .input-group').append(html); - $('#sonarProject #projectKey').chosen({drop_direction: 'auto'}); - }) - - /* There has been a problem with handling the prompt label. */ - $('#projectKeyLabel').remove(); - }) - - var scheduleOption = ""; - $('#engine').change(function() - { - var engine = $(this).val(); - $('.reference').hide(); - loadRepoList(engine); - $('#jenkinsServerTR').toggle(engine == 'jenkins'); - $('#gitlabServerTR').toggle(engine == 'gitlab'); - - if(engine == 'gitlab') - { - $('tr.gitlabRepo').show(); - $('tr.commonRepo').hide(); - } - //else if($('#triggerType').find('[value=schedule]').size() == 0) - else - { - $('tr.gitlabRepo').hide(); - $('tr.commonRepo').show(); - } - - getFrameSelect(engine); - }); - - $('#engine').change(); - $('#triggerType').change(); -}); - -/** - * Set jenkins job. - * - * @param string $name - * @param string $task - * @access public - * @return void - */ -function setJenkinsJob(name, task) -{ - if(name) $('.jktask-label').removeClass('text-right'); - $('#jkTask').val(task); - $('.jktask-label .text').html(name); -} diff --git a/module/job/js/edit.js b/module/job/js/edit.js deleted file mode 100644 index cf6f3884ce..0000000000 --- a/module/job/js/edit.js +++ /dev/null @@ -1,278 +0,0 @@ -$(document).ready(function() -{ - /* - * Get frame select. - * param string engine eg. jenkins|gitlab - */ - function getFrameSelect() - { - $('#frameBox .input-group').empty(); - $('#frameBox .input-group').append("
    "); - var html = "'; - - $('#frameBox .loading').remove(); - $('#frameBox .input-group').append(html); - $('#frameBox #frame').chosen(); - } - getFrameSelect(); - - /* Check sonarqube linked. */ - function checkSonarquebLink() - { - var repoID = $('#repo').val(); - var frame = $('#frame').val(); - - if(frame != 'sonarqube' || repoID == 0) return false; - - $.getJSON(createLink('job', 'ajaxCheckSonarqubeLink', 'repoID=' + repoID + '&jobID=' + job.id), function(result) - { - if(result.result != 'success') - { - alert(result.message); - $('#repo').val(0).trigger('chosen:updated'); - $('#reference').val('').trigger('chosen:updated'); - $('.reference').hide(); - return false; - } - }) - } - - $('#gitlabRepo').change(function() - { - $('#repo').val($(this).val()).change(); - }) - - $('#repo').change(function() - { - var repoID = $(this).val(); - var link = createLink('repo', 'ajaxLoadProducts', 'repoID=' + repoID); - $.get(link, function(data) - { - if(data) - { - $('#product').replaceWith(data); - $('#product_chosen').remove(); - $('#product').chosen(); - } - }); - - var type = 'Git'; - if(typeof(repoTypes[repoID]) != 'undefined') type = repoTypes[repoID]; - - $('.svn-fields').addClass('hidden'); - if(type == 'Subversion' && $('#triggerType').val() == 'tag') $('.svn-fields').removeClass('hidden'); - - $('#repoType').val(type); - $('#triggerType option[value=tag]').html(type == 'Subversion' ? dirChange : buildTag).trigger('chosen:updated'); - if(type == 'Subversion') - { - $('#svnDirBox .input-group').empty(); - $('#svnDirBox .input-group').append("
    "); - $.getJSON(createLink('repo', 'ajaxGetSVNDirs', 'repoID=' + repoID), function(tags) - { - html = "'; - $('#svnDirBox .loading').remove(); - $('#svnDirBox .input-group').append(html); - $('#svnDirBox #svnDir').chosen(); - }) - } - - /* Check exists sonarqube data. */ - checkSonarquebLink(); - }) - - $(document).on('change', '[name^=svnDir]', function() - { - var repoID = $('#repo').val(); - var selectedTag = $(this).val(); - var encodePath = $(this).find("option:selected").attr('data-encodePath'); - $(this).next('[id$=_chosen]').nextAll('[id^=svnDir]').remove(); - $(this).next('[id$=_chosen]').nextAll('[id$=_chosen]').remove(); - if(selectedTag == '/') return true; - - $('#svnDirBox .input-group').append("
    "); - $.getJSON(createLink('repo', 'ajaxGetSVNDirs', 'repoID=' + repoID + '&path=' + encodePath), function(tags) - { - html = ''; - length = $('#svnDirBox .input-group [name^=svnDir]').length; - length += 1; - if(tags.length != 0) - { - html = "'; - } - $('#svnDirBox .loading').remove(); - $('#svnDirBox .input-group').append(html); - $('#svnDirBox #svnDir' + length).chosen(); - $('#svnDirBox #svnDir' + length + '_chosen .chosen-single').css('border-left', '0px'); - }) - }) - - $('#triggerType').change(function() - { - var type = $(this).val(); - $('.svn-fields').addClass('hidden'); - $('.comment-fields').addClass('hidden'); - $('.custom-fields').addClass('hidden'); - if(type == 'commit') $('.comment-fields').removeClass('hidden'); - if(type == 'schedule') $('.custom-fields').removeClass('hidden'); - if(type == 'tag') - { - var repoID = $('#repo').val(); - var type = 'Git'; - if(typeof(repoTypes[repoID]) != 'undefined') type = repoTypes[repoID]; - if(type == 'Subversion') - { - $('.svn-fields').removeClass('hidden'); - if($('.svn-fields td .input-group select').length == 0) $('#repo').change(); - } - } - }); - - $('#jkServer').change(function() - { - var jenkinsID = $(this).val(); - $('#jenkinsServerTR .dropdown,#jenkinsServerTR .input-group-addon').hide(); - $('#jenkinsServerTR .input-group').append("
    "); - setJenkinsJob('', ''); - - $.get(createLink('jenkins', 'ajaxGetJenkinsTasks', 'jenkinsID=' + jenkinsID), function(tasks) - { - $('#jenkinsServerTR .loading').remove(); - $('#dropMenuTasks').html(tasks); - $('#jenkinsServerTR .dropdown,.input-group-addon').show(); - - if(jenkinsPipeline) - { - if(jenkinsPipeline.substr(0, 5) != '/job/') jenkinsPipeline = '/job/' + jenkinsPipeline + '/'; - document.getElementById(jenkinsPipeline).click(); - jenkinsPipeline = ''; - } - }); - - /* There has been a problem with handling the prompt label. */ - $('#jkTaskLabel').remove(); - $('.jktask-label').addClass('text-right'); - }) - - $(document).on('change', '#frame', function() - { - var frame = $(this).val(); - if(frame == 'sonarqube') - { - $('tr.sonarqube').removeClass('hide'); - - /* Check exists sonarqube data. */ - checkSonarquebLink(); - } - else - { - $('tr.sonarqube').addClass('hide'); - } - }) - - $(document).on('change', '#sonarqubeServer', function() - { - var sonarqubeID = $(this).val(); - var projectKey = sonarqubeID == job.sonarqubeServer ? job.projectKey.replace(/-/g, '*') : ''; - $('#sonarProject #projectKey').remove(); - $('#sonarProject #projectKey_chosen').remove(); - $('#sonarProject .input-group').append("
    "); - $.get(createLink('sonarqube', 'ajaxGetProjectList', 'sonarqubeID=' + sonarqubeID + '&projectKey=' + projectKey), function(html) - { - $('#sonarProject .loading').remove(); - $('#sonarProject .input-group').append(html); - $('#sonarProject #projectKey').chosen({drop_direction: 'auto'}); - }) - - /* There has been a problem with handling the prompt label. */ - $('#projectKeyLabel').remove(); - }) - - var scheduleOption = ""; - $('#engine').change(function() - { - $('#jenkinsServerTR').toggle($('#engine').val() == 'jenkins'); - $('#gitlabServerTR').toggle($('#engine').val() == 'gitlab'); - - if($(this).val() == 'gitlab') - { - $('#triggerType').find('[value=schedule]').remove(); - $('tr.gitlabRepo').show(); - $('tr.commonRepo').hide(); - } - else if($('#triggerType').find('[value=schedule]').size() == 0 ) - { - $('#triggerType').append(scheduleOption); - $('tr.gitlabRepo').hide(); - $('tr.commonRepo').show(); - } - }); - - $('#gitlabRepo').change(function() - { - $('#reference option').remove(); - - var repoID = $(this).val(); - if(repoID > 0) - { - $.getJSON(createLink('job', 'ajaxGetRefList', "repoID=" + repoID), function(response) - { - if(response.result == 'success') - { - $.each(response.refList, function(reference, name) - { - $('#reference').append(""); - }); - } - $('#reference').trigger('chosen:updated'); - }); - } - }); - - $('#engine').change(); - $('#jkServer').change(); - $('#frame').change(); - $('#sonarqubeServer').change(); - $('#triggerType').change(); -}); - -/** - * Set jenkins job. - * - * @param string $name - * @param string $task - * @access public - * @return void - */ -function setJenkinsJob(name, task) -{ - if(name) $('.jktask-label').removeClass('text-right'); - $('#jkTask').val(task); - $('.jktask-label .text').html(name); -} diff --git a/module/job/js/view.js b/module/job/js/view.js deleted file mode 100644 index cc574e257f..0000000000 --- a/module/job/js/view.js +++ /dev/null @@ -1,50 +0,0 @@ -$(function() -{ - $('td.group-toggle').click(function() - { - var dataid = $(this).closest('tr').attr('data-id'); - var $tbody = $(this).closest('tbody'); - $tbody.find('tr[data-id=' + dataid + ']').addClass('hidden'); - $tbody.find('tr.group-summary[data-id=' + dataid + ']').removeClass('hidden'); - - $('.group-collapse-all').show(); - $('.group-expand-all').hide(); - if($tbody.find('tr:not(.group-summary):not(.hidden)').length == 0) - { - $('.group-collapse-all').hide(); - $('.group-expand-all').show(); - } - }); - $('tr.group-summary.group-toggle').click(function() - { - dataid = $(this).attr('data-id'); - $(this).closest('tbody').find('tr[data-id=' + dataid + ']').removeClass('hidden'); - $(this).addClass('hidden'); - - $('.group-collapse-all').show(); - $('.group-expand-all').hide(); - }); - $('.group-collapse-all').click(function() - { - $(this).closest('table').find('tbody tr').addClass('hidden'); - $(this).closest('table').find('tbody tr.group-summary').removeClass('hidden'); - $('.group-expand-all').show(); - $(this).hide(); - }); - $('.group-expand-all').click(function() - { - $(this).closest('table').find('tbody tr').removeClass('hidden'); - $(this).closest('table').find('tbody tr.group-summary').addClass('hidden'); - $('.group-collapse-all').show(); - $(this).hide(); - }); - - $('#tabsNav .nav-tabs').on('shown.zui.tab', function(e) - { - setTimeout(function() - { - var modalHeight = $('body').height(); - parent.$('#triggerModal .modal-body').height(modalHeight); - }, 300); - }); -}) diff --git a/module/kanban/css/batchcreatecard.css b/module/kanban/css/batchcreatecard.css deleted file mode 100644 index 0e518209d7..0000000000 --- a/module/kanban/css/batchcreatecard.css +++ /dev/null @@ -1 +0,0 @@ -.c-date {width:150px;} diff --git a/module/kanban/css/closespace.css b/module/kanban/css/closespace.css deleted file mode 100644 index 9235410476..0000000000 --- a/module/kanban/css/closespace.css +++ /dev/null @@ -1 +0,0 @@ -#mainContent .c-comment {width: 50px} diff --git a/module/kanban/css/create.css b/module/kanban/css/create.css deleted file mode 100644 index a60ee0ac5a..0000000000 --- a/module/kanban/css/create.css +++ /dev/null @@ -1,31 +0,0 @@ -#mainContent .table-form>tbody>tr>th {width: 105px;} -#mainContent {padding-left: 0px;} -#mainContent .importBox .radio-inline+.radio-inline {padding-left: 20px;} -#mainContent .objectBox {padding-top: 2px;} -#mainContent .objectBox .checkbox-primary {display: inline-block;} -#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} -#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} -#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} -#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} -[lang^='en'] .columnWidth {width: 120px;} -[lang^='zh-cn'] .columnWidth {width: 80px;} - -#copyKanbanModal {padding: 0;} -#copyKanbanModal {padding: 0 2px;} -#copyKanbanModal > div {position: relative;} -#copyKanbanModal a {display: block; min-height: 30px; line-height: 30px; padding: 5px 15px; border: 1px solid #e5e5e5; color: #333; margin: 5px 0; border-radius: 3px;} -#copyKanbanModal a > i {display: inline-block; margin-right: 5px;} -#copyKanbanModal a:hover {border: 1px solid #00a9fc; background-color: #E9F2FB; text-decoration: none;} -#copyKanbanModal a.active {border-color: #00da88; color: #00da88; background-color: #E5FFE6;} -#copyKanbanModal a.active:after {position: absolute; content: '\e92f'; font-family: ZentaoIcon; font-size: 20px; right: 25px;} -#copyKanbanModal a.cancel {color: #ff5d5d;} -#copyKanbanModal .copyContentBox {display: inline-block;} -#copyKanbanModal .copyContentBox > .checkbox-primary {display: inline-block; margin-left: 10px; margin-top: -1px;} -#copyKanbanModal .copyContentBox > .checkbox-primary:first-child {margin-left: 20px;} -#copyContentbasicInfo {cursor: not-allowed;} -#team ~ #contactListMenu_chosen {vertical-align: top;} -#whitelist ~ #contactListMenu_chosen {vertical-align: bottom;} -#team ~ #contactListMenu_chosen > .chosen-drop {top: 32px;} -#whitelist ~ #contactListMenu_chosen > .chosen-drop {bottom: 32px;} -#colWidth + .fixedTip, #maxColWidth + .autoTip {margin-left: 35px; color: #2667E3; padding-top: 1px;} -[lang^=en] #colWidth + .fixedTip, [lang^=en] #maxColWidth + .autoTip, [lang^=de] #colWidth + .fixedTip, [lang^=de] #maxColWidth + .autoTip, [lang^=fr] #colWidth + .fixedTip, [lang^=fr] #maxColWidth + .autoTip {margin-left: 50px;} diff --git a/module/kanban/css/createcard.css b/module/kanban/css/createcard.css deleted file mode 100644 index d78782f62a..0000000000 --- a/module/kanban/css/createcard.css +++ /dev/null @@ -1,4 +0,0 @@ -.pri-selector .br-0 {padding-bottom: 5px;} -.required:after {left: 213px; z-index: 2;} -#estimate, .pri-selector {z-index: 3;} -.input-group > #name {padding-right: 16px;} diff --git a/module/kanban/css/createlane.css b/module/kanban/css/createlane.css deleted file mode 100644 index aebe98433b..0000000000 --- a/module/kanban/css/createlane.css +++ /dev/null @@ -1 +0,0 @@ -.table-form>tbody>tr>th {width: 160px;} diff --git a/module/kanban/css/createregion.css b/module/kanban/css/createregion.css deleted file mode 100644 index 2cb3cd8608..0000000000 --- a/module/kanban/css/createregion.css +++ /dev/null @@ -1 +0,0 @@ -#region_chosen.chosen-container .chosen-results {max-height: 115px;} diff --git a/module/kanban/css/createspace.css b/module/kanban/css/createspace.css deleted file mode 100644 index f5ad743eb1..0000000000 --- a/module/kanban/css/createspace.css +++ /dev/null @@ -1 +0,0 @@ -#mainContent {padding-left: 0px; height: 500px;} diff --git a/module/kanban/css/edit.css b/module/kanban/css/edit.css deleted file mode 100644 index bef119443d..0000000000 --- a/module/kanban/css/edit.css +++ /dev/null @@ -1,9 +0,0 @@ -#mainContent .table-form>tbody>tr>th {width: 105px;} -#mainContent {padding-left: 0px;} -#mainContent .laneHeightBox .radio-inline+.radio-inline, #mainContent .importBox .radio-inline+.radio-inline {margin-left: 20px;} -[lang^='en'] .columnWidth {width: 120px;} -[lang^='zh-cn'] .columnWidth {width: 80px;} -#team ~ #contactListMenu_chosen {vertical-align: top;} -#whitelist ~ #contactListMenu_chosen {vertical-align: bottom;} -#team ~ #contactListMenu_chosen > .chosen-drop {top: 32px;} -#whitelist ~ #contactListMenu_chosen > .chosen-drop {bottom: 32px;} diff --git a/module/kanban/css/editcard.css b/module/kanban/css/editcard.css deleted file mode 100644 index 7eb7038e96..0000000000 --- a/module/kanban/css/editcard.css +++ /dev/null @@ -1 +0,0 @@ -.table-form>tbody>tr>th {width: 70px;} diff --git a/module/kanban/css/editlanecolor.css b/module/kanban/css/editlanecolor.css deleted file mode 100644 index 1ae9a01187..0000000000 --- a/module/kanban/css/editlanecolor.css +++ /dev/null @@ -1,4 +0,0 @@ -td>ul {padding-left: 0;} -li {display: block; float: left; padding: 5px; width: 28px; height: 28px;} -li>a { position: relative; display: block; width: 100%; height: 100%; padding: 0; margin: 0; font-family: ZentaoIcon; font-size: 14px; font-style: normal; font-weight: 400; font-variant: normal; line-height: 1; text-align: center; text-transform: none; border: 1px solid transparent; border-radius: 50%; speak: none; -webkit-font-smoothing: antialiased; } -li>a.active:before {font-size: 14px; content: "\e5ca"} diff --git a/module/kanban/css/editspace.css b/module/kanban/css/editspace.css deleted file mode 100644 index 6496806503..0000000000 --- a/module/kanban/css/editspace.css +++ /dev/null @@ -1,4 +0,0 @@ -#mainContent {padding-left: 0px; height: 500px;} -#contactListMenu_chosen {vertical-align: unset;} -#teamBox .input-group .input-group-btn {vertical-align: top;} -.chosen-container .chosen-results {max-height: 200px;} diff --git a/module/kanban/css/importrelease.css b/module/kanban/css/importrelease.css deleted file mode 100644 index d0ac33b985..0000000000 --- a/module/kanban/css/importrelease.css +++ /dev/null @@ -1,2 +0,0 @@ -#releaseList > tbody > tr:hover{background-color: unset!important;} -#product_chosen {width: 45% !important} diff --git a/module/kanban/css/setcolumn.css b/module/kanban/css/setcolumn.css deleted file mode 100644 index 38087ed055..0000000000 --- a/module/kanban/css/setcolumn.css +++ /dev/null @@ -1,5 +0,0 @@ -td>ul {padding-left: 0;} -li {display: block; float: left; padding: 5px; width: 28px; height: 28px;} -li>a { position: relative; display: block; width: 100%; height: 100%; padding: 0; margin: 0; font-family: ZentaoIcon; font-size: 14px; font-style: normal; font-weight: 400; font-variant: normal; line-height: 1; text-align: center; text-transform: none; border: 1px solid transparent; border-radius: 50%; speak: none; -webkit-font-smoothing: antialiased; } -li>a.active:before {font-size: 14px; content: "\e5ca"} - diff --git a/module/kanban/css/setlane.css b/module/kanban/css/setlane.css deleted file mode 100644 index 1ae9a01187..0000000000 --- a/module/kanban/css/setlane.css +++ /dev/null @@ -1,4 +0,0 @@ -td>ul {padding-left: 0;} -li {display: block; float: left; padding: 5px; width: 28px; height: 28px;} -li>a { position: relative; display: block; width: 100%; height: 100%; padding: 0; margin: 0; font-family: ZentaoIcon; font-size: 14px; font-style: normal; font-weight: 400; font-variant: normal; line-height: 1; text-align: center; text-transform: none; border: 1px solid transparent; border-radius: 50%; speak: none; -webkit-font-smoothing: antialiased; } -li>a.active:before {font-size: 14px; content: "\e5ca"} diff --git a/module/kanban/css/setting.css b/module/kanban/css/setting.css deleted file mode 100644 index 77b8bbc587..0000000000 --- a/module/kanban/css/setting.css +++ /dev/null @@ -1,13 +0,0 @@ -#mainContent {padding-left: 0px;} -#mainContent .objectBox {padding-top: 2px;} -#mainContent .objectBox .checkbox-primary {display: inline-block;} -#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} -#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} -#mainContent .laneHeightBox .tip {color: #999;} -#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} -#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} -#mainContent table > tbody th {width: 110px !important;} -[lang^=en] .laneHeightBox > label, [lang^=de] .laneHeightBox > label, [lang^=fr] .laneHeightBox > label, [lang^=en] .importBox > label, [lang^=de] .importBox > label, [lang^=fr] .importBox > label {margin-left: 0px;} -#dataform tr > th {vertical-align: top;} -#colWidth + .fixedTip, #maxColWidth + .autoTip {margin-left: 35px; color: #2667E3; padding-top: 1px;} -[lang^=en] #colWidth + .fixedTip, [lang^=en] #maxColWidth + .autoTip, [lang^=de] #colWidth + .fixedTip, [lang^=de] #maxColWidth + .autoTip, [lang^=fr] #colWidth + .fixedTip, [lang^=fr] #maxColWidth + .autoTip {margin-left: 50px;} diff --git a/module/kanban/css/space.css b/module/kanban/css/space.css deleted file mode 100644 index 66ebfd7f95..0000000000 --- a/module/kanban/css/space.css +++ /dev/null @@ -1,48 +0,0 @@ -#spaceList {margin: 0 0; margin-bottom: 15px;} -#spaceList .spaceTitle {margin-bottom: 15px;} -#spaceList .spaceTitle > div {display: inline-block;} -#spaceList .spaceTitle .label-closed {background: #AAA !important; color: #FFF;} -#spaceList .spaceTitle .icon-zone {color: #838a9d; margin-top:100px;} -#spaceList .spaceActions {margin-top: -4px;} -#spaceList .spaceActions > a{margin-left: 10px;} -.space .menu {margin-left: 5px; margin-right:5px;} -.space .table-empty-tip {padding: 40px 10px;} -.space .spaceTitle.pull-left {overflow: hidden; white-space: nowrap; max-width: calc(100% - 220px)} -.spaceName {font-size: 16px; font-weight: bold;} -.spaceTitle .icon-cube {font-size: 16px;} -.spaceDesc {font-size: 13px; color: #838A9D; margin: -5px 0 5px 0;} -#setting .setting {margin-left: -25px; min-width: 80px} - -.kanbans > .col {width: 25% !important;} -@media screen and (max-width: 1500px) {.kanbans > .col {width: 25%;}} -.kanbans .panel {margin: 0 0; border: 1px solid #DCDCDC; border-radius: 4px; box-shadow: none; cursor: pointer; height: 160px; margin-bottom: 5px;} -.kanbans .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);} -.kanbans .panel-heading {padding: 4px 2px 10px 16px;} -.kanbans .kanban-name {overflow: hidden; white-space:nowrap; width: 90%; float: left; padding-top: 8px;} -.kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-1px !important;} -.kanbans .kanban-actions {float: right; visibility: hidden;} -.kanbans .kanban-actions .dropdown-menu.pull-right {top:31px; right: -84px; left: auto;} -.kanbans .kanban-actions .dropdown-menu.pull-left {top:31px; right:-1px; left: auto;} -.kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-6px;} -.kanbans .panel-body {padding: 0 16px 16px;} -.kanbans .kanban-desc {color: #838a9d; word-break:break-all; height: 70px; overflow: hidden; float:left;} -.kanbans .kanban-desc > * {float: left;} -.kanbans .kanban-footer {position: absolute; bottom: 10px; right: 10px; left: 15px;} -.kanbans .kanban-members {float: left; height: 24px; line-height: 24px;} -.kanbans .kanban-members > div {display: inline-block; height: 24px;} -.kanbans .kanban-members > div + div {margin-left: -5px;} -.kanbans .kanban-members > div > .avatar {display: inline-block; margin-right: 1px;} -.kanbans .kanban-members > span {display: inline-block; color: transparent; width: 2px; height: 2px; background-color: #8990a2; position: relative; border-radius: 50%; top: 3px; margin: 0 3px;} -.kanbans .kanban-members > span:before, -.kanbans .kanban-members > span:after {content: ''; display: block; position: absolute; width: 2px; height: 2px; background-color: #8990a2; top: 0; border-radius: 50%} -.kanbans .kanban-members > span:before {left: -4px;} -.kanbans .kanban-members > span:after {right: -4px;} -.kanbans .kanban-members-total {display: inline-block; margin-left: 6px; position: relative; top: 3px} -.kanbans .kanbanAcl {position: absolute; right: 0px; bottom: 2px; color: #838a9d;} -.kanbans .kanban-label {margin: 8px 6px 0px 0px; padding: 2.5px 4px; float: left; color: #ff8a53; border: 0.8px solid #ff8a53; background: none;} -@media screen and (max-width: 1366px){.kanbans .kanban-name {width: 66%;}} - -a.disabled {pointer-events: none;} - -.noBorder {border: 0px;} -.position {padding-right: 5px;} diff --git a/module/kanban/css/splitcolumn.css b/module/kanban/css/splitcolumn.css deleted file mode 100644 index 63fba87063..0000000000 --- a/module/kanban/css/splitcolumn.css +++ /dev/null @@ -1,8 +0,0 @@ -.c-nameTitle {width: 66px;} -.c-WIPTitle {width: 80px; padding-left: 15px !important; padding-right: 0px !important;} -.c-color {width: 320px;} -.c-WIPCount {width: 240px;} -.c-WIPTitle {width: 85px;} -td.required:after {right: -1px;} -.c-action {width: 80px;} -.c-action > a {padding-top: 10px;} diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css deleted file mode 100644 index b89cff1e11..0000000000 --- a/module/kanban/css/view.css +++ /dev/null @@ -1,190 +0,0 @@ -#TRAction .icon {padding: 0px 6px; font-size: 14px} - -.has-error .form-control {border-color: #ff4268!important;} -.has-error .form-control:focus {box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 6px #f5b2a5!important;} -.has-error .form-control::placeholder {color: #ff4268!important;} - -.label.text-red {background: #ff4268 !important; color: #ffffff;} - -.dropdown-menu > li {padding: 0 10px;} -.dropdown-menu > li > a > .icon {position: relative; left: -5px;} - -#kanbanContainer {padding-bottom: 0; margin-bottom: 0; border: unset;} -#kanbanContainer.fullscreen {overflow: auto;} - -.region {border: 0px solid #dcdcdc; background-color: #fff;} -.region + .region {margin-top: 10px;} -.region .region-header {padding: 10px;} -.region .region-header strong {font-size: 14px; color: #3C4353; float: left;} -.region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px} -.region .region-header .action {float: right} -.region .region-actions {float: right; position: relative; top: -6px; right: -6px;} -.region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;} -.region .kanban-header-sub-cols {margin-left: -2px;} -.region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:200px;} -.region .sort .region-header {cursor: move;} -.region .kanban.kanban-dragging {overflow: hidden;} - -.region .kanban {padding: 0px 0px 10px 0px; min-height: unset; overflow:auto; width: 100%} -.region .kanban .form-actions {margin: 0;} -.region .kanban .form-actions .btn {margin-right: 10px; min-width: 50px;} - -.region .kanban-board + .kanban-board {margin-top: 20px;} -.region .kanban-board > .kanban-header > .kanban-group-header {padding: 7px 0; width: 20px; text-align: center;} -.region .kanban-board > .kanban-header > .kanban-group-header:hover {cursor: move;} -.region .kanban-board.sort > .kanban-header {padding-left: 0;} - -.region .kanban-header {border-bottom: none!important; min-width: max-content; min-width: -moz-max-content;} -.region .kanban-header-col > .title {max-width: 80% !important;} -.region .kanban-header-col > .title {margin: 0} -.region .kanban-header-col > .title > span {display: inline-block; overflow: hidden; padding-right:2px; position: initial; vertical-align: middle;} -.region .kanban-header-col > .title > .text-grey {opacity: .5; font-weight: bold; color: #8b91a2;} -.region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;} -.region .kanban-header-col > .title > .error {color: #333333; padding-left: 2px; font-size: 10px; padding-top: 1px; padding-right: 2px;} -.region .kanban-header-col > .actions {z-index: 999; top: inherit;} -.kanban-affixed .kanban-header-col > .title > .text {color: #fff!important} -.region .kanban-header-parent-col > .actions {position: absolute; right: 0px; top: 0px !important;} -.region .kanban-header-sub-cols .actions {position: absolute; right: 0px; top: 0px !important;} - -.kanban-affixed .kanban-header-col > .title > .count {opacity:1; color: #fff!important;} -.kanban-affixed .kanban-header-col > .title > .text-grey {opacity:1; color: #fff!important;} -.kanban-affixed .kanban-header-col > .actions > .btn > .icon {opacity:1; color: #fff!important;} - -.region .kanban-lane {position: relative; border-bottom: none!important; min-height: 200px !important} - -.region .kanban-lane > .kanban-lane-name > .text {margin: auto 0;} -.region .kanban-lane > .kanban-lane-name > .actions {position: absolute; top: 0; left: 0; right: 0; opacity: 0;} -.region .kanban-lane > .kanban-lane-name > .actions > a {display: block; width: 20px; height: 20px; line-height: 20px; text-align: center; opacity: .7; color: #fff;} -.region .kanban-lane > .kanban-lane-name > .actions > a:hover {background-color: rgba(0,0,0,.2); opacity: 1;} -.region .kanban-lane > .kanban-lane-name:hover > .actions {opacity: 1;} -.region .kanban-lane.sort > .kanban-lane-name {cursor: move;} - -.region .kanban-lane-col {max-height: unset !important; overflow: auto; position: relative;} -.region .kanban-lane-col.has-scrollbar > .kanban-lane-actions {position: absolute; background-color: inherit; bottom: 0; left: 0; right: 0;} - -.kanban-item {position: relative} -.kanban-item > .kanban-card > .title {display: block; line-height: 18px;} -.kanban-item > .kanban-card > .title:hover {color: #2272eb} -.kanban-item > .kanban-card > .info {margin-top: 4px; position: relative;} -.kanban-item > .kanban-card > .info > .pri {height: 14px; border-width: 1px; font-size: 12px; line-height: 12px; min-width: 14px; padding: 0 1px;} -.kanban-item > .kanban-card > .info > .estimate{margin-left: 4px; color: #999; background-color: rgb(255, 255, 255); padding: 3px 0px} -.kanban-item > .kanban-card > .info > .time {margin-left: 4px; font-size: 12px; background: rgb(242, 242, 242)} -.kanban-item > .kanban-card > .info > .user {position: absolute; right: 0; top: -2px} -.kanban-item > .kanban-card > .info > .user > .avatar {display: inline-block; width: 24px; height: 24px; line-height: 24px; margin-right: 0px; margin-left: 2px} -.kanban-item > .kanban-card > .info > .user > span {display: inline-block; color: transparent; width: 2px; height: 2px; background-color: #8990a2; position: sticky; border-radius: 50%; top: 3px; margin: 0 7px;} -.kanban-item > .kanban-card > .info > .user > span:before, -.kanban-item > .kanban-card > .info > .user > span:after {content: ''; display: block; position: absolute; width: 2px; height: 2px; background-color: #8990a2; top: 0; border-radius: 50%} -.kanban-item > .kanban-card > .info > .user > span:before {left: -4px;} -.kanban-item > .kanban-card > .info > .user > span:after {right: -4px;} -.kanban-item > .kanban-card > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;} -.kanban-item > .kanban-card > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;} -.kanban-item:hover > .actions {opacity: 1;} -.kanban-item .has-color .title, -.kanban-item .has-color .actions .icon-more-v, -.kanban-item .has-color .info > .label-pri, -.kanban-item .has-color .info > .estimate, -.kanban-item .has-color .info > .user .label-teamSumCount, -.kanban-item .has-color .info > .label-light {color: #FFFFFF;} -.kanban-item .has-color .info > .label-pri {border-color: #FFFFFF;} -.kanban-item .has-color .progress-box > .progress-number {color: #FFFFFF;} -.kanban-item .item-more {position: absolute; right: 6px; top: 0px;} - -.kanban-card {height: auto !important; padding: 8px 14px !important; min-height: 60px;} -.kanban-card > .title, .kanban-card > .productplanTitle, .kanban-card > .releaseTitle, .kanban-card > .buildTitle {word-break: break-all;} -.kanban-card > .info {position: relative; margin-top: 5px} -.kanban-card > .info > .info + .info {margin-left: 8px} -.kanban-card:hover > .actions {opacity: 1;} -.kanban-card > .actions {position: absolute; top: 4px; right: 4px; opacity: 0;} -.kanban-card > .actions > a {display: block; float: left; width: 20px; height: 20px; line-height: 20px; text-align: center; border-radius: 4px; opacity: .7;} -.kanban-card > .actions > a:hover {background-color: rgba(0,0,0,.075); opacity: 1;} -.kanban-card .productplanDesc, .kanban-card .buildDesc {color: #838a9d; overflow: hidden; white-space:nowrap; text-overflow: clip;} - -.cardcolor {width:40px; height: 14px; float: left; margin-left: 5px; margin-right: 5px; margin-top: 2px; border-radius: 2px;} -#cardcolormenu {padding:2px 2px; width: 100px;} - -.region-header {margin-top: -6px;} -.region-header > .icon{padding: 6px; margin-left:2px;} -.kanban-col[data-type=ADD] {display: none;} -.kanban-col[data-type=EMPTY] {display: none;} -.kanban-col {padding: 0px !important;} -.kanban-col.drag-shadow {background-color: #ededed !important; border-color: #ededed!important; box-shadow: 0 4px 10px 0 rgb(0,0,0, 0.05), 0 4px 20px 0 rgb(0,0,0, .3); min-height: 30px!important;} -.kanban-col.drag-shadow .kanban-header-col {min-height: 30px!important;} -.kanban-header-has-parent .kanban-header-cols > .kanban-col.drag-shadow, -.kanban-col.kanban-header-parent-col.drag-shadow {min-height: 64px!important;} -.kanban-col.drag-shadow > .actions {visibility: hidden!important;} -.kanban-item .title {padding-right: 10px;} -.gray .actions {display:none;} -.kanban-cols-sorting .kanban-item {visibility: hidden!important;} - -.kanban-card .header .executionName {display: flex; width: 100%; float: left;} -.kanban-card .header .executionName .title {padding-right: 0px; margin-right: 5px; overflow: hidden; white-space: nowrap;} -.kanban-card .header .executionName > span {flex: none;} -.execInfo, .releaseInfo, .productplanInfo {margin-top: 22px;} -.label-wait {background: #EFEFEF !important; color: #838A9D;} -.label-doing {background: #f8d2d2 !important; color: #e64b4c;} -.label-suspended {background: #fff3d9 !important; color: #ff9800;} -.label-future {background: #EFEFEF !important; color: #838A9D; border-radius: 9px} -.label-done {background: #dfe9d8 !important; color: #429b16;} -.label-closed, .label-terminate {background: #e5e5e5 !important; color: #b8b8b8;} -.label-deleted {background: #ff5d5d !important; color: #fff;} -.label-normal {background: #e1e8d9 !important; color: #9abe76;} -.kanban-item > .kanban-card > .execInfo > .user, .kanban-item > .kanban-card > .releaseInfo > .user, .kanban-item > .kanban-card > .productplanInfo > .user {float:right} -.kanban-item > .kanban-card > .execInfo > .user > .avatar, .kanban-item > .kanban-card > .releaseInfo > .user > .avatar, .kanban-item > .kanban-card > .productplanInfo > .user > .avatar {display: inline-block; width: 24px; height: 24px; line-height: 24px; margin-right: 0px; margin-left: 2px} -.kanban-card .releaseTitle .icon, .kanban-card .title .icon, .kanban-card .productplanTitle .icon, .kanban-card .title .icon, .kanban-card .buildTitle .icon{padding-right: 5px;} -.kanban-card .label-finish {margin-right: 7px; margin-top: -1px; padding: 3px 5px; float: left; background-color:#2a5f29;} -.kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;} -.kanban-card .productplanDesc {min-width: 100%;} - -.progress-box {width:100%; display: flex; flex-direction: row; margin-top: 10px;} -.progress {flex: auto; margin: 5px auto 5px;} -.progress-number {padding-left: 5px;} -.region .region-header .action {float: left;} - -@-moz-document url-prefix(){ .region .kanban-lane-items{scrollbar-width:thin; padding:5px 0px 5px 5px !important;} .region .kanban-card .info .user{right: -6px !important;}} -#archivedCards .table-empty-tip {border-style: hidden;} -#archivedColumns .table-empty-tip {border-style: hidden;} - -#main > .container {padding: 0px; margin-top: -5px; margin-right: auto; margin-left: auto;} -@media screen and (max-width: 1366px){#main > .container {padding: 0px; margin: -10px 0px 0px 0px;}} -.panel-body {padding: 0px;} -#kanbanContainer {background: #efefef; box-shadow: none;} - -.region .kanban-board .kanban-header-col.left {padding-left: 5px;} -.region .kanban-board .kanban-header-col.left > .title, .region .kanban-board .kanban-header-parent-col > .kanban-header-col.left {justify-content: flex-start;} -.region .kanban-board .kanban-header-col > .title > span {max-width: calc(100% - 100px) !important;} -.region .kanban-board .kanban-header-parent-col > .kanban-header-col > .title {max-width: 100% !important;} -.region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > span {max-width: calc(100% - 165px) !important;} -.region .kanban-board .kanban-header-sub-cols .kanban-header-col.left > .title > span {max-width: calc(100% - 120px) !important;} -.executionName .delayed {margin-right: 10px;} -.region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > .text {max-width: calc(100% - 172px) !important;} - -#kanbanBox {position: relative;} -#regionTabs {background-color: #efefef; z-index: 100; display: flex; align-items: center; gap: 1.5rem; justify-content: space-between;} -#regionTabs .leftBtn.disabled i, #regionTabs .rightBtn.disabled i{color: #c2c2c2;} -#regionTabs .leftBtn i, #regionTabs .rightBtn i{vertical-align: 1px;} -#regionTabs .icon-angle-left, #regionTabs .icon-angle-right {font-size: 20px; vertical-align: -webkit-baseline-middle;} -#regionNavTabs {display: inline-flex; overflow: hidden;} -.leftBtn.hidden + #regionNavTabs {padding-left: 10px;} -#regionNavTabs > ul {display: inline-flex; border-bottom: none; margin-bottom: -3px;} -#regionNavTabs > ul > li {padding: 0; text-align: center;} -#regionNavTabs > ul > li > a {min-width: 134px; overflow: hidden; white-space: nowrap; z-index: 0; position: relative; padding: 1.7rem; margin-left: -20px; background: none; outline: 0; cursor: pointer !important;} -#regionNavTabs > ul > li:first-child > a {margin-left: 0;} -#regionNavTabs > ul > li.active > a {z-index: 1;} -#regionNavTabs > ul > li.active > a::before {background-color: #fff;} -#regionNavTabs > ul > li > a:before {content: ""; position: absolute; top: -1rem; left: 0; background: #f8f8f8; height: 100%; width: 100%; z-index: -1; border-top-left-radius: 1rem; border-top-right-radius: 1rem; transform: perspective(0.5rem) rotateX(2deg); transform-origin: bottom;} -#regionNavTabs > ul > li > a > span {vertical-align: bottom; overflow: hidden; max-width: 6em; white-space: nowrap; display: inline-block;} -#regionNavTabs > ul > li.active > a > span {color: #2b80ff!important;} -#regionTabs.affixed {margin-bottom: 5px; position: fixed; top: 0px;} -#regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header {margin-top: 43px;} -#regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header + .kanban-lane {margin-top: 38px;} -#regionTabs.affixed ul {margin-bottom: -10px;} -#regionTabs.affixed ul > li {margin-bottom: 0px !important;} -#regionTabs .region-actions .dropdown-menu {top: 25px;} -#region-tab-actions {display: none;} -#region-tab-actions.active {display: flex;} -.region {display: none;} -.region.active {display: block;} -.region.active.notAll {margin-top: -5px;} -.region.active.notAll .region-header {display: none;} -.region.active.notAll .kanban, .region.active.notAll .kanban .kanban-header {background-color: #efefef;} -.kanban-card a[disabled] {color: #313c52;} diff --git a/module/kanban/css/viewcard.css b/module/kanban/css/viewcard.css deleted file mode 100644 index 5644fd1cf9..0000000000 --- a/module/kanban/css/viewcard.css +++ /dev/null @@ -1,2 +0,0 @@ -[lang^='en'] .table-data tbody>tr>th {width: 100px;} -.pull-left div {float: left !important;} diff --git a/module/kanban/js/batchcreatecard.js b/module/kanban/js/batchcreatecard.js deleted file mode 100644 index 76e90547b8..0000000000 --- a/module/kanban/js/batchcreatecard.js +++ /dev/null @@ -1,27 +0,0 @@ -$(document).on('change', "[name^='begin'], [name^='end']", function() -{ - toggleCheck($(this)); -}) -/** - * Toggle checkbox. - * - * @param object $obj - * @access public - * @return void - */ -function toggleCheck(obj) -{ - var $this = $(obj); - var date = $this.val(); - var $ditto = $this.closest('div').find("input[type='checkBox']"); - if(date == '') - { - $ditto.attr('checked', true); - $ditto.closest('.input-group-addon').show(); - } - else - { - $ditto.removeAttr('checked'); - $ditto.closest('.input-group-addon').hide(); - } -} diff --git a/module/kanban/js/create.js b/module/kanban/js/create.js deleted file mode 100644 index abd57b36b6..0000000000 --- a/module/kanban/js/create.js +++ /dev/null @@ -1,101 +0,0 @@ -$(function() -{ - if(enableImport == 'off') - { - $("input[name^='importObjectList']").attr('disabled', 'disabled'); - $('td.objectBox').hide(); - } - $("input[id='copyContentbasicInfo']").click(function(){return false;}) - - copyRegion = $("input[id='copyContentregion']").prop('checked'); - $("input[id='copyContentregion']").click(function() - { - copyRegion = $(this).prop('checked'); - $('#copyRegion').val(copyRegion); - }); - - $("input[name='import']").change(function() - { - if($(this).val() == 'off') - { - $("input[name^='importObjectList']").attr('disabled', 'disabled'); - $('td.objectBox').hide(); - } - else - { - $("input[name^='importObjectList']").removeAttr('disabled'); - $('td.objectBox').show(); - } - }) - - $("input[name^='importObjectList']").change(function() - { - if($("input:checked[name^=importObjectList]").length != 0 && !$('#emptyTip').is('.hidden')) $('#emptyTip').addClass('hidden'); - }) - - $('#submit').click(function() - { - var enableImport = $("input:checked[name='import']").val(); - var objectListLength = $("input:checked[name^=importObjectList]").length; - - if(enableImport == 'on' && objectListLength == 0 && vision != 'lite') - { - $('#emptyTip').removeClass('hidden'); - return false; - } - }) - - $(document).on('click', '#copyKanbans a', function() - { - setCopyKanban($(this).data('id')); $('#copyKanbanModal').modal('hide'); - }); - handleKanbanWidthAttr(); -}) - -/** - * Set copy kanban. - * - * @param int $kanbanID - * @access public - * @return void - */ -function setCopyKanban(kanbanID) -{ - var extra = copyRegion ? '&extra=copyRegion=' + copyRegion : ''; - location.href = createLink('kanban', 'create', 'spaceID=' + spaceID + '&type=' + spaceType + '©KanbanID=' + kanbanID + extra); -} - -/** - * When space type change. - * - * @oaram int spaceID - * @param string type - * @access public - * @return void - */ -function changeValue(spaceID, type) -{ - if(typeof type === 'undefined') type = spaceType; - location.href = createLink('kanban', 'create', 'spaceID=' + spaceID + '&type=' + type); -} - -/** - * The team or whitelist member that loads kanban. - * - * @oaram int spaceID - * @access public - * @return void - */ -function loadUsers(spaceID) -{ - var field = spaceType == 'private' ? 'whitelist' : 'team'; - var link = createLink('kanban', 'ajaxLoadUsers', 'spaceID='+ spaceID + '&field=' + field + '&selectedUser=' + $('#' + field).val()); - $.get(link, function(data) - { - $('#' + field).replaceWith(data); - $('#' + field).next('.picker').remove(); - $('#' + field).picker(); - }); - - if(spaceType != 'private') loadOwners(spaceID); -} diff --git a/module/kanban/js/createcolumn.js b/module/kanban/js/createcolumn.js deleted file mode 100644 index 1752625ded..0000000000 --- a/module/kanban/js/createcolumn.js +++ /dev/null @@ -1,24 +0,0 @@ -$(function() -{ - initColorPicker(); - $('#noLimit').click(function() - { - if($(this).attr('checked') == 'checked') - { - $('#WIPCount').val(''); - $('#WIPCount').attr('disabled', true); - } - else - { - $('#WIPCount').removeAttr('disabled'); - } - }) -}) - -function setWIPLimit() -{ - var count = $('#WIPCount').val(); - if($('#noLimit').attr('checked') == 'checked') count = -1; - - $('#limit').val(count); -} diff --git a/module/kanban/js/createlane.js b/module/kanban/js/createlane.js deleted file mode 100644 index c963df8dad..0000000000 --- a/module/kanban/js/createlane.js +++ /dev/null @@ -1,9 +0,0 @@ -$(document).ready(function() -{ - initColorPicker(); - - $('input[name=mode]').change(function() - { - $('#otherLane').parents('tr').toggle($(this).val() == 'sameAsOther'); - }); -}) diff --git a/module/kanban/js/editlanecolor.js b/module/kanban/js/editlanecolor.js deleted file mode 100644 index a01570f547..0000000000 --- a/module/kanban/js/editlanecolor.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Set lane color. - * - * @param string $color - * @access public - * @return void - */ -function setColor(color) -{ - $('.cp-tile').removeClass('active'); - $('.cp-tile[data-color="' + color + '"]').addClass('active'); - $('#color').val(color); -} diff --git a/module/kanban/js/setcolumn.js b/module/kanban/js/setcolumn.js deleted file mode 100644 index a01570f547..0000000000 --- a/module/kanban/js/setcolumn.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Set lane color. - * - * @param string $color - * @access public - * @return void - */ -function setColor(color) -{ - $('.cp-tile').removeClass('active'); - $('.cp-tile[data-color="' + color + '"]').addClass('active'); - $('#color').val(color); -} diff --git a/module/kanban/js/setlane.js b/module/kanban/js/setlane.js deleted file mode 100644 index a01570f547..0000000000 --- a/module/kanban/js/setlane.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Set lane color. - * - * @param string $color - * @access public - * @return void - */ -function setColor(color) -{ - $('.cp-tile').removeClass('active'); - $('.cp-tile[data-color="' + color + '"]').addClass('active'); - $('#color').val(color); -} diff --git a/module/kanban/js/setting.js b/module/kanban/js/setting.js deleted file mode 100644 index c3b33282c5..0000000000 --- a/module/kanban/js/setting.js +++ /dev/null @@ -1,55 +0,0 @@ -$(function() -{ - var heightType = $("[name='heightType']:checked").val(); - setCardCount(heightType); - - if(enableImport == 'off') - { - $("input[name^='importObjectList']").attr('disabled', 'disabled'); - $('td.objectBox').hide(); - } - - $("input[name='import']").change(function() - { - if($(this).val() == 'off') - { - $("input[name^='importObjectList']").attr('disabled', 'disabled'); - $('td.objectBox').hide(); - } - else - { - $("input[name^='importObjectList']").removeAttr('disabled'); - $('td.objectBox').show(); - } - }) - - $("input[name^='importObjectList']").change(function() - { - if($("input:checked[name^=importObjectList]").length != 0 && !$('#emptyTip').is('.hidden')) $('#emptyTip').addClass('hidden'); - }) - - $('#submit').click(function() - { - var enableImport = $("input:checked[name='import']").val(); - var objectListLength = $("input:checked[name^=importObjectList]").length; - - if(enableImport == 'on' && objectListLength == 0 && vision != 'lite') - { - $('#emptyTip').removeClass('hidden'); - return false; - } - }) - handleKanbanWidthAttr(); -}) - -/** - * Set card count. - * - * @param string $heightType - * @access public - * @return void - */ -function setCardCount(heightType) -{ - heightType != 'custom' ? $('#cardBox').addClass('hidden') : $('#cardBox').removeClass('hidden'); -} diff --git a/module/kanban/js/setwip.js b/module/kanban/js/setwip.js deleted file mode 100644 index a5671f0ab5..0000000000 --- a/module/kanban/js/setwip.js +++ /dev/null @@ -1,29 +0,0 @@ -$(function() -{ - $('#noLimit').click(function() - { - if($(this).attr('checked') == 'checked') - { - $('#WIPCount').val(''); - $('#WIPCount').attr('disabled', true); - } - else - { - $('#WIPCount').removeAttr('disabled'); - } - }) -}) - -/** - * Set WIP count. - * - * @access public - * @return void - */ -function setWIPLimit() -{ - var count = $('#WIPCount').val(); - if($('#noLimit').attr('checked') == 'checked') count = -1; - - $('#limit').val(count); -} diff --git a/module/kanban/js/space.js b/module/kanban/js/space.js deleted file mode 100644 index 4f39482177..0000000000 --- a/module/kanban/js/space.js +++ /dev/null @@ -1,68 +0,0 @@ -/* Make cards clickable. */ -var $kanbans = $('.kanbans'); -$kanbans.on('click', '.panel', function(e) -{ - if(!$(e.target).closest('.kanban-actions').length) - { - window.location.href = $(this).data('url'); - } -}); - -/* Display drop-down menu.*/ -$('.panel').mouseenter(function(e) -{ - $('.kanban-actions' + e.currentTarget.parentElement.dataset.id).css('visibility','visible'); -}); - -/* Hide drop-down menu. */ -$('.panel').mouseleave(function(e) -{ - $('.kanban-actions').css('visibility','hidden'); - $('.dropdown').removeClass('open'); -}); - -$(function() -{ - $('input[name^="showClosed"]').click(function() - { - var showClosed = $(this).is(':checked') ? 1 : 0; - $.cookie('showClosed', showClosed, {expires:config.cookieLife, path:config.webRoot}); - window.location.reload(); - }); -}); - -(function() -{ - /* Expand or collapse text */ - function limitText() - { - var fullText; - var limitText; - var $text = $(this); - var options = $.extend({limitSize: 40, suffix: '…'}, $text.data()); - var text = $text.text(); - if(text.length > options.limitSize) - { - fullText = $text.html(); - limitText = text.substring(0, options.limitSize) + options.suffix; - $text.text(limitText).addClass('limit-text-on'); - - var $toggleBtn = options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle'); - $toggleBtn.text($toggleBtn.data('textExpand')); - $toggleBtn.on('click', function() - { - var isLimitOn = $text.toggleClass('limit-text-on').hasClass('limit-text-on'); - if(isLimitOn) $text.text(limitText); - else $text.html(fullText); - $toggleBtn.text($toggleBtn.data(isLimitOn ? 'textExpand' : 'textCollapse')); - }); - } - else - { - (options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle')).hide(); - } - $text.removeClass('hidden'); - }; - $.fn.textLimit = function(){return this.each(limitText);}; - $(function(){$('.text-limit').textLimit();}); -})(); diff --git a/module/kanban/js/splitcolumn.js b/module/kanban/js/splitcolumn.js deleted file mode 100644 index a8fcd46ad2..0000000000 --- a/module/kanban/js/splitcolumn.js +++ /dev/null @@ -1,28 +0,0 @@ -$(document).on('click', "[id^='noLimit']", function() -{ - var index = $(this).attr('id').slice(7); - if($(this).attr('checked') == 'checked') - { - $('#WIPCount' + index).val(''); - $('#WIPCount' + index).attr('disabled', true); - } - else - { - $('#WIPCount' + index).removeAttr('disabled'); - } -}); - -function addItem(obj) -{ - var item = $('#addItem').html().replace(/%i%/g, i); - $(obj).closest('tr').after('' + item + ''); - $('.colorpicker #color' + i).colorPicker(); - - i ++; -} - -function deleteItem(obj) -{ - if($('#columnForm .table tbody').children('tr').length < 4) return false; - $(obj).closest('tr').remove(); -} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js deleted file mode 100644 index 41e2398cbe..0000000000 --- a/module/kanban/js/view.js +++ /dev/null @@ -1,2099 +0,0 @@ -/** - * Load more. - * - * @param string $type - * @param int $regionID - * @access public - * @return void - */ -function loadMore(type, regionID) -{ - var method = 'viewArchived' + type; - var selector = '#archived' + type + 's'; - var link = createLink('kanban', method, 'regionID=' + regionID); - $(selector).load(link, function() - { - var windowHeight = $(window).height(); - var affixedHeight = $('#regionTabs.affixed').height() + $('#kanbanContainer .kanban-affixed .kanban-cols').height(); - $(selector + ' .panel-body').css('height', windowHeight - affixedHeight); - $(selector).css('top', affixedHeight); - $(selector).animate({right: 0}, 500); - }); -} - -/** - * Hide kanban actions. - * - * @access public - * @return void - */ -function hideAllAction() -{ - $('.actions').hide(); - $('.action').hide(); - $('.kanban-group-header').hide(); - $(".title").attr("disabled", true).css("pointer-events", "none"); - $('.kanban-col.kanban-header-col').css('padding', '0px 0px 0px 0px'); - window.sortableDisabled = true; -} - -/** - * Display the kanban in full screen. - * - * @access public - * @return void - */ -function fullScreen() -{ - var element = document.getElementById('kanbanContainer'); - var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen; - - if(requestMethod) - { - var afterEnterFullscreen = function() - { - $('#kanbanContainer').addClass('fullscreen') - .on('scroll', tryUpdateKanbanAffix); - hideAllAction(); - $.cookie('isFullScreen', 1); - }; - - var whenFailEnterFullscreen = function(error) - { - exitFullScreen(); - }; - - try - { - var result = requestMethod.call(element); - if(result && (typeof result.then === 'function' || result instanceof window.Promise)) - { - result.then(afterEnterFullscreen).catch(whenFailEnterFullscreen); - } - else - { - afterEnterFullscreen(); - } - } - catch (error) - { - whenFailEnterFullscreen(error); - } - } -} - -/** - * Exit full screen. - * - * @access public - * @return void - */ -function exitFullScreen() -{ - $('.region-actions > div > .action').show(); - $(".title").attr("disabled", false).css("pointer-events", "auto"); - if(!CRKanban && kanban.status == 'closed') return; - $('#kanbanContainer').removeClass('fullscreen') - .off('scroll', tryUpdateKanbanAffix); - $('.actions').show(); - $('.action').show(); - $('.kanban-group-header').show(); - $('.kanban-col.kanban-header-col').css('padding', '0px 30px'); - window.sortableDisabled = false; - $.cookie('isFullScreen', 0); -} - -document.addEventListener('fullscreenchange', function (e) -{ - if(!document.fullscreenElement) exitFullScreen(); -}); - -document.addEventListener('webkitfullscreenchange', function (e) -{ - if(!document.webkitFullscreenElement) exitFullScreen(); -}); - -document.addEventListener('mozfullscreenchange', function (e) -{ - if(!document.mozFullScreenElement) exitFullScreen(); -}); - -document.addEventListener('msfullscreenChange', function (e) -{ - if(!document.msfullscreenElement) exitFullScreen(); -}); - -/** - * Render header of a column. - */ -function renderHeaderCol($column, column, $header, kanbanData) -{ - /* Render group header. */ - var privs = kanbanData.actions; - var columnPrivs = $column.data().col.actions; - - if(privs.includes('sortGroup')) - { - var groups = regions[column.region].groups; - if($header.closest('.kanban').data('zui.kanban')) - { - groups = $header.closest('.kanban').data('zui.kanban').data; - } - if(groups.length > 1) - { - $column.closest('.kanban-board').addClass('sort'); - $column.closest('.kanban-header').find('.kanban-group-header').remove(); - $column.closest('.kanban-header').prepend('
    '); - } - } - - var laneID = column.$kanbanData.lanes[0].id ? column.$kanbanData.lanes[0].id : 0; - var printMoreBtn = (columnPrivs.includes('setColumn') || columnPrivs.includes('setWIP') || columnPrivs.includes('createColumn') || columnPrivs.includes('copyColumn') || columnPrivs.includes('archiveColumn') || columnPrivs.includes('deleteColumn') || columnPrivs.includes('splitColumn')); - - /* Render more menu. */ - if(columnPrivs.includes('createCard') || printMoreBtn) - { - var addItemBtn = ''; - var moreAction = ''; - - if(!$column.children('.actions').length) $column.append('
    '); - var $actions = $column.children('.actions'); - if(column.parent != -1) - { - addItemBtn = [''].join(''); - } - - var moreAction = ' '; - if(CRKanban || kanban.status != 'closed') $actions.html(addItemBtn + moreAction); - - } - if(columnPrivs.includes('sortColumn')) - { - if($column.hasClass('kanban-header-parent-col')) - { - $column.children('.kanban-header-col').addClass('sort'); - } - else - { - $column.addClass('sort'); - } - } - - if(alignment == 'left') - { - if($column.hasClass('kanban-header-parent-col')) - { - $column.children('.kanban-header-col').addClass('left'); - } - else - { - $column.addClass('left'); - } - } -} - -/** - * Render items count of a column. - */ -function renderCount($count, count, column) -{ - /* Render WIP. */ - var limit = !column.limit || column.limit == '-1' ? '' : column.limit; - if($count.parent().find('.limit').length) - { - $count.parent().find('.limit').html(limit); - } - else - { - $count.parent().find('.count').before("("); - $count.parent().find('.count').after("/" + limit + ")"); - } - - if(column.limit != -1 && column.limit < count) - { - $count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent'); - $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 200); - $count.css({'color': '#FF5D5D', 'opacity': '1'}); - if(!$count.parent().find('.error').length) $count.parent().find('.include-last').after(""); - $count.parents('.title').find('.text-grey').css({'color': '#FF5D5D', 'opacity': '1'}); - } - else - { - $count.parents('.title').parent('.kanban-header-col').css('background-color', 'transparent'); - $count.parents('.title').find('.text').css('max-width', $count.parents('.title').width() - 120); - $count.css({'color': '#8b91a2', 'opacity': '0.5'}); - $count.parent().find('.error').remove(); - $count.parents('.title').find('.text-grey').css({'color': '#8b91a2', 'opacity': '0.5'}); - } -} - -/** - * Render lane name. - * - * @param object $lane - * @param object lane - * @param object $kanban - * @param object columns - * @param object kanban - * @access public - * @return void - */ -function renderLaneName($lane, lane, $kanban, columns, kanban) -{ - var canEditLaneColor = lane.actions.includes('editLaneColor'); - var canEditLaneName = lane.actions.includes('editLaneName'); - var canSort = lane.actions.includes('sortLane') && kanban.lanes.length > 1; - var canDelete = lane.actions.includes('deleteLane'); - - $lane.parent().toggleClass('sort', canSort); - - if(!$lane.children('.actions').length && (canEditLaneColor || canEditLaneName || canDelete) && (CRKanban || kanbanInfo.status != 'closed')) - { - $([ - '
    ', - '', - '', - '', - '
    ' - ].join('')).appendTo($lane); - } - if($.cookie('isFullScreen') == 1) hideAllAction(); -} - -/** - * Render avatars of user. - * @param {String|{account: string, avatar: string}} user User account or user object - * @returns {string} - */ -function renderUsersAvatar(users, itemID, size) -{ - var avatarSizeClass = 'avatar-' + (size || 'md'); - - if(users.length == 0 || (users.length == 1 && users[0] == '')) - { - return $('
    '); - } - - var assignees = []; - for(var user of users) - { - var $noPrivAndNoAssigned = $('
    '); - if(!priv.canAssignCard && !user) - { - assignees.push($noPrivAndNoAssigned); - continue; - } - - if(!user) - { - assignees.push($('
    ')); - continue; - } - - if(typeof user === 'string') user = {account: user}; - if(!user.avatar && window.userList && window.userList[user.account]) user = window.userList[user.account]; - if(!user.name && window.users && window.users[user.account]) user.name = window.users[user.account]; - - assignees.push($('
    ').avatar({user: user})); - } - - if(assignees.length > 3) assignees.splice(3, assignees.length - 3, '...'); - - return assignees; -} - - -/** - * The function for rendering kanban item - */ -function renderKanbanItem(item, $item) -{ - var whiteStyle = null; - if(item.color == '#2a5f29' || item.color == '#b10b0b' || item.color == '#cfa227') whiteStyle = 'style="color:#FFFFFF"'; - - var privs = item.actions; - var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor')); - var $actions = $item.children('.actions'); - var $title = $item.children('.title'); - if(printMoreBtn && !$actions.length && (CRKanban || kanban.status != 'closed')) - { - $( - [ - '
    ', - '', - '', - '', - '
    ' - ].join('')).appendTo($item); - } - - if(item.fromType == 'execution') - { - renderExecutionItem(item, $item); - } - else if(item.fromType == 'release') - { - renderReleaseItem(item, $item); - } - else if(item.fromType == 'build') - { - renderBuildItem(item, $item); - } - else if(item.fromType == 'productplan') - { - renderProductplanItem(item, $item); - } - else if(item.fromType == 'ticket') - { - renderTicketItem(item, $item); - } - else - { - if(!$title.length) - { - if(privs.includes('viewCard')) $title = $('').appendTo($item).attr('href', createLink('kanban', 'viewCard', 'cardID=' + item.id, '', true)); - if(!privs.includes('viewCard')) $title = $('

    ').appendTo($item); - } - $title.text(item.name).attr('title', item.name); - - var $info = $item.children('.info'); - if(!$info.length) $info = $( - [ - '
    ', - '', - '', - '', - '
    ', - '
    ' - ].join('')).appendTo($item); - - $item.data('card', item); - - $info.children('.estimate').text(item.estimate + kanbancardLang.lblHour); - item.estimate > 0 ? $info.children('.estimate').show() : $info.children('.estimate').hide(); - - $info.children('.pri') - .attr('class', 'pri' + (item.pri ? ' label-pri label-pri-' + item.pri : '')) - .text(item.pri); - - var $time = $info.children('.time'); - if(item.end == '0000-00-00' && item.begin == '0000-00-00') - { - $time.hide(); - } - else - { - var today = new Date(); - var begin = $.zui.createDate(item.begin); - var end = $.zui.createDate(item.end); - var needRemind = (begin.toLocaleDateString() == today.toLocaleDateString() || end.toLocaleDateString() == today.toLocaleDateString()); - if(item.end == '0000-00-00' && item.begin != '0000-00-00') - { - $time.text($.zui.formatDate(begin, 'MM/dd') + ' ' + kanbancardLang.beginAB).attr('title', $.zui.formatDate(begin, 'yyyy/MM/dd') + ' ' +kanbancardLang.beginAB).show(); - } - else if(item.begin == '0000-00-00' && item.end != '0000-00-00') - { - $time.text($.zui.formatDate(end, 'MM/dd') + ' ' + kanbancardLang.deadlineAB).attr('title', $.zui.formatDate(end, 'yyyy/MM/dd') + ' ' + kanbancardLang.deadlineAB).show(); - } - else if(item.begin != '0000-00-00' && item.end != '0000-00-00') - { - $time.text($.zui.formatDate(begin, 'MM/dd') + ' ' + kanbancardLang.to + ' ' + $.zui.formatDate(end, 'MM/dd')).attr('title', $.zui.formatDate(begin, 'yyyy/MM/dd') + kanbancardLang.to + $.zui.formatDate(end, 'yyyy/MM/dd')).show(); - } - - if(!$item.hasClass('has-color') && needRemind) $time.css('background-color', 'rgba(210, 50, 61, 0.3)'); - if($item.hasClass('has-color') && needRemind) $time.css('background-color', 'rgba(255, 255, 255, 0.3)'); - if(!needRemind) $time.css('background-color', 'rgba(0, 0, 0, 0.15)'); - } - - /* Display avatars of assignedTo. */ - var assignedTo = item.assignedTo.split(','); - var $user = $info.children('.user'); - var title = []; - for(i = 0; i < assignedTo.length; i++) title.push(users[assignedTo[i]]); - $user.html(renderUsersAvatar(assignedTo, item.id)).attr('title', title); - } - - if(kanban.performable == 1 && (item.fromType == '' || item.fromType == 'execution')) - { - var $progress = $item.children('.progress-box'); - if(!$progress.length) $progress = $('
    ' + item.progress + '%
    ').appendTo($item); - $progress.find('.progress-bar').css('width', item.progress + '%'); - $progress.find('.progress-number').html(item.progress + '%'); - } - $item.css('background-color', item.color); - $item.toggleClass('has-color', item.color != '#fff' && item.color != ''); - $item.find('.info > .label-light').css('background-color', item.color); - - $title = item.fromType == 'execution' ? $item.children('.header').children('.executionName').children('.title') : $item.children('.title'); - if(!$title.children('.label-finish').length) $title.prepend('
    ' + kanbanLang.finished + '
    '); - var name = item.title ? item.title : item.name; - if(kanban.performable == 1 && item.status == 'done' ) - { - var finishColor = '#2a5f29'; - if(item.color == '#2a5f29') finishColor = '#FFFFFF'; - $title.css('color', finishColor); - $title.children('.label-finish').show(); - if(item.color == '#2a5f29') - { - $item.children('.label-finish').css({'background-color':'#FFFFFF','color':'#2a5f29'}); - } - else - { - $item.children('.label-finish').css({'background-color':'','color':'#FFFFFF'}); - } - } - else - { - $title.css('color', ''); - $title.children('.label-finish').hide(); - } - if($.cookie('isFullScreen') == 1) hideAllAction(); -} - -/** - * Render execution item. - * - * @param object item - * @param object $item - * @access public - * @return void - */ -function renderExecutionItem(item, $item) -{ - /* Output header information. */ - var privs = item.actions; - if(privs.includes('sortCard')) $item.parent().addClass('sort'); - - var $header = $item.children('.header'); - if(!$header.length) $header = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $titleBox = $header.children('.executionName'); - if(!$titleBox.length) $titleBox = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($header); - - /* Print execution name. */ - var $title = $titleBox.children('.title'); - var name = item.name ? item.name : item.title; - var title = item.title ? item.title : name; - if(!$title.length) - { - var icon = mode == 'ALM' ? 'run' : 'project'; - var viewMethod = item.execType == 'kanban' ? 'kanban' : 'view'; - if(privs.includes('viewExecution') && item.deleted == '0' && item.children == '0') $title = $('' + name + '').appendTo($titleBox).attr('href', createLink('execution', viewMethod, 'executionID=' + item.fromID)); - if(!privs.includes('viewExecution') || item.deleted == '1' || item.children != '0') $title = $('
    ' + name + '
    ').appendTo($titleBox); - } - if(!$title.children('i').length) - { - $title.append('' + item.title); - } - $title.attr('title', title); - - if(item.delay) - { - $delayed = $titleBox.children('.delayed'); - if(!$delayed.length) - { - $('' + executionLang.delayed + '').appendTo($titleBox); - } - } - - $item.data('card', item); - - var $info = $item.children('.execInfo'); - if(!$info.length) $info = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $statusBox = $info.children('.execStatus'); - if(!$statusBox.length) - { - if(item.deleted == '0') - { - $statusBox = $('' + executionLang.statusList[item.objectStatus] + '').appendTo($info); - } - else - { - $statusBox = $('' + executionLang.deleted + '').appendTo($info); - } - } - - /* Display deadline of execution. */ - var $date = $info.children('.date'); - var end = $.zui.createDate(item.end); - var today = new Date(); - var labelType = end.toLocaleDateString() == today.toLocaleDateString() ? 'danger' : 'wait'; - if(!$date.length) $date = $('').appendTo($info); - - $date.text($.zui.formatDate(end, 'MM-dd') + ' ' + kanbancardLang.deadlineAB).attr('title', $.zui.formatDate(end, 'yyyy-MM-dd') + ' ' + kanbancardLang.deadlineAB).show(); - - /* Display avatars of PM. */ - var $user = $info.children('.user'); - var user = [item.PM]; - if(users[item.PM]) - { - if(!$user.length) $user = $('
    ').appendTo($info); - $user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.PM]); - } -} - -/** - * Render plan item. - * - * @param object item - * @param object $item - * @access public - * @return void - */ -function renderReleaseItem(item, $item) -{ - var privs = item.actions; - if(privs.includes('sortCard')) $item.parent().addClass('sort'); - - /* Print name. */ - var $title = $item.children('.releaseTitle'); - var name = item.title ? item.title : item.name; - if(!$title.length) - { - if(privs.includes('viewRelease') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID)); - if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('
    ' + name + '
    ').appendTo($item); - } - if(!$title.children('i').length) - { - $title.prepend(''); - } - $title.attr('title', name); - - var $info = $item.children('.releaseInfo'); - if(!$info.length) $info = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $statusBox = $info.children('.releaseStatus'); - if(!$statusBox.length) - { - if(item.deleted == '0') - { - $statusBox = $('' + releaseLang.statusList[item.objectStatus] + '').appendTo($info); - } - else - { - $statusBox = $('' + releaseLang.deleted + '').appendTo($info); - } - } - - /* Display release date. */ - var $date = $info.children('.date'); - var releaseDate = $.zui.createDate(item.date); - if(!$date.length) $date = $('').appendTo($info); - - $date.text($.zui.formatDate(releaseDate, 'yyyy-MM-dd')).attr('title', $.zui.formatDate(releaseDate, 'yyyy-MM-dd')).show(); - - /* Display avatars of creator. */ - var $user = $info.children('.user'); - var user = [item.createdBy]; - if(users[item.createdBy]) - { - if(!$user.length) $user = $('
    ').appendTo($info); - $user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.createdBy]); - } -} - -/** - * Render product plan item. - * - * @param object item - * @param object $item - * @access public - * @return void - */ -function renderProductplanItem(item, $item) -{ - var privs = item.actions; - if(privs.includes('sortCard')) $item.parent().addClass('sort'); - - /* Print name. */ - var $title = $item.children('.productplanTitle'); - var name = item.title ? item.title : item.name; - if(!$title.length) - { - if(privs.includes('viewPlan') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('productplan', 'view', 'productplanID=' + item.fromID)); - if(!privs.includes('viewPlan') || item.deleted == '1') $title = $('
    ' + name + '
    ').appendTo($item); - } - if(!$title.children('i').length) - { - $title.append('' + name); - } - $title.attr('title', item.title); - - var $info = $item.children('.productplanInfo'); - if(!$info.length) $info = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $descBox = $info.children('.productplanDesc'); - if(!$descBox.length) - { - $descBox = $('
    ' + item.desc + '
    ').appendTo($info); - } - - var $statusBox = $info.children('.productplanStatus'); - if(!$statusBox.length) - { - if(item.deleted == '0') - { - $statusBox = $('' + productplanLang.statusList[item.objectStatus] + '').appendTo($info); - } - else - { - $statusBox = $('' + productplanLang.deleted + '').appendTo($info); - } - } - - /* Display date of product plan. */ - var $date = $info.children('.date'); - var begin = $.zui.createDate(item.begin); - var end = $.zui.createDate(item.end); - var today = new Date(); - var labelType = (item.begin <= $.zui.formatDate(today, 'yyyy-MM-dd') && item.end >= $.zui.formatDate(today, 'yyyy-MM-dd')) ? 'danger' : 'wait'; - var labelTitle = $.zui.formatDate(begin, 'MM-dd') + ' ' + productplanLang.to + ' ' + $.zui.formatDate(end, 'MM-dd'); - - if((item.begin == '2030-01-01' || item.end == '2030-01-01')) - { - labelType = 'future'; - labelTitle = productplanLang.future; - } - if(!$date.length) $date = $('').appendTo($info); - $date.text(labelTitle).attr('title', labelTitle).show(); - - /* Display avatars of creator. */ - var $user = $info.children('.user'); - var user = [item.createdBy]; - if(users[item.createdBy]) - { - if(!$user.length) $user = $('
    ').appendTo($info); - $user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.createdBy]); - } -} - -/** - * Render build item. - * - * @param object item - * @param object $item - * @access public - * @return void - */ -function renderBuildItem(item, $item) -{ - var privs = item.actions; - if(privs.includes('sortCard')) $item.parent().addClass('sort'); - - /* Print name. */ - var $title = $item.children('.buildTitle'); - var name = item.title ? item.title : item.name; - if(!$title.length) - { - if(privs.includes('viewBuild') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('build', 'view', 'buildID=' + item.fromID)); - if(!privs.includes('viewBuild') || item.deleted == '1') $title = $('
    ' + name + '
    ').appendTo($item); - } - if(!$title.children('i').length) - { - $title.append('' + item.title); - } - $title.attr('title', name); - - var $descBox = $item.children('.buildDesc'); - if(!$descBox.length) - { - $descBox = $('
    ' + item.desc + '
    ').appendTo($item); - } - - var $info = $item.children('.info'); - if(!$info.length) $info = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $statusBox = $info.children('.buildStatus'); - if(!$statusBox.length && item.deleted == '1') - { - $statusBox = $('' + productplanLang.deleted + '').appendTo($info); - } - - /* Display build date. */ - var $date = $info.children('.date'); - var buildDate = $.zui.createDate(item.date); - if(!$date.length) $date = $('').appendTo($info); - - $date.text($.zui.formatDate(buildDate, 'yyyy-MM-dd')).attr('title', $.zui.formatDate(buildDate, 'yyyy-MM-dd')).show(); - - /* Display avatars of creator. */ - var $user = $info.children('.user'); - var user = [item.builder]; - if(users[item.builder]) - { - if(!$user.length) $user = $('
    ').appendTo($info); - $user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.builder]); - } -} - -/** - * Render execution item. - * - * @param object item - * @param object $item - * @access public - * @return void - */ -function renderTicketItem(item, $item) -{ - /* Output header information. */ - var privs = item.actions; - if(privs.includes('sortCard')) $item.parent().addClass('sort'); - - var $header = $item.children('.header'); - if(!$header.length) $header = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $titleBox = $header.children('.ticketTitle'); - if(!$titleBox.length) $titleBox = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($header); - - /* Print ticket name. */ - var $title = $titleBox.children('.title'); - var name = item.title ? item.title : item.name; - if(!$title.length) - { - var icon = 'ticket'; - if(privs.includes('viewTicket') && item.deleted == '0') $title = $('' + name + '').appendTo($titleBox).attr('href', createLink('ticket', 'view', 'ticketID=' + item.fromID)); - if(!privs.includes('viewTicket') || item.deleted == '1') $title = $('
    ' + name + '
    ').appendTo($titleBox); - } - $title.attr('title', name); - $item.data('card', item); - - var $info = $item.children('.info'); - if(!$info.length) $info = $( - [ - '
    ', - '
    ' - ].join('')).appendTo($item); - - var $statusBox = $info.children('.execStatus'); - if(!$statusBox.length) - { - if(item.deleted == '0') - { - $statusBox = $('' + ticketLang.statusList[item.objectStatus] + '').appendTo($info); - } - else - { - $statusBox = $('' + ticketLang.deleted + '').appendTo($info); - } - } - - /* Display deadline of execution. */ - if(item.deadline != '0000-00-00') - { - var $date = $info.children('.date'); - var deadline = $.zui.createDate(item.deadline); - var today = new Date(); - var labelType = deadline.toLocaleDateString() == today.toLocaleDateString() ? 'danger' : 'wait'; - if(!$date.length) $date = $('').appendTo($info); - - $date.text($.zui.formatDate(deadline, 'MM-dd') + ' ' + kanbancardLang.deadlineAB).attr('title', $.zui.formatDate(deadline, 'yyyy-MM-dd') + ' ' + kanbancardLang.deadlineAB).show(); - } - - /* Display avatars of ticket assignedTo. */ - var $user = $info.children('.user'); - var user = [item.assignedTo]; - if(users[item.assignedTo]) - { - if(!$user.length) $user = $('
    ').appendTo($info); - $user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.assignedTo]); - } -} - -/** - * Show error message - * @param {string|object} message Message - */ -function showErrorMessager(message) -{ - var html = false; - if(message instanceof Error) - { - message = message.message; - } - else if(typeof message === 'object') - { - html = []; - $.each(message, function(key, msg) - { - html.push($.isArray(msg) ? msg.join('') : String(msg)); - }); - message = html.join('
    '); - } - else - { - message = String(message); - } - - if(typeof message === 'string' && message.length) - { - $.zui.messager.danger(message, {html: !!html}); - } -} - -/** - * Move a card. - * - * @param int $cardID - * @param int $fromColID - * @param int $toColID - * @param int $fromLaneID - * @param int $toLaneID - * @param int $kanbanID - * @param int $regionID - * @access public - * @return string - */ -function moveCard(cardID, fromColID, toColID, fromLaneID, toLaneID, kanbanID, regionID) -{ - if(!cardID) return false; - var url = createLink('kanban', 'moveCard', 'cardID=' + cardID + '&fromColID='+ fromColID + '&toColID=' + toColID + '&fromLaneID='+ fromLaneID + '&toLaneID=' + toLaneID + '&kanbanID=' + kanbanID); - return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - async: false, - success: function(data) - { - regions = data; - updateRegion(regionID, data[regionID]); - - /* Disable related operations in full screen mode. */ - if($.cookie('isFullScreen') == 1) - { - $('.actions').hide(); - $('.action').hide(); - $('.kanban-group-header').hide(); - $(".title").attr("disabled", true).css("pointer-events", "none"); - } - setToolTip(); - }, - error: function(xhr, status, error) - { - showErrorMessager(error || lang.timeout); - } - }); -} - -/** - * Set a card's color. - * - * @param int $cardID - * @param string $color - * @param int $kanbanID - * @param int $regionID - * @access public - * @return string - */ -function setCardColor(cardID, color, kanbanID, regionID) -{ - if(!cardID) return false; - color = color.replace('#', ''); - var url = createLink('kanban', 'setCardColor', 'cardID=' + cardID + '&color=' + color + '&kanbanID=' + kanbanID); - return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - updateRegion(regionID, data[regionID]); - }, - error: function(xhr, status, error) - { - showErrorMessager(error || lang.timeout); - } - }); -} - -/** - * Finish a card. - * - * @param int $cardID - * @param int $kanbanID - * @param int $regionID - * @access public - * @return void - */ -function finishCard(cardID, kanbanID, regionID) -{ - if(!cardID) return false; - var url = createLink('kanban', 'finishCard', 'cardID=' + cardID + '&kanbanID=' + kanbanID); - return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - updateRegion(regionID, data[regionID]); - } - }); -} - -/** - * Update a region. - * - * @param int regionID - * @param array regionData - * @access public - * @return boolean - */ -function updateRegion(regionID, regionData) -{ - if(typeof(regionData) == 'undefined') regionData = []; - if(!regionID) return false; - - var $region = $('#kanban'+ regionID).kanban(); - - if(!$region.length) return false; - regions[regionID] = regionData ? regionData : regions[regionID]; - - $region.data('zui.kanban').render(regions[regionID].groups); - resetRegionHeight('open'); - return true; -} - -/** - * Update region name. - * - * @param int $regionID - * @param string $name - * @access public - * @return void - */ -function updateRegionName(regionID, name) -{ - $('.region[data-id="' + regionID + '"] > .region-header > strong:first').text(name); - $('#regionNavTabs li[data-id="' + regionID + '"]').attr('title', name); - $('#regionNavTabs li[data-id="' + regionID + '"]').find('a > span').text(name); - initRegionTabs(); -} - -/** - * Update lane name. - * - * @param int $laneID - * @param string $name - * @access public - * @return void - */ -function updateLaneName(laneID, name) -{ - $('.kanban-lane[data-id="' + laneID + '"] > .kanban-lane-name > span').text(name).attr('title', name); -} - -/** - * Update lane color. - * - * @param int $laneID - * @param string $color - * @access public - * @return void - */ -function updateLaneColor(laneID, color) -{ - $('.kanban-lane[data-id="' + laneID + '"] > .kanban-lane-name').css('background-color', color); -} - -/** - * Update column name. - * - * @param int $columnID - * @param string $name - * @param string $color - * @access public - * @return void - */ -function updateColumnName(columnID, name, color) -{ - $('.kanban-col[data-id="' + columnID + '"] > div.title > span:first').text(name).attr('title', name).css('color', color); -} - -/** - * Hide kanban action - */ -function hideKanbanAction() -{ - $('.kanban').attr('data-action-enabled', null); - $('.contextmenu').removeClass('contextmenu-show'); - $('.contextmenu .contextmenu-menu').removeClass('open').removeClass('in'); - $('#moreTasks, #moreColumns').animate({right: -400}, 500); -} - -/** - * Open form for adding task - * @param {JQuery} $element Trigger element - */ -function openAddTaskForm($element) -{ - var regionID = $element.closest('.kanban').data('id'); - var groupID = $element.closest('.kanban-board').data('id'); - var laneID = $element.closest('.kanban-lane').data('id'); - var columnID = $element.closest('.kanban-col').data('id'); - var status = $element.closest('.kanban-col').data('type'); - var modalUrl = createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID); - $.zui.modalTrigger.show( - { - url: modalUrl, - width: '1000px' - }); - hideKanbanAction(); -} - -/** - * Reset lane height according to window height. - */ -function resetLaneHeight() -{ - var maxHeight = '500px'; - if(laneCount < 2) - { - var windowHeight = $(window).height(); - var marginTop = $('#main').css('margin-top'); - var headerHeight = $('.kanban > .kanban-board:first > .kanban-header').outerHeight(); - var actionHeight = $('.kanban > .kanban-board:first > .kanban-lane > .kanban-col:first > .kanban-lane-actions').outerHeight(); - - maxHeight = windowHeight - parseInt(marginTop) - headerHeight - actionHeight; - } - $('.kanban-lane-items').css('max-height', maxHeight); -} - -/** - * Close modal and update kanban data. - */ -function closeModalAndUpdateKanban(regionID) -{ - setTimeout(function() - { - $.zui.closeModal(); - updateRegion(regionID); - }, 1200); -} - -/** - * Status change map - */ -var statusChangeMap = -{ - wait: ['doing', 'done', 'cancel'], - doing: ['done', 'cancel'], - done: ['doing', 'closed'], - cancel: ['doing', 'closed'], - closed: ['doing'] -}; - -/** - * Find drop columns - * @param {JQuery} $element Drag element - * @param {JQuery} $root Dnd root element - */ -function findDropColumns($element, $root) -{ - var $task = $element; - var task = $task.data('task'); - //var status = task.status; - var $col = $task.closest('.kanban-col'); - var col = $col.data(); - var lane = $col.closest('.kanban-lane').data('lane'); - var allStatusCanChange = statusChangeMap[status]; - - hideKanbanAction(); - - return $root.find('.kanban-lane-col:not([data-type="EMPTY"],[data-type=""])').filter(function() - { - if($.cookie('isFullScreen') == 1 || (!CRKanban && kanbanInfo.status == 'closed')) return false; - var $newCol = $(this); - var newCol = $newCol.data(); - var $newLane = $newCol.closest('.kanban-lane'); - var newLane = $newLane.data('lane'); - - $newCol.addClass('can-drop-here'); - return true; - }); -} - -/** - * Handle drop card - * @param {Object} event Drop event object - */ -function handleDropTask($element, event, kanban) -{ - if(!event.target || !event.isNew) return; - - var $card = $element; - var $oldCol = $card.closest('.kanban-col'); - var $newCol = $(event.target).closest('.kanban-col'); - var oldCol = $oldCol.data(); - var newCol = $newCol.data(); - var oldLane = $oldCol.closest('.kanban-lane').data('lane'); - var newLane = $newCol.closest('.kanban-lane').data('lane'); - var regionID = $card.closest('.region').data('id'); - var kanbanID = $card.closest('#kanban').data('id'); - - if(!oldCol || !newCol || !newLane || !oldLane) return false; - if(oldCol.id === newCol.id && newLane.id === oldLane.id) return false; - - var cardID = $card.data().id; - moveCard(cardID, oldCol.id, newCol.id, oldLane.id, newLane.id, kanbanID, regionID); -} - -/** - * Handle finish drop task - */ -function handleFinishDrop() -{ - $('.kanban').find('.can-drop-here').removeClass('can-drop-here'); -} - -/** - * Adjust add button postion in column - */ -function adjustAddBtnPosition($kanban) -{ - if(!$kanban) - { - $('.kanban').children('.kanban-board').each(function() - { - adjustAddBtnPosition($(this)); - }); - return; - } - - $kanban.find('.kanban-lane-col:not([data-type="EMPTY"])').each(function() - { - var $col = $(this); - var items = $col.children('.kanban-lane-items')[0]; - $col.toggleClass('has-scrollbar', items.scrollHeight > items.clientHeight); - }); -} - -/** - * Kanban action handlers - */ -var kanbanActionHandlers = -{ - addItem: openAddTaskForm, - dropItem: handleDropTask -}; - -/** - * Handle kanban action - */ -function handleKanbanAction(action, $element, event, kanban) -{ - $('.kanban').attr('data-action-enabled', action); - var handler = kanbanActionHandlers[action]; - if(handler) handler($element, event, kanban); -} - -function processMinusBtn() -{ - var $table = $('#splitTable'); - var columnCount = $table.find('.child-column').length; - if(columnCount > 2 && columnCount < 10) - { - $table.find('.btn-plus').show(); - $table.find('.btn-close').show(); - } - else if(columnCount <= 2) - { - $table.find('.btn-close').hide(); - } - else if(columnCount >= 10) - { - $table.find('.btn-plus').hide(); - } -} - -/** - * Create lane menu. - * - * @param object $options - * @access public - * @return void - */ -function createLaneMenu(options) -{ - var lane = options.$trigger.closest('.kanban-lane').data('lane'); - var privs = lane.actions; - if(!privs.length) return []; - - var items = []; - var regionID = lane.$kanbanData.region; - var kanbanID = lane.$kanbanData.kanban; - if(privs.includes('editLaneName')) items.push({label: kanbanLang.editLaneName, icon: 'edit', url: createLink('kanban', 'editLaneName', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('editLaneColor')) items.push({label: kanbanLang.editLaneColor, icon: 'color', url: createLink('kanban', 'editLaneColor', 'laneID=' + lane.id + '&executionID=0&from=kanban'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '635px'}}); - if(privs.includes('deleteLane')) items.push({label: kanbanLang.deleteLane, icon: 'trash', url: createLink('kanban', 'deleteLane', 'regionID=' + regionID + '&kanbanID=' + kanbanID + '&lane=' + lane.id), attrs: {'target': 'hiddenwin'}}); - - var bounds = options.$trigger[0].getBoundingClientRect(); - items.$options = {x: bounds.right, y: bounds.top}; - return items; -} - -/** - * Create card menu. - * - * @param object $options - * @access public - * @return array - */ -function createCardMenu(options) -{ - var card = options.$trigger.closest('.kanban-item').data('item'); - var privs = card.actions; - if(!privs.length) return []; - - var items = []; - if(privs.includes('editCard') && card.fromType == '') items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(privs.includes('deleteCard')) items.push({label: card.fromType == '' ? kanbanLang.deleteCard : kanbanLang.removeCard, icon: card.fromType == '' ? 'trash' : 'unlink', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); - if(kanban.performable == 1 && card.fromType == '') - { - if(card.status == 'done') - { - items.push({label: kanbanLang.activateCard, icon: 'magic', url: createLink('kanban', 'activateCard', 'cardID=' + card.id + '&kanbanID=' + card.kanban, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - } - else - { - items.push({label: kanbanLang.finishCard, icon: 'checked', onClick: function(){finishCard(card.id, card.kanban, card.region);}}); - } - } - if(privs.includes('archiveCard') && kanban.archived == '1') items.push({label: kanbanLang.archiveCard, icon: 'card-archive', url: createLink('kanban', 'archiveCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}, onClick:function(){$('#archivedCards').replaceWith("
    ");}}); - - var editCardAction = (privs.includes('editCard') && card.fromType == '') ? true : false; - var deleteCardAction = privs.includes('deleteCard'); - var archiveCardAction = (privs.includes('archiveCard') && kanban.archived == '1') ? true : false; - - var performable = kanban.performable == 1 ? true : false; - - var moveCardAction = privs.includes('moveCard'); - var setCardColorAction = privs.includes('setCardColor'); - - var basicActions = (editCardAction || deleteCardAction || archiveCardAction) ? true : false; - var otherActions = (moveCardAction || setCardColorAction) ? true : false; - - if((performable || basicActions) && otherActions) - { - items.push({type: 'divider'}); - } - - if(privs.includes('moveCard')) - { - var moveCardItems = []; - var moveColumns = []; - var parentColumns = []; - var regionGroups = regions[options.$trigger.closest('.region').data('id')].groups; - for(let i = 0; i < regionGroups.length ; i ++ ) - { - if(regionGroups[i].id == options.$trigger.closest('.kanban-board').data('id')) - { - moveColumns = regionGroups[i].columns; - break; - } - } - for(let i = moveColumns.length-1 ; i >= 0 ; i -- ) - { - if(moveColumns[i].parent > 0) parentColumns.push(moveColumns[i].parent); - if(moveColumns[i].id == card.column || $.inArray(moveColumns[i].id, parentColumns) >= 0) continue; - moveCardItems.push({label: moveColumns[i].name, onClick: function(){moveCard(card.id, card.column, moveColumns[i].id, card.lane, card.lane, card.kanban, card.region);}}); - } - moveCardItems = moveCardItems.reverse(); - items.push({label: kanbanLang.moveCard, icon: 'move', items: moveCardItems}); - } - - if(privs.includes('setCardColor')) - { - var cardColoritems = []; - if(!card.color) card.color = "#fff"; - for(let i = 0 ; i < colorList.length ; i ++ ) - { - var attr = card.color == colorList[i] ? '' : ''; - var border = i == 0 ? 'border:1px solid #b0b0b0;' : ''; - cardColoritems.push({label: "
    " + colorListLang[colorList[i]] + attr , - onClick: function(){setCardColor(card.id, colorList[i], card.kanban, card.region);}, html: true, attrs: {id: 'cardcolormenu'}, className: 'color' + i}); - }; - items.push({label: kanbanLang.cardColor, icon: 'color', items: cardColoritems}); - } - - var bounds = options.$trigger[0].getBoundingClientRect(); - items.$options = {x: bounds.right, y: bounds.top}; - return items; -} - -function createColumnMenu(options) -{ - var column = options.$trigger.closest('.kanban-col').data('col'); - var privs = column.actions; - if(!privs.length) return []; - - var items = []; - if(privs.includes('setColumn')) items.push({label: kanbanLang.editColumn, icon: 'edit', url: createLink('kanban', 'setColumn', 'columnID=' + column.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(privs.includes('setWIP')) items.push({label: kanbanLang.setWIP, icon: 'alert', url: createLink('kanban', 'setWIP', 'columnID=' + column.id), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width' : '500px'}}); - - var basicActions = (privs.includes('setColumn') || privs.includes('setWIP')) ? true : false; - var columnActions = (privs.includes('splitColumn') || privs.includes('createColumn') || privs.includes('copyColumn')) ? true : false; - - if(basicActions && columnActions) - { - items.push({type: 'divider'}); - } - - if(privs.includes('splitColumn')) items.push({label: kanbanLang.splitColumn, icon: 'col-split', url: createLink('kanban', 'splitColumn', 'columnID=' + column.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(privs.includes('createColumn')) - { - items.push({label: kanbanLang.createColumnOnLeft, icon: 'col-add-left', url: createLink('kanban', 'createColumn', 'columnID=' + column.id + '&position=left'), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - items.push({label: kanbanLang.createColumnOnRight, icon: 'col-add-right', url: createLink('kanban', 'createColumn', 'columnID=' + column.id + '&position=right'), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - } - if(privs.includes('copyColumn')) items.push({label: kanbanLang.copyColumn, icon: 'copy', url: createLink('kanban', 'copyColumn', 'columnID=' + column.id), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - - var otherActions = ((privs.includes('archiveColumn') && kanban.archived == '1') || privs.includes('deleteColumn')) ? true : false; - if(columnActions && otherActions) items.push({type: 'divider'}); - - if(privs.includes('archiveColumn') && kanban.archived == '1') items.push({label: kanbanLang.archiveColumn, icon: 'card-archive', url: createLink('kanban', 'archiveColumn', 'columnID=' + column.id), attrs: {'target': 'hiddenwin'}, onClick:function(){$('#archivedColumns').replaceWith("
    ");}}); - if(privs.includes('deleteColumn')) items.push({label: kanbanLang.deleteColumn, icon: 'trash', url: createLink('kanban', 'deleteColumn', 'columnID=' + column.id), attrs: {'target': 'hiddenwin'}}); - - var bounds = options.$trigger[0].getBoundingClientRect(); - items.$options = {x: bounds.right, y: bounds.top}; - return items; -} - -/** - * Create create menu for column. - * - * @param object $options - * @access public - * @return object - */ -function createColumnCreateMenu(options) -{ - var col = options.$trigger.closest('.kanban-col').data('col'); - var privs = col.actions; - var items = []; - var regionID = col.region; - var groupID = col.group; - var laneID = col.$kanbanData.lanes[0].id ? col.$kanbanData.lanes[0].id : 0; - var columnID = col.id; - - if(privs.includes('createCard')) items.push({label: kanbanLang.createCard, url: $.createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(privs.includes('batchCreateCard')) items.push({label: kanbanLang.batchCreateCard, url: $.createLink('kanban', 'batchCreateCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID), attrs: {'data-width': '80%'}}); - if(kanban.object.indexOf('cards') != -1) items.push({label: kanbanLang.importCard, url: $.createLink('kanban', 'importCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(kanban.object && kanban.object != 'cards' && vision != 'lite') items.push({className: 'parentDivider'}); - if(kanban.object && kanban.object != 'cards' && vision != 'lite') items.push({label: kanbanLang.importAB, className: 'import'}); - - return items; -} - -/** Calculate column height */ -function calcColHeight(col, lane, colCards, colHeight, kanban) -{ - if(!isMultiLanes) return 0; - - var options = kanban.options; - - var fontSize = 13; - var moreLabelHeight = 20; - var laneNameHeight = lane.name.length * fontSize; - - if(!options.displayCards) return laneNameHeight > colHeight ? laneNameHeight + 2 * moreLabelHeight : colHeight; - var displayCards = +(options.displayCards || 2); - - if (typeof displayCards !== 'number' || displayCards < 2) displayCards = 2; - return (displayCards * (options.cardHeight + options.cardSpace) + options.cardSpace); -} - -/** Handle sort cards */ -function handleSortCards(event) -{ - var newLaneID = event.element.closest('.kanban-lane').data('id'); - var newColID = event.element.closest('.kanban-col').data('id'); - var cards = event.element.closest('.kanban-lane-items').data('cards'); - var orders = cards.map(function(card){return card.id}); - var fromID = String(event.element.data('id')); - var toID = String(event.target.data('id')); - - orders.splice(orders.indexOf(fromID), 1); - orders.splice(orders.indexOf(toID) + (event.insert === 'before' ? 0 : 1), 0, fromID); - - var url = createLink('kanban', 'sortCard', 'kanbanID=' + kanbanID + '&laneID=' + newLaneID + '&columnID=' + newColID + '&cards=' + orders.join(',')); - $.getJSON(url, function(response) - { - if(response.result === 'fail') - { - if(typeof response.message === 'string' && response.message.length) - { - bootbox.alert(response.message); - } - setTimeout(function(){return location.reload()}, 3000); - } - }); -} - -/* Define menu creators */ -window.menuCreators = -{ - card: createCardMenu, - lane: createLaneMenu, - column: createColumnMenu, - columnCreate: createColumnCreateMenu -}; - -/** - * init Kanban - */ -function initKanban($kanban) -{ - var id = $kanban.data('id'); - var region = regions[id]; - var cardHeight = kanbanInfo.performable == 1 ? 87 : 60; - - $kanban.kanban( - { - data: region.groups, - maxColHeight: 510, - calcColHeight: calcColHeight, - fluidBoardWidth: fluidBoard, - minColWidth: typeof window.minColWidth === 'number' ? window.minColWidth : defaultMinColWidth, - maxColWidth: typeof window.maxColWidth === 'number' ? window.maxColWidth : defaultMaxColWidth, - cardHeight: cardHeight, - displayCards: typeof window.displayCards === 'number' ? window.displayCards : 2, - createColumnText: kanbanLang.createColumn, - addItemText: '', - itemRender: renderKanbanItem, - onAction: handleKanbanAction, - onRenderKanban: adjustAddBtnPosition, - onRenderLaneName: renderLaneName, - onRenderHeaderCol: renderHeaderCol, - onRenderCount: renderCount, - showCount: kanban.showWIP == '1' ? true : false, - sortable: handleSortCards, - virtualize: true, - virtualRenderOptions: {container: $(window).add($('#kanbanContainer'))}, - virtualCardList: true, - droppable: - { - target: findDropColumns, - finish: handleFinishDrop - }, - }); - - $kanban.on('click', '.action-cancel', hideKanbanAction); - $kanban.on('scroll', function() - { - $.zui.ContextMenu.hide(); - }); - var kanbanMinColWidth = typeof window.minColWidth === 'number' ? window.minColWidth : defaultMinColWidth; - if(kanbanMinColWidth < 190) - { - var miniColWidth = kanbanMinColWidth * 0.2; - $('.kanban-header-col>.title>span:not(.text)').hide(); - $('.kanban-header-col>.title > span.text').css('max-width', miniColWidth + 'px'); - } -} - -/** - * Init when page ready - */ -$(function() -{ - $(document).find('main#main').css('padding-top', '16px'); - - window.isMultiLanes = laneCount > 1; - - $.cookie('isFullScreen', 0); - - /* Init first kanban */ - $('.kanban').each(function() - { - initKanban($(this)); - }); - - if(navigator.userAgent.toLowerCase().indexOf("qqbrowser") > -1) $('.region .kanban-header-col > .actions').css('top', '30%'); - - $('.icon-angle-top,.icon-angle-down').on('click', function() - { - $(this).toggleClass('icon-angle-top icon-angle-down'); - $(this).parents('.region').find('.kanban').toggle(); - hideKanbanAction(); - resetRegionHeight($(this).hasClass('icon-angle-top') ? 'open' : 'close'); - }); - - $('#regionTabs, .region-header').on('click', '.action', hideKanbanAction); - $('#TRAction').on('click', '.btn', hideKanbanAction); - - /* Hide action box when user click document */ - $(document).on('click', function(e) - { - $('.kanban').each(function() - { - var currentAction = $(this).kanban().attr('data-action-enabled'); - var canHideAction = (currentAction === 'headerMore' || currentAction === 'editLaneName') - && !$(e.target).closest('.action,.action-box').length; - if(canHideAction) hideKanbanAction(); - }); - }); - - /* Init contextmenu */ - $('#kanban').on('click', '[data-contextmenu]', function(event) - { - var $trigger = $(this); - var menuType = $trigger.data('contextmenu'); - var menuCreator = window.menuCreators[menuType]; - if(!menuCreator) return; - - var options = $.extend({event: event, $trigger: $trigger}, $trigger.data()); - var items = menuCreator(options); - if(!items || !items.length) return; - - $.zui.ContextMenu.show(items, items.$options || {event: event}); - - $('.parentDivider').parent().addClass('divider'); - $('.import').parent().addClass('dropdown-submenu top'); - - var regionID = $(this).closest('.kanban').data('id'); - var groupID = $(this).closest('.kanban-board').data('id'); - var columnID = $(this).closest('.kanban-col').data('id'); - - /* The submenu of import. */ - var importPlanLink = kanban.object.indexOf('plans') != -1 ? "
  • " + kanbanLang.importPlan + '
  • ' : ''; - var importReleaseLink = kanban.object.indexOf('releases') != -1 ? "
  • " + kanbanLang.importRelease + '
  • ' : ''; - var importExecutionLink = kanban.object.indexOf('executions') != -1 ? "
  • " + kanbanLang.importExecution + '
  • ' : ''; - var importBuildLink = kanban.object.indexOf('builds') != -1 ? "
  • " + kanbanLang.importBuild + '
  • ' : ''; - var importTicketLink = kanban.object.indexOf('tickets') != -1 ? "
  • " + kanbanLang.importTicket + '
  • ' : ''; - var importSubmenu = ''; - $('.import').parent().append(importSubmenu); - - }); - - /* Adjust the add button position on window resize */ - $(window).on('resize', function(a) - { - adjustAddBtnPosition(); - initRegionTabs(); - }); - - resetLaneHeight(); - - /* Hide contextmenu when page scroll */ - $(window).on('scroll', function() - { - $.zui.ContextMenu.hide(); - if($('#regionTabs').length > 0) updateRegionTabAffixState(); - }); - - $(document).on('click', '#splitTable .btn-plus', function() - { - var tr = $(this).closest('tr'); - tr.after($('#childTpl').html().replace(/key/g, key)); - tr.next().find('input[name^=color]').colorPicker(); - key++; - processMinusBtn(); - return false; - }); - - /* Remove a trade detail item. */ - $(document).on('click', '#splitTable .btn-close', function() - { - $(this).closest('tr').remove(); - processMinusBtn(); - return false; - }); - - /* Modify default color's border color. */ - $(document).on('mouseout', '.color0', function() - { - $('.color0 .cardcolor').css('border', '1px solid #b0b0b0'); - }); - - /* Modify default color's border color. */ - $(document).on('mouseover', '.color0', function() - { - $('.color0 .cardcolor').css('border', '1px solid #fff'); - }); - - /* Init sortable */ - initSortable(); - - resetRegionHeight('open'); - if(!CRKanban && kanbanInfo.status == 'closed') $('.kanban-col.kanban-header-col').css('padding', '0px 0px 0px 0px'); - - setToolTip(); - - distance = 0; - radiusWidth = 10; - initRegionTabs(); - - $('.leftBtn').click(function() - { - if($(this).hasClass('disabled')) return; - swipeRegionNavTabs($('#regionNavTabs').find('ul'), 'left'); - }); - - $('.rightBtn').click(function() - { - if($(this).hasClass('disabled')) return; - swipeRegionNavTabs($('#regionNavTabs').find('ul'), 'right'); - }); - - if(Object.values(regions).length <= 1) $('#kanbanBox').removeClass('hidden'); -}); - -/** - * Init sortable. - * - * @access public - * @return void - */ -function initSortable() -{ - var sortType = ''; - var $cards = null; - if(!CRKanban && kanbanInfo.status == 'closed') return; - $('#kanban').sortable( - { - selector: '.region, .kanban-board, .kanban-lane, .kanban-col', - trigger: '.region.sort > .region-header, .kanban-board.sort > .kanban-header > .kanban-group-header, .kanban-lane.sort > .kanban-lane-name, .kanban-header-col.sort', - dropOnMouseleave: true, - container: function($ele) - { - return $ele.parent(); - }, - targetSelector: function($ele) - { - var $parent = $ele.parent(); - /* Sort regions. */ - if($ele.hasClass('region')) - { - sortType = 'region'; - return $parent.children('.region'); - } - - /* Sort boards. */ - if($ele.hasClass('kanban-board')) - { - sortType = 'board'; - return $parent.children('.kanban-board'); - } - - /* Sort lanes. */ - if($ele.hasClass('kanban-lane')) - { - sortType = 'lane'; - $cards = $ele.find('.kanban-item'); - - return $parent.children('.kanban-lane'); - } - - /* Sort columns. */ - if($ele.hasClass('kanban-col')) - { - sortType = 'column'; - return $parent.children('.kanban-col'); - } - }, - before: function() { - return !window.sortableDisabled; - }, - start: function(e) - { - if(sortType == 'region') - { - showRegionIdList = ''; - $('.icon-angle-top').each(function() - { - showRegionIdList += $(this).attr('data-id') + ','; - $(this).attr('class', 'icon-angle-down'); - }); - - $('.region').find('.kanban').hide(); - hideKanbanAction(); - } - else if(sortType === 'column') - { - e.element.closest('.kanban-board').addClass('kanban-cols-sorting'); - } - $('#kanban').attr('data-sort-by', sortType); - }, - finish: function(e) - { - if(!e.changed) return; - - var url = ''; - var orders = []; - var regionID = ''; - - if(sortType == 'region') - { - e.list.each(function(index, data) - { - if(data.item.hasClass('region') && data.item.hasClass('sort')) orders.push(data.item.data('id')); - }); - - $('.region').each(function() - { - if(showRegionIdList.includes($(this).attr('data-id'))) - { - $(this).find('.icon-angle-down').attr('class', 'icon-angle-top'); - $(this).find('.kanban').show(); - } - }) - - url = createLink('kanban', 'sortRegion', 'regions=' + orders.join(',')); - } - else if(sortType == 'board') - { - regionID = e.element.closest('.region').data('id'); - e.list.each(function(index, data) - { - if(data.item.hasClass('kanban-board') && data.item.hasClass('sort') && regionID == data.item.parent().data().id) orders.push(data.item.data('id')); - }); - - url = createLink('kanban', 'sortGroup', 'region=' + regionID + '&groups=' + orders.join(',')); - } - else if(sortType == 'lane') - { - var groupID = e.element.closest('.kanban-board').data('id'); - e.list.each(function(index, data) - { - if(data.item.hasClass('kanban-lane') && data.item.hasClass('sort') && groupID == data.item.data().lane.group) orders.push(data.item.data('id')); - }); - - regionID = e.element.closest('.region').data('id'); - url = createLink('kanban', 'sortLane', 'region=' + regionID + '&lanes=' + orders.join(',')); - } - else if(sortType == 'column') - { - var groupID = e.element.closest('.kanban-board').data('id'); - e.list.each(function(index, data) - { - if(data.item.hasClass('kanban-col') && (data.item.hasClass('sort') || data.item.children().hasClass('sort')) && groupID == data.item.data().col.group) orders.push(data.item.data('id')); - }); - - regionID = e.element.closest('.region').data('id'); - url = createLink('kanban', 'sortColumn', 'region=' + regionID + '&kanbanID=' + kanban.id + '&columns=' + orders.join(',')); - } - if(!url) return true; - - $.getJSON(url, function(response) - { - if(response.result == 'fail') - { - if(typeof response.message === 'string' && response.message.length) - { - bootbox.alert(response.message); - } - setTimeout(function(){return location.reload()}, 3000); - } - else if (sortType == 'column') - { - updateRegion(regionID, response[regionID]); - } - }); - }, - always: function(e) - { - if(sortType == 'lane') $cards.show(); - $('#kanban').find('.kanban-cols-sorting').removeClass('kanban-cols-sorting'); - } - }); -} - -/** - * Reset region height according to window height. - * - * @param string fold - * @access public - * @return void - */ -function resetRegionHeight(fold) -{ - var regionCount = 0; - if($.isEmptyObject(regions)) return false; - for(var i in regions) - { - regionCount += 1; - if(regionCount > 1) return false; - } - - var regionID = Object.keys(regions)[0]; - var region = regions[regionID].groups; - var groupCount = 0; - - if($.isEmptyObject(region)) return false; - for(var j in region) - { - groupCount += 1; - if(groupCount > 1) return false; - } - - var group = region[0]; - var laneCount = 0; - - if($.isEmptyObject(group.lanes)) return false; - for(var h in group.lanes) - { - laneCount += 1; - if(laneCount > 1) return false; - } - - var regionHeaderHeight = $('.region-header').outerHeight(); - if(fold == 'open') - { - var windowHeight = $(window).height(); - var headerHeight = $('#mainHeader').outerHeight(); - var mainPadding = $('#main').css('padding-top'); - var panelBorder = $('.panel').css('border-top-width'); - var bodyPadding = $('.panel-body').css('padding-top'); - var height = windowHeight - (parseInt(mainPadding) * 2) - (parseInt(bodyPadding) * 2) - headerHeight - (parseInt(panelBorder) * 2); - var regionPadding = $('.kanban').css('padding-bottom'); - var columnHeight = $('.kanban-header').outerHeight(); - - $('.region').css('min-height', height); - $('.kanban-lane').css('height', height - regionHeaderHeight - parseInt(regionPadding) - columnHeight); - } - else - { - $('.region').css('height', regionHeaderHeight); - } -} - -$(document).on('click', '.dropdown-menu', function() -{ - $.zui.ContextMenu.hide(); -}); - -/** - * Alerts for exceeding the limit. - * - * @access public - * @return void - */ -function setToolTip() -{ - $('[data-toggle="tooltip"]').tooltip({container: 'body'}); -} - -/** - * Update kanban affix state for all boards in page. - * - * @access public - * @return void - */ -function updateRegionTabAffixState() -{ - var $kanbanContainer = $('#kanbanContainer'); - var kanbanContainer = $kanbanContainer[0].getBoundingClientRect(); - var $regionTabs = $('#regionTabs'); - var regionTabs = $regionTabs[0].getBoundingClientRect(); - if(regionTabs.top <= 0 && !$regionTabs.hasClass('affixed')) - { - $regionTabs.addClass('affixed'); - if( kanbanContainer.top > 0) $regionTabs.find('#region-tab-actions').addClass('hidden'); - } - else if($regionTabs.hasClass('affixed') && kanbanContainer.top > 44) - { - $regionTabs.removeClass('affixed'); - $regionTabs.find('#region-tab-actions').removeClass('hidden'); - } - - initRegionTabs(); -} - -/** - * Swipe region navigation tabs. - * - * @param object $object - * @param string $direction - * @access public - * @return bool - */ -function swipeRegionNavTabs($object, direction) -{ - var $regionNavTabs = $('#regionNavTabs'); - var offsetWidth = $regionNavTabs[0].offsetWidth; - var objectWidth = $object[0].offsetWidth; - - $object.find('li').each(function() - { - /* Get the offset of the item. */ - var $item = $(this); - var itemLeft = $item[0].offsetLeft; - var itemWidth = $item[0].offsetWidth; - var itemOffset = itemLeft + itemWidth; - var radius = $item.hasClass('active') ? radiusWidth : 0; - - /* Calculate the offset after sliding. */ - if(direction == 'left' && (itemOffset + distance + radius) >= -5) - { - /* If you swipe left, the distance is equal to the item's left. */ - distance = - itemLeft + radius - ($item.prev().hasClass('active') ? radiusWidth : 0); - /* tab overlap width */ - distance += 20; - if($item.prev().length == 0) - { - distance = 0; - $('.leftBtn').addClass('disabled'); - } - $object[0].style.transform = 'translateX(' + distance + 'px)'; - - /* If the width of regionNavTabs plus offsetWidth is less than the width of object, change rightBtn to clickable. */ - if(offsetWidth - distance < objectWidth) $('.rightBtn').removeClass('disabled'); - return false; - } - - var nextRadius = $item.next().hasClass('active') ? radiusWidth : 0; - if(direction == 'right' && itemOffset > (offsetWidth - distance + nextRadius + radiusWidth * 2)) - { - /* If you swipe right, the distance is equal to the left distance of item plus the width of item minus the width of the regionNavTabs. */ - distance = offsetWidth - itemOffset - radius + nextRadius - radiusWidth * 2; - distance += 20; - if($item.next().length == 0) - { - distance = - objectWidth + offsetWidth - radiusWidth * 2; - $('.rightBtn').addClass('disabled'); - } - $object[0].style.transform = 'translateX(' + distance + 'px)'; - - /* If distance is less than 0, change leftBtn to clickable. */ - if(distance < 0) $('.leftBtn').removeClass('disabled'); - return false; - } - }); -} - -/** - * Init region tabs. - * - * @access public - * @return void - */ -function initRegionTabs() -{ - var $regionNavTabs = $('#regionNavTabs'); - if($regionNavTabs.length == 0) return; - - /* Set the width of regionTab. */ - $('#regionTabs').width($('#kanban').outerWidth()); - - var regionTabsWidth = $regionNavTabs[0].offsetWidth; - var regionTabULWidth = $regionNavTabs.find('ul')[0].offsetWidth; - var $acitiveItem = $('#regionNavTabs > ul > li.active'); - var acitiveItemWidth = $acitiveItem[0].offsetWidth; - var acitiveItemLeft = $acitiveItem[0].offsetLeft; - - /* Print left and right button. */ - if(regionTabULWidth > regionTabsWidth) $('.leftBtn, .rightBtn').removeClass('hidden'); - - if(acitiveItemLeft + distance < 0) - { - distance = - acitiveItemLeft; - distance += 20; - if($acitiveItem.prev().length == 0) - { - distance = 0; - $('.leftBtn').addClass('disabled'); - } - $('#regionNavTabs > ul')[0].style.transform = 'translateX(' + distance + 'px)'; - } - else if(acitiveItemWidth + acitiveItemLeft + distance + radiusWidth * 2 > regionTabsWidth && acitiveItemLeft != 0 && acitiveItemWidth != 0) - { - distance = regionTabsWidth - acitiveItemWidth - acitiveItemLeft + (distance != 0 ? - radiusWidth * 2 : radiusWidth); - distance += 20; - if($acitiveItem.next().length == 0) - { - distance = regionTabsWidth - acitiveItemWidth - acitiveItemLeft - radiusWidth * 2; - $('.rightBtn').addClass('disabled'); - } - $('#regionNavTabs > ul')[0].style.transform = 'translateX(' + distance + 'px)'; - } - - if(distance < 0) $('#regionTabs').find('.leftBtn').removeClass('disabled'); - if($acitiveItem.next().length != 0 && regionTabULWidth > regionTabsWidth) $('#regionTabs').find('.rightBtn').removeClass('disabled'); - $('#kanbanBox').removeClass('hidden'); -} - -$('[data-tab]').on('shown.zui.tab', function(e) -{ - /* Init vars. */ - var $current = $(e.target); - var $prev = $(e.relatedTarget); - var $regionActions = $('#region-tab-actions'); - var $regions = $('.region'); - var contentID = $current.attr('href'); - var regionID = $current.parent().attr('data-id'); - var hasActions = $regionActions.hasClass('active'); - - /* Highlight the currently selected tab. */ - $current.addClass('btn-active-text'); - $current.parent().addClass('active'); - $prev.removeClass('btn-active-text'); - $prev.parent().removeClass('active'); - - /* Dynamic display and hidden of regions. */ - if(contentID == 'all') - { - $regions.addClass('active').removeClass('notAll'); - if(hasActions) $regionActions.removeClass('active'); - $regions.each(function() - { - var isFold = $(this).find('.region-header i').hasClass('icon-angle-down'); - if(isFold) $(this).find('.kanban').css('display', 'none'); - }); - } - else - { - var $currentRegion = $(contentID); - $regions.removeClass('active'); - $currentRegion.addClass('active notAll'); - $currentRegion.find('.kanban').css('display', 'block'); - if(!hasActions) $regionActions.addClass('active'); - - /* Replace the link of the region actions button with the ID of the current region. */ - $regionActions.find('li').each(function() - { - if($(this).hasClass('editRegion')) $(this).find('a').attr('href', createLink('kanban', 'editRegion', 'regionID=' + regionID, '', true)); - if($(this).hasClass('createLane')) $(this).find('a').attr('href', createLink('kanban', 'createLane', 'kanbanID=' + kanbanID + '®ionID=' + regionID, '', true)); - if($(this).hasClass('deleteRegion')) $(this).find('a').attr('href', createLink('kanban', 'deleteRegion', 'regionID=' + regionID)); - if($(this).hasClass('archivedCard')) $(this).find('a').attr('href', "javascript:loadMore(\"Card\", " + regionID + ')'); - if($(this).hasClass('archivedColumn')) $(this).find('a').attr('href', "javascript:loadMore(\"Column\", " + regionID + ')'); - }); - } - window.scrollTo(0, 0); - - /* To manually refresh stay under the current tab, save the ID of the current region. */ - var url = createLink('kanban', 'ajaxSaveRegionID', 'regionID=' + regionID); - $.get(url); -}); diff --git a/module/mail/css/test.css b/module/mail/css/test.css deleted file mode 100644 index 0641311ed1..0000000000 --- a/module/mail/css/test.css +++ /dev/null @@ -1,2 +0,0 @@ -#resultWin {width: 100%; height: 230px; border: none;} -div .f-right {font-weight: normal; color: red; padding-left: 5px;} diff --git a/module/mail/js/detect.js b/module/mail/js/detect.js deleted file mode 100644 index 06cfea9964..0000000000 --- a/module/mail/js/detect.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready() -{ - $('#fromAddress').focus(); -} diff --git a/module/mail/js/edit.js b/module/mail/js/edit.js deleted file mode 100644 index 5d6d8bd632..0000000000 --- a/module/mail/js/edit.js +++ /dev/null @@ -1,5 +0,0 @@ -$(document).ready() -{ - $('#fromAddress').focus(); - if($('#fromAddress').val() != '')$('#password').focus(); -} diff --git a/module/message/css/setting.css b/module/message/css/setting.css deleted file mode 100644 index 86c0394948..0000000000 --- a/module/message/css/setting.css +++ /dev/null @@ -1,4 +0,0 @@ -.checkbox-primary + .checkbox-primary {margin: 0px;} -.checkbox-primary {margin: 0px; width: 120px; float: left;} -.checkbox-primary label {white-space: nowrap; overflow: hidden; text-overflow: ellipsis;} -div.chosen-container + select + div.chosen-container > .chosen-choices {border-top: 0px;} diff --git a/module/message/js/setting.js b/module/message/js/setting.js deleted file mode 100644 index 25772dcf17..0000000000 --- a/module/message/js/setting.js +++ /dev/null @@ -1,33 +0,0 @@ -$(function() -{ - $('.objectType').click(function() - { - if($(this).prop('checked')) - { - $(this).closest('tr').find(':checkbox').prop('checked', true); - } - else - { - $(this).closest('tr').find(':checkbox').prop('checked', false); - } - }); - - $('.messageType').click(function() - { - var index = $(this).closest('th').index(); - if($(this).prop('checked')) - { - $(this).closest('table').find('tbody').find('tr').each(function() - { - $(this).find('td').eq(index).find(':checkbox').prop('checked', true); - }) - } - else - { - $(this).closest('table').find('tbody').find('tr').each(function() - { - $(this).find('td').eq(index).find(':checkbox').prop('checked', false); - }) - } - }); -}); diff --git a/module/misc/css/about.css b/module/misc/css/about.css deleted file mode 100644 index 2c7989384f..0000000000 --- a/module/misc/css/about.css +++ /dev/null @@ -1,7 +0,0 @@ -#mainContent {padding-top: 50px !important;} -#mainContent .main-header {display: none;} -#mainContent .copyright {line-height: 20px;} -#mainContent .copyright a {vertical-align: baseline;} -#zentaoLinks .panel .panel-heading {padding: 6px 10px;} - -.zt-logo {width: 145px;} diff --git a/module/misc/css/changelog.css b/module/misc/css/changelog.css deleted file mode 100644 index 74d386df71..0000000000 --- a/module/misc/css/changelog.css +++ /dev/null @@ -1,17 +0,0 @@ -#versionMenu {margin-left: 20px;} -#versionMenu .dropdown-menu {min-width: 130px; max-height: 180px; overflow-y: auto;} - -#mainContent {min-height: 240px;} -#featureList {padding: 0 10px;} -#featureList > .item {padding: 0 0 10px 0;} -#featureList > .item > h3 {color: #114f8e; font-size: 16px; margin: 0; padding: 10px 0;} -#featureList > .item > .desc {color: #666; padding-left: 18px;} -#featureList > .item > .more-link {color: #666; padding-left: 18px;} -#featureList > .item > .more {display: none;} -#featureList + #details {padding: 0;} -#details .details-list {display: none; padding: 10px; background: #f1f1f1; border-radius: 4px;} -#details.show-details .details-list {display: block;} -#details > .btn > .icon-angle-right {transition: transform .2s; display: inline-block;} -#details.show-details > .btn > .icon-angle-right {transform: rotate(90deg);} -#details.show-details > .btn:focus {border-radius: 4px 4px 0 0;} -#details.show-details > .btn:focus + .details-list {border-radius: 0 0 4px 4px;} diff --git a/module/mr/css/browse.css b/module/mr/css/browse.css deleted file mode 100644 index edb89a5bf2..0000000000 --- a/module/mr/css/browse.css +++ /dev/null @@ -1,21 +0,0 @@ -#repoList .tree li {padding: 0 0 0 10px;} -#repoList .hide-in-search .hidden {display: block !important; visibility: inherit !important;} -#dropMenuRepo > div.table-row > div > div > ul > li > div {padding-left: 20px;} -#repoList li > a.selected {color: #3123ae !important; background: #f2eafc !important; line-height: 20px; border-radius: 5px;} -#repoList .tree li.has-list.open:before {border-left: 0px;} -#repoList ul.tree-angles {margin-bottom: 0;} -#repoList {margin: 0;} -#repoList .tree > li {padding: 2px;} -#repoList a:focus, #repoList a:hover {color: #0c64eb; text-decoration: none;} -#repoList > ul > li > ul > li > a:hover {color: white; background-color: #0c64eb; text-decoration: none;} -#repoList .tree li > a {max-width: 100%;} -#repoList .hide-in-search .hidden {display: block !important; visibility: inherit !important;} -#repoList .tree li > a {line-height: 20px; border-radius: 2px;} - -.c-id {width: 60px;} -.c-title {width: 150px;} -.c-branch {width: 200px;} -.c-status {width: 120px;} -.c-author {width: 80px;} -.c-date {width: 100px;} -[lang^='zh-'] .c-status {width: 100px;} diff --git a/module/mr/css/create.css b/module/mr/css/create.css deleted file mode 100644 index 4760929b38..0000000000 --- a/module/mr/css/create.css +++ /dev/null @@ -1,3 +0,0 @@ -#mrForm table tbody th {width: 145px;} -.branch-btn {width: 105px; height: 32px; line-height: 22px; float: right; text-align: left;} -[lang^='zh-'] .branch-btn {width: 70px;} diff --git a/module/mr/css/diff.css b/module/mr/css/diff.css deleted file mode 100644 index 392d2b93b6..0000000000 --- a/module/mr/css/diff.css +++ /dev/null @@ -1,73 +0,0 @@ -body {padding-bottom: 0px;} -.w-code {width: 48%; word-break: break-all;} -td.code {color: #484848; padding: 0px 3px; white-space: pre-wrap;} -.none {background: #EAF2F5;} -table.diff {margin-bottom: 0px;} -.diff caption {border: 1px solid #e4e4e4; background: #edf3fe; margin: 0; padding: 6px 2px 6px 10px; text-align: left; font-weight: bold; font-size: 13px;} -.diff th, .diff td {border: none;} -.diff th {padding-top: 2px; padding-bottom: 2px;} -.diff .line-new, .diff .line-new {background: #CFC;} -.diff .line-old, .diff .line-old {background: #FCC;} -.diff .line-all, .diff .line-all {background: #FFF;} -.diff .w-num {width: 25px; border-right: 1px solid #E4E4E4; background: #fafafa; border-left: 1px solid #E4E4E4; color: #999; font-weight: normal;} - -.repoCode .diff tr .comment-btn .icon-wrapper {left: -30px;} -.repoCode .diff tr.over td.line-all, .repoCode .diff tr.over td.line-all {background: #f8eec7;} -.repoCode .diff tr.over td.line-new, .repoCode .diff tr.over td.line-new {background: #8eff8e;} -.repoCode .diff tr.over td.line-old, .repoCode .diff tr.over td.line-old {background: #f6b2b2;} - -.repoCode form > .btn {margin-right: 10px;} -.label-exchange {background-color: #566F7C; cursor: pointer;} -.label-exchange i {padding: 0;} -.btn-download {border-right: none;} -.body-modal #back {display: none;} - -.repoCode td.code {white-space: inherit;} -.repoCode .content, .repoCode .btn {background-color: #F4F5F7; border: none;} -.repoCode .nav-tabs > li.active > a:before {background: none; height: 0;} - -#fileTabs .tab-pane {display: none;} -#fileTabs .tab-pane.active {display: block;} -#fileTabs .tab-nav-item {max-width: none !important;} -#fileTabs > .tabs-navbar {overflow: hidden; padding-bottom: 10px; position: relative; height: 35px;} -#fileTabs > .tabs-navbar > .nav-tabs {position: absolute; display: flex;} -#filesTree #modules {margin-top: 5px;} -#filesTree {overflow-y: auto;} - -#fileTree li {padding: 0 0 0 8px;} -#fileTree li.has-list {padding-left: 20px;} -#fileTree li > a {display: block; padding: 6px 0; border-radius: 2px; padding-left: 6px; height: 30px; text-decoration: none;} -#fileTree li > a > span {display: inline-block;} -#fileTree li > a > span + span {margin-left: 8px;} -#fileTree li.selected > a {background-color: #E8F3FC;} -#fileTree li.selected > a > span.title {color: #006AF1;} -#fileTree .label-id {border-color: #cbd0db; color: #7d8599} -#fileTree .label.label-type {background: #fff; border: 1px solid #7d8599; color:#7d8599} - -#fileTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;} -#fileTree li > a > span.user {color: #838a9d;} -#fileTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8} -#fileTree li > a:first-child {padding-left: 18px;} -#fileTree li a.selected {color: #e9f2fb; background-color: #0c64eb;} - -#fileTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;} -#fileTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;} -#fileTree li > .list-toggle:hover:before, #fileTree li > .list-toggle:hover {border-color: #006AF1;} -#fileTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;} -#fileTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;} -#fileTree li.open > .list-toggle:hover {background: #006AF1;} - -#fileTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 1px dashed #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;} -#fileTree ul > li:before, #fileTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 1px dashed #cbd0db; top: -13px; bottom: 12px; left: -12px;} -#fileTree ul > li:last-child:before {bottom: auto; height: 29px;} -#fileTree ul > li:first-child:before {top: -9px;} -#fileTree ul > li.has-list:first-child:before {top: -13px;} -#fileTree ul > li.tree-single-item:before {height: 23px;} -#fileTree ul > li.has-list:after {width: 14px;} - -#modules li {padding: 5px 0 0 15px;} -.file-tree #modules .icon {color: #9EA3B0;} -.file-tree #modules .icon-folder {padding-left: 5px;} -li.selected .doc-title .icon, li.selected .doc-title a {color: #438EFF !important;} - -.btn-left, .btn-right {display: none;} diff --git a/module/mr/css/edit.css b/module/mr/css/edit.css deleted file mode 100644 index 7176c78083..0000000000 --- a/module/mr/css/edit.css +++ /dev/null @@ -1 +0,0 @@ -#mrForm table tbody th {width: 145px;} diff --git a/module/mr/css/link.css b/module/mr/css/link.css deleted file mode 100644 index 5cded22bcf..0000000000 --- a/module/mr/css/link.css +++ /dev/null @@ -1,26 +0,0 @@ -#storyList th {border: none;} -#bugList th {border: none;} -#taskList th {border: none;} -.hide-side .col-main {width: 100%;} -.hide-side .col-side .main-side {width: 0; display: none;} - -.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;} -.dropdown-menu > .menu-search .input-group {width: 100%;} -.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666;} -.dropdown-menu > .menu-search .form-control {border: none !important; box-shadow: none !important; border-top: 1px solid #ddd !important;} -.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto;} -.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;} -.dropdown-list > li > a:hover, -.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} - -.checkbox.btn {margin-top: 0px;} - -.linkBox #queryBox .search-form .form-actions {padding-bottom: 5px;} -.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;} -#unlinkStoryList, #unlinkBugList, #unlinkTaskList{border-top: 1px solid #cbd0db;} -.fixed-footer .text {color: #fff;} -ol, ul {padding-left: 20px;} -#tabsNav .tab-pane>.main-table {border-radius: 0;} -.body-modal #mainMenu>.btn-toolbar {width: auto;} -.body-modal #mainContent {min-height: 240px;} -.body-modal #mainMenu>.btn-toolbar .page-title>.text {overflow: visible} \ No newline at end of file diff --git a/module/mr/css/view.css b/module/mr/css/view.css deleted file mode 100644 index 3e38664325..0000000000 --- a/module/mr/css/view.css +++ /dev/null @@ -1,13 +0,0 @@ -#legendStories ul li, #legendBugs ul li, #legendTasks ul li {padding: 10px 0 0 12px; line-height: 20px;} -.side-col .cell {padding: 0px;} -.table-content tbody tr th{padding-left: 0; font-weight: 400; color: #838a9d; text-align: right; vertical-align: middle; border:none;} -.table-content tbody tr td{border:none;} -.table-content thead tr th{text-align: left; vertical-align: middle; border:none;} -.detail-content{margin-top:0;} -.main-row .cell { - border: 1px solid #efefef; - -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.05),0 2px 6px 0 rgba(0,0,0,.045); - box-shadow: 0 1px 1px rgba(0,0,0,.05),0 2px 6px 0 rgba(0,0,0,.045) -} -.side-col{padding-top:5px;} -.detail-content .btn-active-text {padding-top: 5px;} diff --git a/module/mr/js/create.js b/module/mr/js/create.js deleted file mode 100644 index 1d7300720a..0000000000 --- a/module/mr/js/create.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Urlencode param. - * - * @param param $param - * @access public - * @return string - */ -function urlencode(param) -{ - var hostID = $('#hostID').val(); - if(hosts[hostID].type != 'gitlab') return Base64.encode(encodeURIComponent(param)); - - return param; -} - -/** - * Get branch priv. - * - * @param int|string $project - * @access public - * @return void - */ -function getBranchPriv(project) -{ - var hostID = $('#hostID').val(); - var branchUrl = createLink('mr', 'ajaxGetBranchPrivs', "hostID=" + hostID + "&project=" + project); - $.get(branchUrl, function(response) - { - branchPrivs = eval('(' + response + ')'); - }); -} - -$(function() -{ - $('#sourceProject,#targetProject').change(function() - { - var hostID = $('#hostID').val(); - var sourceProject = urlencode($(this).val()); - if(!sourceProject) return false; - - var branchSelect = $(this).parents('td').find('select[name*=Branch]'); - var branchUrl = createLink(hosts[hostID].type, 'ajaxGetProjectBranches', hosts[hostID].type + "ID=" + hostID + "&projectID=" + sourceProject); - $.get(branchUrl, function(response) - { - branchSelect.html('').append(response); - branchSelect.chosen().trigger("chosen:updated");; - }); - - }); - - $('#sourceProject').change(function() - { - $('#sourceBranch,#targetProject,#targetBranch').empty(); - $('#sourceBranch,#targetProject,#targetBranch').chosen().trigger("chosen:updated");; - - var hostID = $('#hostID').val(); - var sourceProject = urlencode($(this).val()); - if(!sourceProject) return false; - - var projectUrl = createLink('mr', 'ajaxGetMRTargetProjects', "hostID=" + hostID + "&projectID=" + sourceProject + "&scm=" + hosts[hostID].type); - $.get(projectUrl, function(response) - { - $('#targetProject').html('').append(response); - $('#targetProject').chosen().trigger("chosen:updated");; - }); - - var repoUrl = createLink('mr', 'ajaxGetRepoList', "hostID=" + hostID + "&projectID=" + sourceProject); - $.get(repoUrl, function(response) - { - $('#repoID').html('').append(response); - $('#repoID').val(repo.id); - $('#repoID').chosen().trigger("chosen:updated"); - $('#repoID').change(); - }); - - if(sourceProject) getBranchPriv(sourceProject); - }); - - $('#sourceBranch,#targetBranch').change(function() - { - $('#removeSourceBranch').removeAttr('disabled'); - - var sourceProject = $('#sourceProject').val(); - var sourceBranch = $('#sourceBranch').val(); - var targetProject = $('#targetProject').val(); - var targetBranch = $('#targetBranch').val(); - if(branchPrivs[sourceBranch]) - { - $('#removeSourceBranch').attr('disabled', 'true'); - $('#removeSourceBranch').attr("checked",false); - } - if(!sourceProject || !sourceBranch || !targetProject || !targetBranch) return false; - - var $this = $(this); - var hostID = $('#hostID').val(); - var repoUrl = createLink('mr', 'ajaxCheckSameOpened', "hostID=" + hostID); - $.post(repoUrl, {"sourceProject": sourceProject, "sourceBranch": sourceBranch, "targetProject": targetProject, "targetBranch": targetBranch}, function(response) - { - response = $.parseJSON(response); - if(response.result == 'fail') - { - alert(response.message); - $this.val('').trigger('chosen:updated'); - if($this.attr('id') == 'sourceBranch') $('#removeSourceBranch').removeAttr('disabled'); - return false; - } - }); - }); - - $('#repoID').change(function() - { - var repoID = $(this).val(); - var jobUrl = createLink('mr', 'ajaxGetJobList', "repoID=" + repoID); - $.get(jobUrl, function(response) - { - $('#jobID').html('').append(response); - $('#jobID').chosen().trigger("chosen:updated");; - }); - }); - - $('#jobID').change(function() - { - var jobID = $(this).val(); - var compileUrl = createLink('mr', 'ajaxGetCompileList', "job=" + jobID); - $.get(compileUrl, function(response) - { - $('#compile').html('').append(response); - $('#compile').chosen().trigger("chosen:updated");; - }); - }); - - $("#needCI").change(function() - { - if(this.checked == false) - { - $("#jobID").prop("disabled", true); - $('#jobID').chosen().trigger("chosen:updated");; - $("#jobID").parent().parent().addClass('hidden'); - } - if(this.checked == true) - { - $("#jobID").prop("disabled", false); - $('#jobID').chosen().trigger("chosen:updated");; - $("#jobID").parent().parent().removeClass('hidden'); - } - }); - - $('#hostID').change(function() - { - $('#sourceProject,#sourceBranch,#targetProject,#targetBranch').empty(); - $('#sourceProject,#sourceBranch,#targetProject,#targetBranch').chosen().trigger("chosen:updated");; - - var hostID = $('#hostID').val(); - if(hostID == '') return false; - - if(hosts[hostID].type == 'gitlab') - { - var url = createLink('repo', 'ajaxGetGitlabProjects', "gitlabID=" + hostID + "&projectIdList=&filter=IS_DEVELOPER"); - } - else if(hosts[hostID].type == 'gitea') - { - var url = createLink('repo', 'ajaxGetGiteaProjects', "giteaID=" + hostID); - } - else if(hosts[hostID].type == 'gogs') - { - var url = createLink('repo', 'ajaxGetGogsProjects', "gogsID=" + hostID); - } - $.get(url, function(response) - { - if(response == "" && confirm(mrLang.addForApp) == true) window.open(hosts[hostID].url); - - $('#sourceProject').html('').append(response); - if(repo.project) - { - $('#sourceProject').val(repo.project); - $('#sourceProject').change(); - } - $('#sourceProject').chosen().trigger("chosen:updated");; - }); - }); - - if(repo.gitService) $('#hostID').change(); -}); diff --git a/module/mr/js/diff.js b/module/mr/js/diff.js deleted file mode 100644 index 16e4768f9a..0000000000 --- a/module/mr/js/diff.js +++ /dev/null @@ -1,554 +0,0 @@ -$(document).ready(function() -{ - if(!browser || browser == 'ie') - { - $("#inline").click(function(){$('#arrange').val('inline');this.form.submit();}); - $("#appose").click(function(){$('#arrange').val('appose');this.form.submit();}); - } - $(".label-exchange").click(function(){ $('#exchange').submit();}); -}); - -var distance = 0; - -/** - * Aarrow tabs area. - * - * @param string domID - * @param number shift 1|-1 - * @param bool hideRightBtn - * @access public - * @return void - */ -function arrowTabs(domID, shift, hideRightBtn) -{ - if($('#' + domID).html() == '') return; - - $('.btn-right, .btn-left').show(); - if(hideRightBtn) $('.btn-right').hide(); - - var tabItemWidth = $('#' + domID + ' > .tabs-navbar > .nav-tabs')[0].clientWidth; - var tabsWidth = $('#' + domID + '')[0].clientWidth; - if(tabItemWidth < tabsWidth) - { - $('.btn-right, .btn-left').hide(); - return; - } - - distance += tabsWidth * shift * 0.2; - if(distance > 0) distance = 0; - if(distance == 0) - { - $('.btn-left').hide(); - } - - if((tabItemWidth + distance) < tabsWidth * 0.75) - { - $('.btn-right').hide(); - return arrowTabs(domID, 1, true); - } - - $('#' + domID + ' > .tabs-navbar > .tabs-nav')[0].style.transform = 'translateX('+ distance +'px)'; -} - -/** - * Change encoding. - * - * @param string $encoding - * @access public - * @return void - */ -function changeEncoding(encoding) -{ - $('#encoding').val(encoding); - $('#encoding').parents('form').submit(); -} - -/** - * Html code decode. - * - * @param string str - * @access public - * @return string - */ -function htmlspecialchars_decode(str) -{ - str = str.replace(/&/g, '&'); - str = str.replace(/</g, '<'); - str = str.replace(/>/g, '>'); - str = str.replace(/"/g, '"'); - str = str.replace(/'/g, "'"); - return str; -} - -/** - * Get diffs by file name. - * - * @param string fileName - * @access public - * @return object - */ -function getDiffs(fileName) -{ - if(fileName.indexOf('./') === 0) fileName = fileName.substring(2); - - var result = { - 'code': {'new': '', 'old': ''}, - 'line': {'new': [], 'old': []} - }; - $.each(diffs, function(i, diff) - { - if(diff.fileName == fileName) - { - $.each(diff.contents, function(c, content) - { - if(typeof content.lines != 'object') return result; - - var lines = content.lines; - $.each(lines, function(l, code) - { - var subIndex = code.type == 'all' ? 1 : 2; - var lineCode = htmlspecialchars_decode(code.line.substring(subIndex)) + "\n"; - - if(code.type == 'new') - { - result.code.new += lineCode; - result.line.new.push(code.newlc); - } - else if(code.type == 'old') - { - result.code.old += lineCode; - result.line.old.push(code.oldlc); - } - else - { - result.code.new += lineCode; - result.code.old += lineCode; - result.line.new.push(code.newlc); - result.line.old.push(code.oldlc); - } - }); - }); - return result; - } - }); - return result; -} - -/** - * Create file tab. - * - * @param string filename - * @param string filepath - * @access public - * @return object - */ -function createTab(filename, filepath) -{ - $('[data-path="' + decodeURIComponent(filepath) + '"]').closest('li').addClass('selected'); - var tabID = Base64.encode(filepath).replace(/=/g, '-'); - return { - title: filename, - id: tabID, - type: 'iframe', - url: createLink('repo', 'ajaxGetDiffEditorContent', urlParams.replace('%s', Base64.encode(encodeURIComponent(filepath)))) - }; -} - -/** - * Load link object page. - * - * @param string $link - * @access public - * @return void - */ -function loadLinkPage(link) -{ - $('#linkObject').attr('href', link); - $('#linkObject').click() -} - -$(document).ready(function() -{ - if(browser != 'ie') - { - var diffAppose = false; - $('.dropdown #inline').hide(); - - if(!browser || browser == 'ie') - { - $("#inline").click(function(){$('#arrange').val('inline');this.form.submit();}); - $("#appose").click(function(){$('#arrange').val('appose');this.form.submit();}); - } - $(".label-exchange").click(function(){ $('#exchange').submit();}); - - $('.btn-left').click(function() {arrowTabs('fileTabs', 1);}); - $('.btn-right').click(function() {arrowTabs('fileTabs', -2);}); - if(file) $('#fileTabs').tabs({tabs: [createTab(file['basename'], entry)]}); - - /** - * Set pane height. - * - * @access public - * @return void - */ - function setHeight() - { - var paneHeight = $(window).height() - 120; - $('#fileTabs .tab-pane').css('height', paneHeight + 'px') - $('#filesTree').css('height', paneHeight + 45) - } - setHeight(); - - $(document).on('click', '.repoFileName', function() - { - var path = $(this).data('path'); - var name = $(this).text(); - var $tabs = $('#fileTabs').data('zui.tabs'); - - $tabs.open(createTab(name, path)); - setHeight(); - arrowTabs('fileTabs', -2); - }); - - /* Remove file path for opened files. */ - $('#fileTabs').on('onClose', function(event, tab) { - var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '='))); - var index = openedFiles.indexOf(filepath); - if(index > -1) - { - openedFiles.splice(index, 1) - $('[data-path="' + filepath + '"]').closest('li').removeClass('selected'); - } - - if(index == openedFiles.length) arrowTabs('fileTabs', -2); - }); - - /* Append file path into the title. */ - $('#fileTabs').on('onLoad', function(event, tab) { - var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '='))); - $('#tab-nav-item-' + tab.id).attr('title', filepath); - document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose); - - if(openedFiles.indexOf(filepath) == -1) openedFiles.push(filepath); - }); - - $('#fileTabs').on('onOpen', function(event, tab) { - var filepath = decodeURIComponent(Base64.decode(tab.id.replace(/-/g, '='))); - var index = openedFiles.indexOf(filepath); - if(index > -1) document.getElementById('tab-iframe-' + tab.id).contentWindow.updateEditorInline(diffAppose); - }); - - $('.inline-appose').on('click', function() - { - $('.inline-appose').hide(); - diffAppose = !diffAppose; - if(diffAppose) - { - $('.dropdown #inline').show(); - } - else - { - $('.dropdown #appose').show(); - } - var type = $(this).attr('id'); - var tabID = $('.tab-nav-item.active').data('id'); - document.getElementById('tab-iframe-' + tabID).contentWindow.updateEditorInline(diffAppose); - return; - }); - } - else - { - var $diffCode = $('.diff'); - var $rows = $diffCode.find('tr'); - var rowTip = $('#rowTip').html(); - var lastLine; - $rows.each(function() - { - var $row = $(this); - if(!$row.hasClass('empty')) - { - $row.children('th').first().prepend("
    "); - $row.children('td').first().append(rowTip); - } - - if(lastLine && !$row.data('line')) - { - $row.attr('data-line', lastLine); - } - else - { - lastLine = $row.data('line'); - } - }).hover(function() - { - var $this = $(this); - if($this.hasClass('empty')) return; - $this.addClass("over"); - }, - function() - { - $(this).removeClass("over"); - }); - - var isInline = $.cookie('arrange') == 'inline'; - var $reviewFormRow = $('' + (isInline ? '' : '') + ''); - var $reviewForm = $('#reviewForm'); - var $reviewPanel = $('#reviewPanel'); - $reviewFormRow.find('td').append($reviewForm.removeClass('hide')); - - var highlight = function($e) - { - $('.highlight').removeClass('highlight'); - $e.addClass('highlight'); - }; - - var createReview = function(review, line, show) - { - var $review = $reviewPanel.clone().removeClass('hide').attr('id', review.objectType + '-' + review.id); - $review.find('.realname').text(review.realname); - $review.find('.openedDate').text(review.openedDate); - $review.find('.title').text(review.title); - $review.find('.content').toggle(review.content != '').html(review.content); - $review.find('.code-lines').text(review.lines); - $review.find('input[name="objectID"]').val(review.id); - $review.data(review); - - id = review.objectType == 'bug' ? 'Bug' : 'Task'; - id += '#' + review.id; - if(review.view) id = "" + id + ""; - $review.find('.title').closest('.panel-heading').find('.panel-actions').prepend(id); - if(!review.delete) $review.find('.title').closest('.panel-heading').find('.panel-actions .reviewDelete').hide(); - - $review.toggleClass('show', show > 1); - if(show > 2) highlight($review); - - if(!line && review.line) line = review.line; - if(line) - { - var $row = $rows.filter('[data-line="' + line + '"]').last(); - if(review.entry) $row = $('#diff[data-entry="' + review.entry + '"]').find('tr').filter('[data-line="' + line + '"]'); - if($row.length == 0) return false; - - $commentRow = $row.next('tr'); - if($row.hasClass('commented')) $commentRow = $row.nextAll('tr.comment-row').first(); - if(!$commentRow.hasClass('comment-row')) - { - $commentRow = $('' + (isInline ? '
    ' : '
    ') + ''); - $row.addClass('commented').after($commentRow); - } - - $commentRow.find('.comment-list').append($review); - - if(show && $commentRow.hasClass('comment-row')) $commentRow.addClass('show'); - } - - return $review; - }; - - var toggleComment = function($row, show) - { - var $commentRow; - if($row.hasClass('comment-row')) - { - $commentRow = $row; - $row = $commentRow.prev('tr'); - if($row.hasClass('action-row')) - { - $row = $row.prev('tr'); - } - } - else - { - $commentRow = $row.next('tr'); - if($commentRow.hasClass('action-row')) - { - $commentRow = $commentRow.next('tr'); - } - } - if(show === undefined) - { - show = !$row.hasClass('open'); - } - if($row.hasClass('commented') && $commentRow.hasClass('comment-row')) - { - $commentRow.toggleClass('show', show); - $row.toggleClass('open', show); - } - }; - - $diffCode.on('click', '.comment-btn', function(e) - { - $rows.removeClass('selected'); - var $row = $(this).closest('tr'); - if($diffCode.hasClass('with-action-row') && $row.hasClass('with-action-row')) - { - $diffCode.removeClass('with-action-row'); - } - else - { - $diffCode.addClass('with-action-row'); - var line = $row.attr('data-line'); - if(!$row.hasClass('with-action-row')) - { - $rows.removeClass('with-action-row') - $row.addClass('with-action-row'); - - $reviewForm.find('input[name="begin"]').val(line); - $reviewForm.find('input[name="end"]').attr('min', line).val(line); - $reviewForm.find('select#assignedTo').trigger("chosen:updated"); - $reviewForm.find('input#entry').val($row.closest('table#diff').data('entry')); - - $row.after($reviewFormRow); - - KindEditor.remove('#commentText'); - $('#commentText').kindeditor(); - } - highlight($reviewForm); - $reviewForm.find('input[name="title"]').focus(); - $row.addClass('selected'); - } - e.stopPropagation(); - }).on('click', '.reviewDelete', function(e) - { - var $review = $(this).closest('.panel-review'); - if(!$review.length) return; - - if(confirm(confirmDelete)) - { - var link = createLink($review.data('objectType'), 'delete', 'id=' + $review.data('id') + '&confirm=yes'); - $.get(link, function(data) - { - var $commentRow = $review.closest('.comment-row'); - if($commentRow.find('.panel-review').length === 1) - { - $commentRow.removeClass('show').prev('tr').removeClass('commented'); - } - $review.remove(); - }); - } - e.stopPropagation(); - return false; - }).on('click', 'tr.commented', function() - { - toggleComment($(this)); - }).on('click', '.panel-review > .panel-heading', function() - { - $(this).closest('.panel-review').toggleClass('show'); - }); - - $reviewForm.submit(function() - { - $(this).ajaxSubmit( - { - success:function(json) - { - json = $.parseJSON(json); - if(json.result == 'fail') - { - var message = ''; - if(typeof(json.message) != 'string') - { - for(i in json.message) - { - if(typeof(json.message[i]) == 'string') - { - message += json.message[i] + '\n'; - } - else - { - for(j in json.message[i]) - { - message += json.message[i][j] + '\n'; - } - } - } - } - else - { - message += json.message + '\n'; - } - alert(message); - return false; - } - - createReview(json, json.line, 3); - $diffCode.removeClass('with-action-row'); - $diffCode.find('tr.with-action-row.selected').removeClass('selected'); - $reviewForm.find('#title').val(''); - KindEditor.html('#commentText', ''); - }, - beforeSubmit:function(formData, jqForm) - { - var form = jqForm[0]; - if(!form.product.value) - { - alert(productError); - return false; - } - if(!form.title.value) - { - alert(titleError); - $reviewForm.find('input[name="title"]').focus(); - return false; - } - } - }); - return false; - }).on('change', 'input[name="begin"]', function() - { - var begin = $(this).val(); - var $end = $reviewForm.find('input[name="end"]').attr('min', begin); - if(parseInt($end.val()) < parseInt(begin)) - { - $end.val(begin); - } - }); - - if(reviews) - { - var lineReviews; - for(var line in reviews) - { - if(line) - { - lineReviews = reviews[line]; - for(var i in lineReviews) createReview(lineReviews[i], line); - } - } - } - - setTimeout(anchor, 200); - - $(document).on('click', function() - { - $('.highlight').removeClass('highlight'); - }); - - /** - * Anchor - * - * @access public - * @return void - */ - function anchor() - { - var hash = window.location.hash; - if(!hash) return false; - - var line = hash.substr(1).replace('L', ''); - var $row = $('.diff tr[data-line="' + line +'"]').first(); - if($row.length) return false; - - var anchor = $row.offset().top; - $('body,html').animate({scrollTop:anchor - 50}, 500); - - $row.addClass('highlight'); - if($row.hasClass('commented')) - { - toggleComment($row, true); - var $commentRow = $row.next('tr'); - if($commentRow.hasClass('comment-row')) $commentRow.addClass('highlight'); - } - } - } -}); diff --git a/module/mr/js/edit.js b/module/mr/js/edit.js deleted file mode 100644 index 332f0425bc..0000000000 --- a/module/mr/js/edit.js +++ /dev/null @@ -1,31 +0,0 @@ -$(function () -{ - $('#repoID').change(function () - { - repoID = $(this).val(); - jobUrl = createLink('mr', 'ajaxGetJobList', "repoID=" + repoID); - $.get(jobUrl, function (response) - { - $('#jobID').html('').append(response); - $('#jobID').chosen().trigger("chosen:updated");; - }); - }); - - $('#jobID').change(function () - { - jobID = $(this).val(); - compileUrl = createLink('mr', 'ajaxGetCompileList', "job=" + jobID); - $.get(compileUrl, function (response) - { - $('#compile').html('').append(response); - $('#compile').chosen().trigger("chosen:updated");; - }); - }); - - $("#needCI").change(function() - { - if(this.checked == false) $("#jobID").parent().parent().addClass('hidden'); - if(this.checked == true) $("#jobID").parent().parent().removeClass('hidden'); - }); - $("#needCI").trigger('change'); -}); diff --git a/module/mr/js/link.js b/module/mr/js/link.js deleted file mode 100644 index 343413fbf9..0000000000 --- a/module/mr/js/link.js +++ /dev/null @@ -1,86 +0,0 @@ -function showLink(productID, type, orderBy, param) -{ - if(type == 'story') method = 'linkStory'; - else if(type == 'bug') method = 'linkBug'; - else if(type == 'task') method = 'linkTask'; - - loadURL(createLink('mr', method, 'MRID=' + MRID + '&productID=' + productID + (typeof(param) == 'undefined' ? '' : param) + (typeof(orderBy) == 'undefined' ? '' : "&orderBy=" + orderBy)), type); - - $('.actions').find("a[href*='" + type + "']").addClass('hidden'); -} - -/** - * Load URL. - * - * @param string $url - * @param string $type - * @access public - * @return void - */ -function loadURL(url, type) -{ - $.get(url, function(data) - { - var $pane = $(type == 'story' ? '#stories' : (type == 'bug' ? '#bugs' : '#tasks')); - $pane.find('.main-table').hide(); - var $linkBox = $pane.find('.linkBox').html(data).removeClass('hidden'); - $linkBox.html(data).removeClass('hidden'); - $linkBox.find('[data-ride="table"]').table(); - $linkBox.find('[data-ride="pager"]').pager(); - $linkBox.find('[data-ride="pager"] li a.pager-item').click(function() - { - loadURL($(this).attr('href'), type); - return false; - }); - $linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').off('click'); - $linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').click(function() - { - line = $linkBox.find('[data-ride="pager"]').attr('data-link-creator'); - line = line.replace('{recPerPage}', $(this).attr('data-size')).replace('{page}', $linkBox.find('[data-ride="pager"]').attr('data-page')); - $.cookie($linkBox.find('[data-ride="pager"]').attr('data-page-cookie'), $(this).attr('data-size'), {expires:config.cookieLife, path:config.webRoot}); - loadURL(line, type); - return false; - }); - $.toggleQueryBox(true, $linkBox.find('#queryBox')); - }); -} - -$(function() -{ - if(link == 'true') showLink(productID, type, orderBy, param); - var infoShowed = false; - $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) - { - var href = $(e.target).attr('href'); - var tabPane = $(href + '.tab-pane'); - if(tabPane.size() == 0) return; - var formID = tabPane.find('.linkBox').find('form:last'); - if(formID.size() == 0) formID = tabPane.find('form:last'); - if(href == '#planInfo' && !infoShowed) - { - $('#planInfo img').each(function() - { - var $tr = $('#planInfo .detail-content .table-data tbody tr:first'); - width = $tr.width() - $tr.find('th').width(); - if($(this).parent().prop('tagName').toLowerCase() == 'a') $(this).unwrap(); - setImageSize($(this), width, 0); - }); - - infoShowed = true; - } - }); - - $('#storyList').on('sort.sortable', function(e, data) - { - var list = ''; - for(i = 0; i < data.list.length; i++) list += $(data.list[i].item).attr('data-id') + ','; - $.post(createLink('productplan', 'ajaxStorySort', 'productID=' + productID), {'stories' : list, 'orderBy' : orderBy, 'pageID' : storyPageID, 'recPerPage' : storyRecPerPage, 'recTotal' : storyRecTotal}, function() - { - var $target = $(data.element[0]); - $target.hide(); - $target.fadeIn(1000); - order = 'order_asc'; - history.pushState({}, 0, createLink('productplan', 'view', "productID=" + productID + '&type=story&orderBy=' + order)); - }); - }); -}); diff --git a/module/mr/js/view.js b/module/mr/js/view.js deleted file mode 100644 index dd3ea725bd..0000000000 --- a/module/mr/js/view.js +++ /dev/null @@ -1,17 +0,0 @@ -$(document).ready(function() -{ - $('#mergeButton,.mergeButton').click(function() - { - link = $(this).attr('href'); - $.getJSON(link, function(response) - { - if(response.result == 'success') - { - $.zui.messager.success(response.message); - setTimeout(function(){ location.href=response.locate }, 2500); - } - if(response.result == 'fail') $.zui.messager.danger(response.message); - }); - return false; - }); -}); diff --git a/module/my/css/bug.css b/module/my/css/bug.css deleted file mode 100644 index 72b2a302fb..0000000000 --- a/module/my/css/bug.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-confirm {width:60px;} -[lang^=en] .c-assignedTo {width: 105px !important;} diff --git a/module/my/css/changepassword.css b/module/my/css/changepassword.css deleted file mode 100644 index ecc87d05bb..0000000000 --- a/module/my/css/changepassword.css +++ /dev/null @@ -1,3 +0,0 @@ -#mainContent table > tbody > tr > td > div.text-danger.help-text {word-break: break-all;} -[lang^=fr] #mainContent table > tbody > tr {white-space: nowrap;} -.panel-heading {padding-top: 1rem !important;} diff --git a/module/my/css/doc.css b/module/my/css/doc.css deleted file mode 100644 index 845339aa41..0000000000 --- a/module/my/css/doc.css +++ /dev/null @@ -1,15 +0,0 @@ -body {margin-bottom: 25px;} -.fullscreen-close {top: 8px !important;} -#docList.table .c-name > .ajaxCollect {float: right; position: relative; right: 10px; top: 0px;} -#docList th.c-id {width: 72px;} -#docList th.c-user {width: 80px;} -#docList th.c-actions {width: 84px; padding-left: 15px;} -#docList .c-object {width: 180px; overflow: hidden; white-space: nowrap; text-overflow: clip;} -#docList.table .c-name > .doc-title {display: inline-block; max-width: calc(100% - 40px); overflow: hidden; background: transparent; padding-right:0px;} -#docList.table .c-name[data-status=draft] > .doc-title {max-width: calc(100% - 80px);} -#docList.table .c-name > span.doc-title {line-height: 0; vertical-align: inherit;} -#docList.table .c-name > .draft {background-color:rgba(129, 102, 238, 0.12); color:#8166EE;} -#docList .btn {padding: 0 2px;} -#docList .ajaxCollect {width: 30px; padding: 0 6px;} -.btn.ajaxCollect > img {width: 20px;} -#queryBox .btn-save-form, #queryBox #toggle-queries{display: none;} diff --git a/module/my/css/dynamic.css b/module/my/css/dynamic.css deleted file mode 100644 index e95b8699ac..0000000000 --- a/module/my/css/dynamic.css +++ /dev/null @@ -1,34 +0,0 @@ -#dynamics {padding: 10px 0;} -.dynamic {position: relative; padding-left: 170px;} -.dynamic-date {position: absolute; left: 0; top: 0; width: 150px; border: 2px solid #eee; border-radius: 4px; padding: 14px 20px; height: 58px;} -.dynamic-date:before {content: ' '; display: block; position: absolute; right: -22px; top: 26px; height: 2px; width: 20px; background-color: #eee;} -.dynamic-date > .date-label, -.dynamic-date > .date-text {font-size: 18px; display: block;} -.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;} -.dynamic-date > .date-label {margin-top: -8px;} -.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;} -.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; transition: max-height .2s; overflow: hidden;} -.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;} -.dynamic .timeline-text {color: #3C4353;} -.dynamic .text-muted {color: #838A9D;} -.dynamic .label-id {top: -1px; border: 1px solid rgba(131,138,157,0.25); color: #838A9D;} -.dynamic.active .timeline, -.dynamic.active .dynamic-date {border-color: #00a9fc;} -.dynamic.active .dynamic-date:before {background-color: #00a9fc;} -.dynamic.collapsed .timeline {max-height: 58px;} -.dynamic.collapsed .timeline > li + li {display: none;} -.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';} - -.timeline > li:before {left: -26px;} -.timeline > li + li:after {left: -23px;} -.timeline-text {margin-left: -18px;} -.label-action {padding: 0 4px;} -.label-id {margin-left: 4px;} -.timeline > li.active:before {left: -30px;} -.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;} -.timeline > li.collected > div:after {background-color: #FFAF65;} -.timeline > li.releaseddoc > div:after {background-color: #66A2FF;} -.timeline > li > div:after {left: -27px;} -.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;} -.timeline > li > div > .timeline-text > a {color: #313C52;} diff --git a/module/my/css/editprofile.css b/module/my/css/editprofile.css deleted file mode 100644 index cbedc86e4e..0000000000 --- a/module/my/css/editprofile.css +++ /dev/null @@ -1,2 +0,0 @@ -.body-modal .outer > .container > form {padding: 5px 0 10px;} -.w-verifyPassword {width: 120px !important;} diff --git a/module/my/css/execution.css b/module/my/css/execution.css deleted file mode 100644 index 1e329cc330..0000000000 --- a/module/my/css/execution.css +++ /dev/null @@ -1,3 +0,0 @@ -.c-hours, .c-progress {width: 80px !important;} -.c-status, .c-date {padding-right: 8px !important; text-align: center;} -.align-right {text-align: right; padding-right: 8px !important;} diff --git a/module/my/css/managecontacts.css b/module/my/css/managecontacts.css deleted file mode 100644 index ba5a1455e6..0000000000 --- a/module/my/css/managecontacts.css +++ /dev/null @@ -1,6 +0,0 @@ -body.body-modal {padding-bottom: 20px; min-height: 400px;} -.side-col {padding-right: 40px;} -.btn-block {display: block; width: 100%; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;} -.contactListTitle {margin-left: 45px !important;} -.createBtn {width: 100%; margin-bottom: 5px;} -.main-col .main-header .title {margin-left: 17px !important;} diff --git a/module/my/css/preference.css b/module/my/css/preference.css deleted file mode 100644 index edcebaff0e..0000000000 --- a/module/my/css/preference.css +++ /dev/null @@ -1,26 +0,0 @@ -.preference .table-form > tbody > tr > th {font-weight: 400; color: #0B0F18;} -.preference .chosen-container-single .chosen-single > span {color: #313C52;} -.tip {margin-top: 10px;} - -.preference > .preference-border {display: flex; padding: 5px 16px; border: 1px solid #EDEEF2;} -.preference-border > .preference-img {flex: 0 0 80px;} -.preference.picker-option-active > .preference-border {box-shadow: 0px 0px 1px 1px #2E7FFF;} -.preference.picker-option-active {background: unset !important;} -.preference.picker-option-active > .preference-border {background: rgba(230,240,255, 0.4) !important;} -.picker-option.picker-option-selected.preference {background: unset !important;} -.picker-option.picker-option-selected.preference > .preference-border {background: rgba(230,240,255, 0.4) !important;} -.preference-text {display: flex; flex-direction: column; justify-content: space-around; padding-left: 5px;} -.preference-text > .title {color: #0B0F18; font-size: 13px;} -.preference-text > .context {color: #838A9D; font-size: 12px; overflow: hidden; white-space: normal;} - -.picker-option.picker-option-active, -.picker-single .picker-option.picker-option-selected.picker-option-active.option-ursr, -.picker-option.picker-option-selected.option-ursr {background: unset !important; color: unset;} -.picker-option.picker-option-active > .border, -.picker-single .picker-option.picker-option-selected.picker-option-active.option-ursr > .border, -.picker-single .picker-option.picker-option-selected.picker-option-active.option-ursr > .border {background: rgba(230,240,255, 0.4) !important;} -#pickerDropMenu-pk_URSR > .picker-option-list {display: flex; flex-wrap: wrap;} -.option-ursr {flex: 1 1 50%;} -.option-ursr > .border {height: 46px; display: flex; padding: 5px 16px; border: 1px solid #EDEEF2; align-items: center;} -.option-ursr > .border > .value {margin-right: 20px; width: 20px; height: 20px; border-radius: 100%; background: rgba(230,240,255, 0.4);} -.option-ursr > .border > .value > p {line-height: 20px; text-align: center;} diff --git a/module/my/css/profile.css b/module/my/css/profile.css deleted file mode 100644 index 2f157a6dbc..0000000000 --- a/module/my/css/profile.css +++ /dev/null @@ -1,16 +0,0 @@ -.body-modal .main-header {padding: 20px 0px 24px 0; border-bottom: unset;} -.row table {width: 100%; margin-top: 5px; margin-left: 20px;} -table+table {border-top: 1px solid #eee;} -.row th {width: 17%; line-height: 30px; padding-right: 20px; text-align: right; font-weight: unset;} -.row td {width: 33%; text-align: left; font-weight: 700;} -.main-actions {margin: 5px 0 10px 0; text-align: center;} -.user-title {margin: 10px 10px -10px 10px; font-size: 14px; font-weight: bold; padding-left: 10px;} -.user-name {font-weight: bold;} -.user-role {color: #5B606E;} -.user-name, .user-role {font-size: 14px; vertical-align: top; display: table; padding-left: 310px;} - -#avatarUpload {display: inline-block; width: 40px; height: 40px; position: absolute; left: 265px} -#avatarForm {position: absolute; top: 0; left: 0; right: 0; bottom: 0;} -#avatarUploadBtn {display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0;} -#avatarUploadBtn {opacity: 0; color: #fff; border-radius: 50%; line-height: 50px;} -#avatarUploadBtn:hover {opacity: 1; background-color: rgba(0,0,0,.5);} diff --git a/module/my/css/project.css b/module/my/css/project.css deleted file mode 100644 index 3c6300af47..0000000000 --- a/module/my/css/project.css +++ /dev/null @@ -1,16 +0,0 @@ -#projectTableList > tr.drop-not-allowed {opacity: 0.1 !important;} -#projectList .c-actions {overflow: visible;} -#projectTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;} -#projectList .c-budget {width: 100px; padding-right: 20px;} -#projectTableList .c-budget {width: 100px; padding-right: 20px;} - -.c-date {width: 80px;} -.label-warning, .label-info {width: 60px !important;} -.project-type-label.label-outline {width: 50px; min-width: 50px;} -.c-date {width: 120px;} - -#projectList td.c-name {padding-right: 0px;} -#projectList td.c-name .project-name {display: flex; align-items: center;} -#projectList td.c-name .project-name > span {flex: none; margin-left: 5px;} -#projectList td.c-name .project-name > a {overflow: hidden; display: inline-block; max-width: calc(100% - 50px);} -#projectList td.c-name .project-name.has-suffix > a {padding-right: 5px;} diff --git a/module/my/css/requirement.css b/module/my/css/requirement.css deleted file mode 100644 index de64b42228..0000000000 --- a/module/my/css/requirement.css +++ /dev/null @@ -1,14 +0,0 @@ -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} -.table td.has-child > a:not(.story-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: clip; white-space: nowrap;} -.table td.has-child > .story-toggle {color: #838a9d; position: relative; top: 1px; left: 2px;} -.table td.has-child > .story-toggle:hover {color: #006af1; cursor: pointer;} -.table td.has-child > .story-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} -.table td.has-child > .story-toggle > .icon:before {text-align: left;} -.table td.has-child > .story-toggle.collapsed > .icon {-ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);} -.table td.c-hours {padding-right: 12px;} -.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} -@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};} -.c-span {margin-left: 22px;} -[lang^=de] .c-hours{width: 105px;} diff --git a/module/my/css/score.css b/module/my/css/score.css deleted file mode 100644 index f8ae27d3d9..0000000000 --- a/module/my/css/score.css +++ /dev/null @@ -1,3 +0,0 @@ -.c-time {width: 200px;} -.c-module, .c-method {width: 150px;} -.c-before, .c-score, .c-after {width: 100px;} diff --git a/module/my/css/story.css b/module/my/css/story.css deleted file mode 100644 index 89781c2847..0000000000 --- a/module/my/css/story.css +++ /dev/null @@ -1,14 +0,0 @@ -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} -.table td.has-child > a:not(.story-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: clip; white-space: nowrap;} -.table td.has-child > .story-toggle {color: #838a9d; position: relative; top: 1px; left: 2px;} -.table td.has-child > .story-toggle:hover {color: #006af1; cursor: pointer;} -.table td.has-child > .story-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} -.table td.has-child > .story-toggle > .icon:before {text-align: left;} -.table td.has-child > .story-toggle.collapsed > .icon {-ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);} -.table td.c-hours {padding-right: 12px;} -.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} -@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};} -.c-actions-6 {width: 185px;} -[lang^=de] .c-hours {width: 105px;} diff --git a/module/my/css/task.css b/module/my/css/task.css deleted file mode 100644 index 742b4ff517..0000000000 --- a/module/my/css/task.css +++ /dev/null @@ -1,37 +0,0 @@ -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} -.table td.has-child > a:not(.task-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; white-space: nowrap;} -.table td.has-child > .task-toggle {color: #838a9d; position: relative; top: 1px; line-height: 16px;} -.table td.has-child > .task-toggle:hover {color: #006af1; cursor: pointer;} -.table td.has-child > .task-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} -.table td.has-child > .task-toggle > .icon:before {text-align: left;} -.table td.has-child > .task-toggle.collapsed {top: 0;} -.table td.has-child > .task-toggle.collapsed > .icon {-ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);} -.table td.c-hours {padding-right: 12px;} -.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} -@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};} - -.c-hours {width: 50px;} -.c-status, .c-date, .c-user-short {width: 70px;} -.c-project {width: 130px;} -#taskTable .assigned-title{width: 110px; padding-left: 29px;} - -html[lang="en"] .c-date {width: 80px;} -html[lang="en"] .c-user-short {width: 88px;} -[lang^=en] #taskTable .c-project {width: 100px} -[lang^=en] #taskTable .assigned-title {width: 120px !important;} -[lang^=de] #taskTable .c-name {width: 100px;} -[lang^=de] #taskTable .c-project {width: 80px;} -[lang^=de] #taskTable .c-date {width: 78px;} -[lang^=de] #taskTable .assigned-title {width: 123px !important;} -[lang^=de] #taskTable .c-user {width: 118px;} -[lang^=de] #taskTable .estimate, [lang^=de] #taskTable .consumed {width: 86px;} -[lang^=de] #taskTable .c-user-short {width: 75px;} -[lang^=fr] #taskTable .c-name {width: 120px;} -[lang^=fr] #taskTable .c-project {width: 100px;} -[lang^=fr] #taskTable .c-date {width: 91px;} -[lang^=fr] #taskTable .assigned-title {width: 130px !important;} -[lang^=fr] #taskTable .c-user-short {width: 75px;} -[lang^=fr] #taskTable .c-status {width: 71px;} -#myTaskForm table tbody tr td.c-actions .dividing-line {width: 1px; height: 16px; display: inline-block; vertical-align: middle; background: #F4F5F7; margin: 0 4px 0 0;} diff --git a/module/my/css/team.css b/module/my/css/team.css deleted file mode 100644 index f576f4cc76..0000000000 --- a/module/my/css/team.css +++ /dev/null @@ -1,5 +0,0 @@ -.c-gender {width: 80px;} -.c-skype, .c-visits {width: 100px;} -.c-phone {width: 128px;} -.c-email {width: 128px;} -.c-role {width: 96px;} diff --git a/module/my/css/testcase.css b/module/my/css/testcase.css deleted file mode 100644 index 80b0d560ff..0000000000 --- a/module/my/css/testcase.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-status, .c-type {width: 70px;} -.c-user {width: 80px;} diff --git a/module/my/css/testtask.css b/module/my/css/testtask.css deleted file mode 100644 index 4c9d612635..0000000000 --- a/module/my/css/testtask.css +++ /dev/null @@ -1,4 +0,0 @@ -.c-execution {width: 200px} -.c-build {width: 120px;} -.c-id {width: 60px;} -.c-status {width: 80px;} diff --git a/module/my/css/todo.css b/module/my/css/todo.css deleted file mode 100644 index 6ee004343a..0000000000 --- a/module/my/css/todo.css +++ /dev/null @@ -1,13 +0,0 @@ -.datepicker-wrapper {width: 110px !important;} -.datepicker-wrapper .form-control {max-width: 110px; line-height: 25px; height: 26px !important;} -.btn-group button.dropdown-toggle.btn-primary {padding: 6px;} -.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);} -.btn-toolbar .space {min-height: 1px; margin: 0 -3px 0 10px;} -.iconCenter {top: -2px !important;} - -#switchButton {background: #fff !important;} -.panel-actions {position: relative; padding: 0;} -.panel-actions .btn-icon {padding-left: 7px;} -[lang^=de] .c-pri {width: 69px;} -[lang^=fr] .c-pri {width: 82px;} -[lang^=en] .c-user, [lang^=fr] .c-user {width: 100px !important;} diff --git a/module/my/js/changepassword.js b/module/my/js/changepassword.js deleted file mode 100644 index 25f455269e..0000000000 --- a/module/my/js/changepassword.js +++ /dev/null @@ -1,36 +0,0 @@ -$(document).ready(function() -{ - var originalEncrypted = false; - $('#originalPassword').change(function(){originalEncrypted = false}); - - var password1Encrypted = false - var password2Encrypted = false - $('#password1').change(function(){password1Encrypted = false}); - $('#password2').change(function(){password2Encrypted = false}); - - var passwordStrength = 0; - $('#submit').click(function() - { - var password = $('input#originalPassword').val().trim(); - var password1 = $('input#password1').val().trim(); - var rand = $('input#verifyRand').val(); - if(!password1Encrypted) - { - passwordStrength = computePasswordStrength(password1); - $("#passwordLength").val(password1.length); - } - - if($("form input[name=passwordStrength]").length == 0) $('#submit').after(""); - $("form input[name=passwordStrength]").val(passwordStrength); - - if(!originalEncrypted && password) $('input#originalPassword').val(md5(md5(password) + rand)); - originalEncrypted = true; - - var password1 = $('#password1').val().trim(); - var password2 = $('#password2').val().trim(); - if(password1 && !password1Encrypted) $('#password1').val(md5(password1) + rand); - if(password2 && !password2Encrypted) $('#password2').val(md5(password2) + rand); - password1Encrypted = true; - password2Encrypted = true; - }); -}); diff --git a/module/my/js/doc.js b/module/my/js/doc.js deleted file mode 100644 index 7d99c02b41..0000000000 --- a/module/my/js/doc.js +++ /dev/null @@ -1,16 +0,0 @@ -$('.ajaxCollect').click(function (event) { - var obj = $(this); - var url = obj.data('url'); - $.get(url, function(response) - { - if(response.status == 'yes') - { - obj.children('img').attr('src', 'static/svg/star.svg'); - } - else - { - obj.children('img').attr('src', 'static/svg/star-empty.svg'); - } - }, 'json'); - return false; -}); diff --git a/module/my/js/editprofile.js b/module/my/js/editprofile.js deleted file mode 100644 index 3d91b9161c..0000000000 --- a/module/my/js/editprofile.js +++ /dev/null @@ -1,36 +0,0 @@ -$(document).ready(function() -{ - var verifyEncrypted = false; - $('#verifyPassword').change(function(){verifyEncrypted = false}); - - var password1Encrypted = false - var password2Encrypted = false - $('#password1').change(function(){password1Encrypted = false}); - $('#password2').change(function(){password2Encrypted = false}); - - var passwordStrength = 0; - $('#submit').click(function() - { - var password = $('input#verifyPassword').val(); - var password1 = $('input#password1').val(); - if(!password1Encrypted) - { - passwordStrength = computePasswordStrength(password1); - $("#passwordLength").val(password1.length); - } - - if($("form input[name=passwordStrength]").length == 0) $('#submit').after(""); - $("form input[name=passwordStrength]").val(passwordStrength); - - var rand = $('input#verifyRand').val(); - if(!verifyEncrypted && password) $('input#verifyPassword').val(md5(md5(password) + rand)); - verifyEncrypted = true; - - var password1 = $('#password1').val(); - var password2 = $('#password2').val(); - if(password1 && !password1Encrypted) $('#password1').val(md5(password1) + rand); - if(password2 && !password2Encrypted) $('#password2').val(md5(password2) + rand); - password1Encrypted = true; - password2Encrypted = true; - }); -}); diff --git a/module/my/js/managecontacts.js b/module/my/js/managecontacts.js deleted file mode 100644 index 62cb273801..0000000000 --- a/module/my/js/managecontacts.js +++ /dev/null @@ -1 +0,0 @@ -$('#users').picker(); diff --git a/module/my/js/preference.js b/module/my/js/preference.js deleted file mode 100644 index 0a1f7c52ca..0000000000 --- a/module/my/js/preference.js +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Init preference for picker. - * - * @access public - * @return void - */ -function initPreference() { - var objPngSrc = { - 'program-browse': 'list', - 'program-project': 'list-recent', - 'program-kanban': 'kanban', - - 'product-index': 'panel-recent-browse', - 'product-all': 'list', - 'product-dashboard': 'panel', - 'product-browse': 'list-recent', - 'product-kanban': 'kanban', - - 'project-browse': 'list', - 'project-execution': 'list-recent', - 'project-index': 'panel-recent-browse', - 'project-kanban': 'kanban', - - 'execution-all': 'list', - 'execution-task': 'list-recent', - 'execution-executionkanban': 'kanban', - } - - /** - * Render program option. - * - * @param object $option - * @param object $b - * @access public - * @return void - */ - function optionRenderProgram($option, b) - { - /* transform , to , then split to fit lang */ - var textArr = b.text.split('/'); - if (!$option.hasClass('preference')) - { - $option.empty(); - $option.addClass('preference'); - $option.attr("title", textArr[0]); - $option.prepend('
    ' + textArr[0] + '
    ' + textArr[1] + '
    '); - } - return $option; - } - - /** - * Render program text. - * - * @param object $option - * @param object $b - * @access public - * @return void - */ - function textRenderProgram($text, b) - { - $text.empty(); - $text.addClass('preference-selection'); - $text.prepend('' + b.split('/')[0] + '') - return $text; - } - - /** - * Render URSR option. - * - * @param object $option - * @param object $b - * @access public - * @return void - */ - function optionRenderURSR($option, b) - { - if (!$option.hasClass('option-ursr')) - { - $option.addClass('option-ursr'); - $option.parent().addClass('list-ursr'); - $option.empty(); - $option.prepend('

    ' + (b.$_index + 1) + '

    ' + b.text + '
    '); - } - return $option; - } - - $('.programLink').picker({ - optionRender: optionRenderProgram, - selectionTextRender: textRenderProgram - }); - - $('.productLink').picker({ - optionRender: optionRenderProgram, - selectionTextRender: textRenderProgram - }); - - $('.projectLink').picker({ - optionRender: optionRenderProgram, - selectionTextRender: textRenderProgram - }); - - $('.executionLink').picker({ - optionRender: optionRenderProgram, - selectionTextRender: textRenderProgram - }); - - $('.URSR').picker({ - optionRender: optionRenderURSR - }); - - $(document).on('mousemove', 'a.picker-option', function() - { - $('.picker-option.text-primary').removeClass('text-primary'); - $(this).addClass('text-primary'); - }); - -} - -$(function() -{ - initPreference(); -}) diff --git a/module/my/js/profile.js b/module/my/js/profile.js deleted file mode 100644 index e5cd75e0b4..0000000000 --- a/module/my/js/profile.js +++ /dev/null @@ -1,26 +0,0 @@ -$(document).ready(function() -{ - $('#files').change(function() - { - $('#avatarForm').submit(); - }); - - $('#avatarUploadBtn').on('click', function() - { - $('#files').click(); - }); - - if(avatar) - { - window.parent.$('#userNav .avatar, #menu-avatar').html(''); - window.parent.$('#mainContent>.cell>.main-header>.avatar').html(''); - window.parent.$('#mainContent .avatar-' + userID).html(''); - } - - $('#avatarUploadBtn').tooltip(); -}); - -function uploadAvatar() -{ - $('#avatarUploadBtn').trigger('click'); -} diff --git a/module/my/js/requirement.js b/module/my/js/requirement.js deleted file mode 100644 index 7ce09255ea..0000000000 --- a/module/my/js/requirement.js +++ /dev/null @@ -1,21 +0,0 @@ -$(function() -{ - $('#storyList td.has-child .story-toggle').each(function() - { - var $td = $(this).closest('td'); - var labelWidth = 0; - if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); - $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); - }); - toggleFold('#myStoryForm', [], 0, 'requirement'); - - $(document).on('click', '.story-toggle', function(e) - { - var $toggle = $(this); - var id = $(this).data('id'); - var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); - $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); - e.stopPropagation(); - e.preventDefault(); - }); -}) diff --git a/module/my/js/story.js b/module/my/js/story.js deleted file mode 100644 index d61d1c927a..0000000000 --- a/module/my/js/story.js +++ /dev/null @@ -1,20 +0,0 @@ -$(function() -{ - $('#storyList td.has-child .story-toggle').each(function() - { - var $td = $(this).closest('td'); - var labelWidth = 0; - if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); - $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); - }); - toggleFold('#myStoryForm', [], 0, 'story'); - $(document).on('click', '.story-toggle', function(e) - { - var $toggle = $(this); - var id = $(this).data('id'); - var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); - $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); - e.stopPropagation(); - e.preventDefault(); - }); -}) diff --git a/module/my/js/task.js b/module/my/js/task.js deleted file mode 100644 index 1a619e9755..0000000000 --- a/module/my/js/task.js +++ /dev/null @@ -1,21 +0,0 @@ -$(function() -{ - $(document).on('click', '.task-toggle', function(e) - { - var $toggle = $(this); - var id = $(this).data('id'); - var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); - $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); - - e.stopPropagation(); - e.preventDefault(); - }); - toggleFold('#myTaskForm', [], 0, 'my'); - $('#taskTable td.has-child .task-toggle').each(function() - { - var $td = $(this).closest('td'); - var labelWidth = 0; - if($td.find('.label').length > 0) labelWidth = $td.find('.label').width(); - $td.find('a').eq(0).css('max-width', $td.width() - labelWidth - 60); - }); -}); diff --git a/module/my/js/testcase.js b/module/my/js/testcase.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/my/js/todo.js b/module/my/js/todo.js deleted file mode 100644 index 63544fc788..0000000000 --- a/module/my/js/todo.js +++ /dev/null @@ -1,42 +0,0 @@ -function changeDate(date) -{ - date = date.replace(/\-/g, ''); - link = createLink('my', 'todo', 'type=' + date); - location.href=link; -} - - -$(function() -{ - // Support hash start with todo-1 - var hash = window.location.hash.toLowerCase(); - if(hash.indexOf('#todo-') === 0) - { - var todoId = hash.substr(6); - var url = createLink('todo', 'view', 'id=' + todoId + '&from=my', '', 'yes'); - var $a = $(''); - $a.attr({href: url}).modalTrigger( - { - 'data-toggle': 'modal', - type: 'iframe' - }).trigger('click'); - } - - $('#todoForm').table( - { - replaceId: 'todoIDList', - statisticCreator: function(table) - { - var $table = table.getTable(); - var $checkedRows = $table.find('tbody>tr.checked'); - var checkedTotal = $checkedRows.length; - var checkedWait = $checkedRows.filter("[data-status=wait]").length; - var checkedDoing = $checkedRows.filter("[data-status=doing]").length; - var checkedStatistics = checkedSummary.replace('%total%', checkedTotal) - .replace('%wait%', checkedWait) - .replace('%doing%', checkedDoing); - - return checkedTotal ? checkedStatistics : pageSummary; - } - }); -}); diff --git a/module/personnel/css/accessible.css b/module/personnel/css/accessible.css deleted file mode 100644 index b3e2a08c1d..0000000000 --- a/module/personnel/css/accessible.css +++ /dev/null @@ -1,4 +0,0 @@ -.c-id {width: 40px;} -.c-department {width: 120px;} -.c-user, .c-job {width: 80px;} -.c-genders {width: 60px;} diff --git a/module/personnel/css/addwhitelist.css b/module/personnel/css/addwhitelist.css deleted file mode 100644 index c0f46f805e..0000000000 --- a/module/personnel/css/addwhitelist.css +++ /dev/null @@ -1,3 +0,0 @@ -#object_chosen .chosen-single {width: 260px;} -#dept_chosen .chosen-single {width: 220px;} -#object_chosen .chosen-drop ul li .label {margin-top: 2px; background: #fff; color: #838a9d; border: 1px solid #d8d8d8;} diff --git a/module/personnel/css/invest.css b/module/personnel/css/invest.css deleted file mode 100644 index b975887bf1..0000000000 --- a/module/personnel/css/invest.css +++ /dev/null @@ -1 +0,0 @@ -.c-story {width: 150px;} diff --git a/module/personnel/css/whitelist.css b/module/personnel/css/whitelist.css deleted file mode 100644 index 1ce06e6c17..0000000000 --- a/module/personnel/css/whitelist.css +++ /dev/null @@ -1,5 +0,0 @@ -.c-dept, .c-role {overflow:hidden; text-overflow: ellipsis; white-space: nowrap;} -.c-phone {width: 120px;} -.c-email {width: 200px;} -.c-role {width: 105px;} -#userList td{overflow:hidden} diff --git a/module/personnel/js/accessible.js b/module/personnel/js/accessible.js deleted file mode 100644 index d49d16d017..0000000000 --- a/module/personnel/js/accessible.js +++ /dev/null @@ -1,2 +0,0 @@ -$('#dept' + deptID).addClass('active'); -$(".tree .active").parent('li').addClass('active'); diff --git a/module/personnel/js/addwhitelist.js b/module/personnel/js/addwhitelist.js deleted file mode 100644 index 2414f0c3d2..0000000000 --- a/module/personnel/js/addwhitelist.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - * Users by dept,execution,project,product or program. - * - * @param object $object - * @access public - * @return void - */ -function setObjectUsers() -{ - var copyID = $('#object').val(); - var deptID = $('#dept').val(); - var link = createLink(module, moduleMethod, 'objectID=' + objectID + '&deptID=' + deptID + '©ID=' + copyID + '&objectType=' + objectType + '&module=' + module); - if(module == 'program') link = createLink(module, moduleMethod, 'objectID=' + objectID + '&deptID=' + deptID + '©ID=' + copyID + '&programID=' + programID + '&from=' + from); - - location.href = link; -} - -/** - * Add an item. - * - * @param object obj - * @return void - */ -function addItem(obj) -{ - var dataID = $(obj).parent().parent().attr("data-id"); - var item = $("#addItem").html(); - index = Number(index) + 1; - $("#whitelist" + dataID).after(" " + item + ""); - $("#whitelist" + index).find("select").chosen(); -} - -/** - * Delete an item. - * - * @param object obj - * @return void - */ -function deleteItem(obj) -{ - if($('#whitelistForm .table tbody').children().length < 2) return false; - - var $tr = $(obj).parent().parent(); - var val = $tr.find('input[name^="realnames"]').val(); - showItem(val); - - $tr.remove(); -} - -/** - * Show the removed item. - * - * @param string val - * @return void - */ -function showItem(val) -{ - $("#whitelistForm tr td select[name^='accounts']").each(function() - { - var select = this; - $(this).children('option').each(function() - { - if($(this).html() == val) - { - $(this).css('display', ''); - } - }); - }); -} - -/** - * Hide the clicked item. - * - * @param object select - * @param string val - * @return void - */ -function hideItem(select, val) -{ - $(select).children('option').each(function() - { - if($(this).html() == val) - { - $(this).css("display", "none"); - } - }); -} - -/** - * Change user list. - * - * @return void - */ -function changeUsers() -{ - var select = {}; - - $('#whitelistForm').on("chosen:showing_dropdown", "tr td select[name^='accounts']", function() - { - select = this; - - /* Render the item of the value which is selected before the page loads. */ - $("input[name='realnames[]']").each(function() - { - hideItem(select, this.value); - }); - - /* Render the item of the value which is selected after the page loads. */ - $("a[class^='chosen-single chosen-single-with-deselect']").each(function() - { - var id = $(select).parent().parent().attr('data-id'); - userList[id - 1] = $(this).children('span').html(); - hideItem(select, $(this).children('span').html()); - }); - - $(select).trigger("chosen:updated"); - }); -} - -$(function() -{ - if(window.config.currentModule == 'personnel' && window.config.currentMethod == 'addwhitelist') $("li[data-id='set']").addClass('active'); - - userList = {}; - - changeUsers(); - - /* Listen the change of the select value. */ - $('#whitelistForm').on('change', "tr td select[name^='accounts']", function(e, data) - { - var select = this; - $("#whitelistForm tr td select[name^='accounts']").each(function() - { - var id = $(select).parent().parent().attr('data-id'); - var val = typeof(data.deselected == 'undefined') ? userList[id] : data.deselected; - showItem(val); - }); - }); - - $('#object_chosen').click(function() - { - if(objectType == 'sprint') $('#object_chosen ul li:first').append(' ') - }) -}) diff --git a/module/personnel/js/whitelist.js b/module/personnel/js/whitelist.js deleted file mode 100644 index 8b07ec79c4..0000000000 --- a/module/personnel/js/whitelist.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - if(window.config.currentModule == 'personnel' && window.config.currentMethod == 'whitelist') $("li[data-id='set']").addClass('active'); -}); diff --git a/module/pivot/css/bugcreate.css b/module/pivot/css/bugcreate.css deleted file mode 100644 index 46f45e44f6..0000000000 --- a/module/pivot/css/bugcreate.css +++ /dev/null @@ -1,5 +0,0 @@ -#begin {min-width: 85px;} -#end {min-width: 85px;} -#bug th {font-size: 12px;} -#bug th:nth-child(7) {width: 87px;} -#bug th:nth-child(10) {width: 100px;} diff --git a/module/pivot/css/preview.css b/module/pivot/css/preview.css deleted file mode 100644 index f03f615606..0000000000 --- a/module/pivot/css/preview.css +++ /dev/null @@ -1,17 +0,0 @@ -#mainContent > .side-col.col-lg {width: 240px;} -.main-col .btn-toolbar {margin-bottom: 10px;} -.main-position {position: relative;} -.child-position {position: absolute; right: 0;} -.parent-position {padding-right: 160px;} -.datagrid {overflow: auto;} -.heading-padding, .datagrid-padding {padding-left: 6px; padding-right: 6px;} - -.filter-items > .table-row{display: table!important;} -.filter-items .filter-item:first-child {padding-left: 0!important;} -.filterBox {display: flex; margin-bottom: 20px; margin-left: 6px; margin-right: 6px;} -.filter-items {display: flex; flex: 1; flex-wrap: wrap;} -.filter-item {padding: 0 16px 5px 0;} -.filter-item-grow {flex-grow: 1;} -.queryBtn {display: flex; align-items: center; padding-bottom: 5px; flex-basis: 60px;} -.filter-item .picker-selections {width: 128px; overflow: hidden; text-overflow: clip; white-space: nowrap;} -#filterItems .picker-selections {overflow: hidden; text-overflow: clip; white-space: nowrap;} diff --git a/module/pivot/css/productsummary.css b/module/pivot/css/productsummary.css deleted file mode 100644 index d3aeb68419..0000000000 --- a/module/pivot/css/productsummary.css +++ /dev/null @@ -1,5 +0,0 @@ -td.child {padding-left: 15px;} -.c-name {width: 200px;} -.c-count {width: 70px;} -#conditions {display: flex;} -#conditions .condition-options {margin-left: 16px;} diff --git a/module/pivot/css/projectdeviation.css b/module/pivot/css/projectdeviation.css deleted file mode 100644 index 5ee6104e66..0000000000 --- a/module/pivot/css/projectdeviation.css +++ /dev/null @@ -1,2 +0,0 @@ -.c-hours, .c-deviation, .c-deviation-rate {width: 100px;} -.c-id {width: 70px;} diff --git a/module/pivot/css/workload.css b/module/pivot/css/workload.css deleted file mode 100644 index 04afc3d79f..0000000000 --- a/module/pivot/css/workload.css +++ /dev/null @@ -1 +0,0 @@ -.c-hours, .c-count, .c-workload {width: 100px;} diff --git a/module/pivot/js/bugassign.js b/module/pivot/js/bugassign.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/pivot/js/bugcreate.js b/module/pivot/js/bugcreate.js deleted file mode 100644 index b6f828a140..0000000000 --- a/module/pivot/js/bugcreate.js +++ /dev/null @@ -1,23 +0,0 @@ -function changeParams(obj) -{ - var begin = $('#conditions').find('#begin').val(); - var end = $('#conditions').find('#end').val(); - var product = $('#conditions').find('#product').val(); - var execution = $('#conditions').find('#execution').val(); - if(begin.indexOf('-') != -1) - { - var beginarray = begin.split("-"); - var begin = ''; - for(i=0 ; i < beginarray.length ; i++) begin = begin + beginarray[i]; - } - if(end.indexOf('-') != -1) - { - var endarray = end.split("-"); - var end = ''; - for(i=0 ; i < endarray.length ; i++) end = end + endarray[i]; - } - - var params = window.btoa('begin=' + begin + '&end=' + end + '&product=' + product + '&execution=' + execution); - var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=bugcreate¶ms=' + params); - location.href = link; -} diff --git a/module/pivot/js/preview.js b/module/pivot/js/preview.js deleted file mode 100644 index 3ba0b4e01f..0000000000 --- a/module/pivot/js/preview.js +++ /dev/null @@ -1,298 +0,0 @@ -$(function() -{ - if(typeof pivotID == 'undefined' || !pivotID) return; - - expandTree(); - renderFilters(pivot); - initQueryBtn(); - - $('body').resize(() => {calcPreviewGrowFilter();}); - - $('[data-toggle="tooltip"]').tooltip(); -}); - -function expandTree() -{ - $('.pivot-' + groupID + '-' + pivotID).addClass('active'); - - var $tree = $('#pivotGroups').tree({name:'tree-group'}); - var tree = $tree.data('zui.tree'); - tree.expand($('.pivot-' + pivotID).parents('li')); -} - -/*$('.btn-export').click(function() -{ - if(typeof pivotID == 'undefined' || !pivotID) return; - pivot = getQueryInfo(); -}); -*/ - -function getQueryInfo() -{ - var pivotInfo = pivot; - pivotInfo.searchFilters = JSON.parse(JSON.stringify(pivotInfo.filters)); - - if(isQueryFilter(pivotInfo.filters)) - { - pivotInfo.filters.forEach(function(filter, index) - { - var find = $('#filterItems .filter-items').find('.filter-item-' + index + ' .form-' + filter.type); - if(find.length != 0) pivotInfo.searchFilters[index].default = find.val(); - }); - } - else - { - pivotInfo.filters.forEach(function(filter, index) - { - var filterItem = $('#filterItems .filter-items').find('.filter-item-' + index); - var type = filter.type; - if(type == 'input') - { - var find = filterItem.find(' .form-' + type); - if(find.length != 0) pivotInfo.searchFilters[index].default = find.val(); - } - else if(type == 'select') - { - var find = filterItem.find(' .form-' + type); - if(find.length != 0) pivotInfo.searchFilters[index].default = find.data('zui.picker').getValue(); - } - else if(type == 'date' || type == 'datetime') - { - var begin = filterItem.find('.form-' + type + '.begin'); - var end = filterItem.find('.form-' + type + '.end'); - - pivotInfo.searchFilters[index].default = - { - "begin": begin.length != 0 ? begin.val() : filter.default.begin, - "end": end.length != 0 ? end.val() : filter.default.end - }; - } - }); - } - - pivotInfo.step = 4; - return pivotInfo; -} - -/** - * Init query button. - * - * @access public - * @return void - */ -function initQueryBtn() -{ - $('.btn-query').click(function() - { - pivotInfo = getQueryInfo(); - $.post(createLink('pivot', 'ajaxGetPivot'), pivotInfo,function(resp) - { - var myDatagrid = $('#datagirdInfo'); - myDatagrid.find('.reportData').remove(); - myDatagrid.append(resp); - }); - - }); -} - -function calcPreviewGrowFilter() -{ - if(pivot.filters.length <= 0) return; - var $filterItems = $('#filterItems .filter-items'); - /* When refreshing this page, ZenTao load this page twice, when the first load isn't complete, jump back to index and load the second time, - the first load can't calc filter width, can't get the element using jQuery at first load. */ - var hasInit = true; - pivot.filters.forEach(function(filter, index) - { - var nowItem = '.filter-item-' + index; - var $titleSpan = $filterItems.find(nowItem).find('.input-group-addon').first(); - if(!$titleSpan.length) hasInit = false; - }); - if(!hasInit) return; - - var domWidth = $filterItems[0].getBoundingClientRect().width; - var nowWidth = domWidth; - var lineWrap = false; - var nowCount = 0; - var canGrowTotal = 0; - - $('.query-inside').addClass('hidden'); - $('.query-outside').addClass('visibility-hidden'); - pivot.filters.forEach(function(filter, index) - { - var nowItem = '.filter-item-' + index; - var $nowDom = $filterItems.find(nowItem); - var leftPadding = parseInt($nowDom.css('padding-left')); - var rightPadding = parseInt($nowDom.css('padding-right')); - var spanWidth = $nowDom.find('.input-group-addon').first()[0].getBoundingClientRect().width; - var filterWidth = ((filter.type == 'input' || filter.type == 'select') ? WIDTH_INPUT : WIDTH_DATE) + (spanWidth + leftPadding + rightPadding); - - /* Clear the flex-basis and set flex-basic again. */ - $nowDom.css('flex-basis', ''); - $nowDom.css('flex-basis', filterWidth); - if(nowWidth - filterWidth >= 0) - { - nowWidth -= filterWidth; - nowCount ++; - } - else - { - canGrowTotal += nowCount; - nowWidth = domWidth - filterWidth; - nowCount = 1; - lineWrap = true; - } - }); - - /* Clear all filter filter-item-grow and add class to support grow element. */ - $filterItems.children().removeClass('filter-item-grow'); - pivot.filters.forEach(function(filter, index) - { - var $nowDom = $filterItems.find('.filter-item-' + index); - if(canGrowTotal >= index + 1) $nowDom.addClass('filter-item-grow'); - if(filter.type == 'select' && $nowDom.find('.picker').length) $nowDom.find('.picker').find('.picker-selections').css('width', WIDTH_INPUT); - }); - - if(!lineWrap && nowWidth >= 60) $('.query-inside').removeClass('hidden'); - else $('.query-outside').removeClass('visibility-hidden'); - - /* Set picker-selection width, default 128px. */ - waitForRepaint(function() - { - pivot.filters.forEach(function(filter, index) - { - var $nowDom = $filterItems.find('.filter-item-' + index); - if(filter.type == 'select' && $nowDom.find('.picker').length) - { - var pickerWidth = $nowDom.hasClass('filter-item-grow') ? $nowDom.find('.picker')[0].getBoundingClientRect().width : WIDTH_INPUT; - $nowDom.find('.picker').find('.picker-selections').css('width', pickerWidth); - } - }); - }); - -} - -function renderFilters(pivot) -{ - if(pivot.filters.length == 0) return; - renderFilterItem(pivot.filters); - calcPreviewGrowFilter(); -} - -function renderFilterItem(filters) -{ - $('#filterItems .filter-items').empty(); - var tpl = isQueryFilter(filters) ? $('#queryFilterItemTpl').html() : $('#resultFilterItemTpl').html(); - - filters.forEach(function(filter, index) - { - var data = - { - index: index, - name: filter.name, - defaultValue: filter.default - }; - var html = $($.zui.formatString(tpl, data)) - $('#filterItems .filter-items').append(html); - - isQueryFilter(filters) ? initQueryControl(html, filter) : initResultControl(html, filter); - }); - $('#filterItems .filter-items').append(queryDom); -} - -function initQueryControl(container, filter, object, field) -{ - var type = filter.type; - var options = filter.typeOption; - var value = filter.default; - - container.find('.default-block').addClass('hidden'); - container.find('.default-block input[name="default"]').val(''); - - var control = container.find('.form-' + type); - control.val(filter.default); - control.parent('.default-block').removeClass('hidden'); - - if(type == 'date') setDateField('.form-date'); - if(type == 'datetime') setDateField('.form-datetime'); - if(type == 'select') - { - var picker = control.data('zui.picker'); - if(picker) picker.destroy(); - - $.post(createLink('pivot', 'ajaxGetSysOptions', 'type=' + options + '&object=' + object + '&field=' + field), function(resp) - { - control.html($(resp).html()); - control.picker(); - control.data('zui.picker').setValue(value); - }); - } -} - -function initResultControl(container, filter, object, field) -{ - var type = filter.type; - var value = filter.default; - - container.find('.default-block').addClass('hidden'); - container.find('.default-block input[name^="default"]').val(''); - - var control = container.find('.form-' + type); - if(type == 'date' || type == 'datetime') - { - container.find('.form-' + type + '.begin').val(filter.default.begin); - container.find('.form-' + type + '.end').val(filter.default.end); - } - else - { - control.val(filter.default); - } - control.parents('.default-block').removeClass('hidden'); - - if(type == 'date') control.datepicker(); - if(type == 'datetime') control.datetimepicker(); - if(type == 'select') - { - var picker = control.data('zui.picker'); - if(picker) picker.destroy(); - - var fieldSetting = pivot.fieldSettings[filter.field]; - var options = fieldSetting.type; - var object = fieldSetting.object; - var field = fieldSetting.field; - - var pickerOptions = - { - multi: true, - maxDropHeight: pickerHeight, - onReady: function() - { - if(!control.parent().find('.picker')) return; - if(window.getComputedStyle(control.parent().find('.picker').find('.picker-selections')[0]).getPropertyValue('width') !== 'auto') - { - var pickerWidth = control.parent().find('.picker')[0].getBoundingClientRect().width; - control.parent().find('.picker').find('.picker-selections').css('width', pickerWidth); - } - } - }; - if(value !== '') pickerOptions.defaultValue = value; - - var pivotParams = {sql: pivot.sql, filters: getQueryFilters(pivot)}; - $.post(createLink('pivot', 'ajaxGetSysOptions', 'type=' + options + '&object=' + object + '&field=' + field), pivotParams, function(resp) - { - control.html($(resp).html()); - control.picker(pickerOptions); - }); - } -} - -function exportData() -{ - const $domObj = $(".table-condensed")[0]; - exportFile($domObj); -} - -function isQueryFilter(filters) -{ - return filters.length > 0 && filters[0].from == 'query'; -} diff --git a/module/pivot/js/productsummary.js b/module/pivot/js/productsummary.js deleted file mode 100644 index db3e923c06..0000000000 --- a/module/pivot/js/productsummary.js +++ /dev/null @@ -1,13 +0,0 @@ -$('#conditions input:checkbox').change(function() -{ - var conditions = ''; - $('#conditions input:checkbox').each(function(i) - { - if($(this).prop('checked')) conditions += $(this).val() + ','; - }) - conditions = conditions.substring(0, conditions.length - 1); - - var params = window.btoa('conditions=' + conditions); - var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=productSummary¶ms=' + params); - location.href = link; -}) diff --git a/module/pivot/js/projectdeviation.js b/module/pivot/js/projectdeviation.js deleted file mode 100644 index b4ad884ff1..0000000000 --- a/module/pivot/js/projectdeviation.js +++ /dev/null @@ -1,36 +0,0 @@ -$(document).ready(function() -{ - initChart(); - - $('.icon-exclamation-sign').hover(function(){ - $('#desc').removeClass('hidden'); - }, function(){ - $('#desc').addClass('hidden'); - }); -}); - -function changeDate(begin, end) -{ - if(begin.indexOf('-') != -1) - { - var beginarray = begin.split("-"); - var begin = ''; - for(i=0 ; i < beginarray.length ; i++) - { - begin = begin + beginarray[i]; - } - } - if(end.indexOf('-') != -1) - { - var endarray = end.split("-"); - var end = ''; - for(i=0 ; i < endarray.length ; i++) - { - end = end + endarray[i]; - } - } - - var params = window.btoa('begin=' + begin + '&end=' + end); - var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=projectdeviation¶ms=' + params); - location.href = link; -} diff --git a/module/pivot/js/workload.js b/module/pivot/js/workload.js deleted file mode 100644 index fb0fb71a2e..0000000000 --- a/module/pivot/js/workload.js +++ /dev/null @@ -1,85 +0,0 @@ -function changeParams(obj) -{ - var begin = $('#conditions').find('#begin').val(); - var end = $('#conditions').find('#end').val(); - var workday = $('#conditions').find('#workday').val(); - var dept = $('#conditions').find('#dept').val(); - var assign = $('#conditions').find('#assign').val(); - var days = diffDate(begin, end); - - $('#days').val(days); - - if(begin.indexOf('-') != -1) - { - var beginarray = begin.split("-"); - var begin = ''; - for(i = 0; i < beginarray.length; i++) begin = begin + beginarray[i]; - } - if(end.indexOf('-') != -1) - { - var endarray = end.split("-"); - var end = ''; - for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i]; - } - - var params = window.btoa('begin=' + begin + '&end=' + end + '&days=' + days + '&workday=' + workday + '&dept=' + dept + '&assign=' + assign); - var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=workload¶ms=' + params); - location.href = link; -} - -/** - * Convert a date string to date object in js. - * - * @param string $date - * @access public - * @return date - */ -function convertStringToDate(dateString) -{ - dateString = dateString.split('-'); - return new Date(dateString[0], dateString[1] - 1, dateString[2]); -} - -/** - * Compute the diff days of two date. - * - * @param string $date1 - * @param string $date1 - * @access public - * @return int - */ -function diffDate(date1, date2) -{ - date1 = convertStringToDate(date1); - date2 = convertStringToDate(date2); - delta = (date2 - date1) / (1000 * 60 * 60 * 24) + 1; - - weekEnds = 0; - for(i = 0; i < delta; i++) - { - if((weekend == 2 && date1.getDay() == 6) || date1.getDay() == 0) weekEnds ++; - date1 = date1.valueOf(); - date1 += 1000 * 60 * 60 * 24; - date1 = new Date(date1); - } - return delta - weekEnds; -} - -$(function() -{ - var options = - { - language: config.clientLang, - weekStart: 1, - todayBtn: 1, - autoclose: 1, - todayHighlight: 1, - startView: 2, - forceParse: 0, - showMeridian: 1, - minView: 2, - format: 'yyyy-mm-dd', - startDate: new Date() - }; - $('input#begin,input#end').fixedDate().datetimepicker(options); -}); diff --git a/module/product/css/all.css b/module/product/css/all.css deleted file mode 100644 index 630c6a6e36..0000000000 --- a/module/product/css/all.css +++ /dev/null @@ -1,104 +0,0 @@ -@media screen and (min-width: 2048px) {.container {max-width: 2000px!important;}} -@media screen and (min-width: 2560px) {.container {max-width: 2380px!important;}} - -.side-col .detail-content {padding-left: 10px; margin-top: 0px;} -.tree li.has-list.open:before {border-left: none;} -#programTree li {padding: 0 0 0 8px;} -#programTree li.has-list {padding-left: 20px;} -#programTree li > a {display: block; padding: 5px 0; border-radius: 2px; padding-left: 6px; height: 30px;} -#programTree li > a > span {display: inline-block;} -#programTree li > a > span + span {margin-left: 8px;} -#programTree li.selected > a {background-color: #E8F3FC;} -#programTree li.selected > a > span.title {color: #006AF1;} -#programTree .label-id {border-color: #cbd0db; color: #7d8599;} -#programTree .label.label-type {background: #fff; border: 1px solid #7d8599; color: #7d8599;} - -#programTree li > a > span.title {color: #3C4353; white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;} -#programTree li > a > span.user {color: #838a9d;} -#programTree li > a > span.user > .icon-person {font-size: 14px; position: relative; top: -1px; color: #a6aab8;} - -#programTree li > .list-toggle {transform: rotate(0deg); width: 16px; height: 16px; border: 4px solid #a6aab8; border-radius: 2px; top: 7px;} -#programTree li > .list-toggle:before {content: ' '; display: block; position: absolute; border: 1px solid #a6aab8; top: 2px; left: -3px; right: -3px; bottom: 2px; min-width: 0; transition: all .2s;} -#programTree li > .list-toggle:hover:before, -#programTree li > .list-toggle:hover {border-color: #006AF1;} -#programTree li.open > .list-toggle {width: 12px; height: 12px; top: 9px; background-color: #a6aab8; border-width: 3px; left: 3px;} -#programTree li.open > .list-toggle:before {border: none; height: 2px; width: 6px; left: 0; top: 2px; background: #fff;} -#programTree li.open > .list-toggle:hover {background: #006AF1;} - -#programTree ul > li:after {display: block; position: absolute; content: ' '; border-top: 2px solid #cbd0db; top: 14px; left: -12px; z-index: 1; width: 10px;} -#programTree ul > li:before, -#programTree ul > li.has-list:before {background: none; content: ' '; display: block; position: absolute; width: auto; height: auto; border: none; border-left: 2px solid #cbd0db; top: -13px; bottom: 12px; left: -12px;} -#programTree ul > li:last-child:before {bottom: auto; height: 29px;} -#programTree ul > li:first-child:before {top: -9px;} -#programTree ul > li.has-list:first-child:before {top: -13px;} -#programTree ul > li.tree-single-item:before {height: 23px;} -#programTree ul > li.has-list:after {width: 14px;} -#programTree ul > li.item-meas a.selected {color: #0c64eb;} -.side-col {padding-right: 20px; width: 18%;} -#sidebar > .cell {width: 100%;} - -th.c-name {width: 400px;} -th.c-PO {width: 100px;} -th.c-story {width: 290px;} -th.c-bug {width: 150px;} -th.c-plan {width: 45px;} -th.c-release {width: 50px;} -th.c-actions {width: 50px;} -.c-name {border-left: none !important;} -.icon-cards-view {color: #888fa1;} -[lang='en'] .en-wrap-text {white-space: normal; height: 24px; line-height: 1; font-size: 12px;} - -#productListForm thead > tr > th, -#productListForm tbody > tr > td {text-align: center; text-overflow: unset!important} -#productListForm thead > tr > th {padding: 0; line-height: 24px;} -#productListForm thead > tr:first-child > th {border-left: 1px solid #ddd;} -#productListForm thead > tr > th.c-checkbox {border-left: none; padding-left: 15px; width: 30px;} -#productListForm tbody > tr > td {padding: 2px 4px;} -#productListForm tbody > tr > td:first-child {text-align: left; padding-left: 15px;} -#productListForm tbody > tr > td.table-nest-title {padding-left: 16px; display: flex; align-items: center;} -#productListForm th.table-nest-title .nest-has-checkbox {margin-top: 7px; margin-left: 35px;} -#productListForm th.table-nest-title .nest-none-checkbox {margin-top: 8px; margin-left: 5px;} -#productListForm th.table-nest-title .header {margin-left: 5px;} -#productListForm th.table-nest-title .sort-up {padding-left: 5px;} -#productListForm th.table-nest-title .sort-down {padding-left: 5px;} -#productListForm th.table-nest-title .table-nest-toggle {top: 14px; left: auto; right: 10px; opacity: .6;} -#productListForm th.table-nest-title .table-nest-toggle::before {position: absolute; top: 0 !important; right: 0; bottom: 0; left: 0;} -#productListForm th.table-nest-title .table-nest-toggle:hover {opacity: 1;} -#productListForm .table.has-sort-head thead > tr > th > a:after, -#productListForm .table.has-sort-head thead > tr > th > a:before {top: -3px;} -#productListForm .icon-product:before {content: '\e98f'; width: 22px; height: 22px; background: none; color: rgb(166, 170, 184); top: 0; line-height: 22px; margin-right: 2px; font-size: 14px;} -#productTableList td.table-nest-title > span.icon.table-nest-toggle {vertical-align: middle;} -#productTableList > tr[data-nest-parent] {background: #f8f8f8;} -#productList > thead th.table-nest-title.c-name {position: relative; padding-left: 16px !important;} - -@media screen and (max-width: 1460px) -{ - th.c-name {width: auto;} - [lang^='zh-'] th.c-requirement {width: 260px;} - [lang^='zh-'] th.c-story {width: 260px;} -} -@media screen and (max-width: 1300px) -{ - [lang^='zh-'] th.c-requirement {width: 240px;} - [lang^='zh-'] th.c-story {width: 240px;} -} - -@media screen and (max-width: 1250px) -{ - #productListForm thead > tr > th {font-size: 12px;} - th.c-requirement {width: 265px;} - th.c-story {width: 265px;} - [lang^='zh-'] th.c-requirement {width: 220px;} - [lang^='zh-'] th.c-story {width: 220px;} -} - -#productTableList .c-name > span.table-nest-icon {width: 0; visibility: hidden;} -#productTableList > tr.row-line.is-nest-child > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;} -#productTableList > tr.row-line.no-nest > td.text-left.table-nest-title > span.table-nest-icon.icon:before{content: '\e6f2'; background-color: white; display: inline;} -.statistic {margin-left: 10px; color: #838a9d; float: left; position: relative; line-height: 28px;} -.table-footer.fixed-footer .statistic {color: #fff;} -#productTableList .c-manager {padding-left: 14px;} -#productTableList .c-manager a {top: 7px; left: 22px;} -.checkbox-primary {margin-right: 10px;} -.table-nest-title > a, .table-nest-title > span {padding-left: 2px;} -.table-nest-icon {font-size: 14px; top: 50%;} diff --git a/module/product/css/batchedit.css b/module/product/css/batchedit.css deleted file mode 100644 index e030abd28d..0000000000 --- a/module/product/css/batchedit.css +++ /dev/null @@ -1,6 +0,0 @@ -.picker-single .picker-selection-remove {z-index: 999 !important;} - -.c-id {width: 60px;} -.c-program, .c-line {width: 150px;} -.c-desc {width: 200px;} -.c-acl {width: 120px;} diff --git a/module/product/css/browse.css b/module/product/css/browse.css deleted file mode 100644 index 75f034788f..0000000000 --- a/module/product/css/browse.css +++ /dev/null @@ -1,44 +0,0 @@ -#createActionMenu .dropdown-menu {width: 100%;} -#productStoryForm table tbody tr td {overflow: hidden; white-space: nowrap;} - -.dropdown-menu.with-search {padding: 0; min-width: 150px; overflow: hidden; max-height: 302px;} -.dropdown-menu > .menu-search .input-group {width: 100%;} -.dropdown-menu > .menu-search .input-group-addon {position: absolute; right: 10px; top: 0; z-index: 10; background: none; border: none; color: #666;} -.dropdown-menu > .menu-search .form-control {border: none !important; box-shadow: none !important; border-top: 1px solid #ddd !important;} -.dropdown-list {display: block; padding: 0; max-height: 270px; overflow-y: auto;} -.dropdown-list > li > a {display: block; padding: 3px 20px; clear: both; font-weight: normal; line-height: 1.53846154; color: #141414; white-space: nowrap;} -.dropdown-list > li > a:hover, -.dropdown-list > li > a:focus {color: #1a4f85; text-decoration: none; background-color: #ddd;} -#productStoryForm .setting {height: 25px;} - -.pl-5px {padding-left: 5px;} -.popoverStage {position: relative;} -.popoverStage .icon-caret-down {position: absolute;} -a.removeModule {color: #ddd;} -a.removeModule:hover {color: red;} - -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} -.table td.has-child > a:not(.story-toggle) {max-width: 90%; max-width: calc(100% - 50px); display: inline-block; overflow: hidden; text-overflow: clip; white-space: nowrap;} -.table td.has-child > .story-toggle {color: #838a9d; position: relative; top: 1px; left: 2px;} -.table td.has-child > .story-toggle:hover {color: #006af1; cursor: pointer;} -.table td.has-child > .story-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} -.table td.has-child > .story-toggle > .icon:before {text-align: left;} -.table td.has-child > .story-toggle.collapsed > .icon {-ms-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -webkit-transform: rotate(90deg); transform: rotate(90deg);} -.table td.c-estimate {padding-right: 12px;} -.main-table tbody > tr.table-children > td:first-child::before {width: 3px;} -.table-footer {z-index: 1;} -@-moz-document url-prefix() {.main-table tbody > tr.table-children > td:first-child::before {width: 4px;};} - -#batchUnlinkStoryTip .modal-body {padding-top: 10px; max-height: 400px; overflow: auto;} -#batchUnlinkStoryTip .table thead {position: fixed;} -#batchUnlinkStoryTip .table tbody {position: relative; top: 33px; display:block; overflow-y: scroll; max-height: 260px;} -#batchUnlinkStoryTip .table tfoot {position: relative; bottom: -30px;} -#batchUnlinkStoryTip .table td {border-bottom: 0px;} -#batchUnlinkStoryTip .table th:first-child {width: 460px;} -#mainMenu .dropdown-menu>li>a>.icon {top: 4px;} -#productStoryForm tbody tr td .label {max-width: 100px; text-overflow: unset;} -.c-span {margin-left: 19px;} -.btn-toolbar #query span.text{overflow: hidden; width: 52px; vertical-align: middle; margin-right: 1px;} -#linkStoryByPlan .modal-header {padding: 20px 0 10px 0; border-bottom: 0px} \ No newline at end of file diff --git a/module/product/css/dynamic.css b/module/product/css/dynamic.css deleted file mode 100644 index 8ef4ebd3a6..0000000000 --- a/module/product/css/dynamic.css +++ /dev/null @@ -1,35 +0,0 @@ -#mainMenu .btn-group ul.dropdown-menu {max-height: 300px; overflow: auto;} -#dynamics {padding: 10px 0;} -.dynamic {position: relative; padding-left: 170px;} -.dynamic-date {position: absolute; left: 0; top: 0; width: 150px; border: 2px solid #eee; border-radius: 4px; padding: 14px 20px; height: 58px;} -.dynamic-date:before {content: ' '; display: block; position: absolute; right: -22px; top: 26px; height: 2px; width: 20px; background-color: #eee;} -.dynamic-date > .date-label, -.dynamic-date > .date-text {font-size: 18px; display: block;} -.dynamic-date > .date-label + .date-text {font-size: 14px; line-height: 14px;} -.dynamic-date > .date-label {margin-top: -8px;} -.dynamic-date > .btn {position: absolute; right: 10px; top: 15px;} -.dynamic .timeline {border: 2px solid #eee; border-radius: 4px; margin-bottom: 20px; padding: 10px 20px 10px 100px; transition: max-height .2s; overflow: hidden;} -.dynamic .timeline-tag {left: -75px; font-size: 14px; color: #838A9D;} -.dynamic .timeline-text {color: #3C4353;} -.dynamic .text-muted {color: #838A9D;} -.dynamic .label-id {top: -1px; border: 1px solid rgba(131,138,157,0.25); color: #838A9D;} -.dynamic.active .timeline, -.dynamic.active .dynamic-date {border-color: #00a9fc;} -.dynamic.active .dynamic-date:before {background-color: #00a9fc;} -.dynamic.collapsed .timeline {max-height: 58px;} -.dynamic.collapsed .timeline > li + li {display: none;} -.dynamic.collapsed .dynamic-btn > .icon:before {content: '\f0d8';} - -.timeline > li:before {left: -26px;} -.timeline > li + li:after {left: -23px;} -.timeline-text {margin-left: -18px;} -.label-action {padding: 0 4px;} -.label-id {margin-left: 4px;} -.timeline > li.active:before {left: -30px;} -.timeline > li.collected:before, .timeline > li.releaseddoc:before {background-color: #FFF;} -.timeline > li.collected > div:after {background-color: #FFAF65;} -.timeline > li.releaseddoc > div:after {background-color: #66A2FF;} -.timeline > li > div:after {left: -27px;} -.timeline .timeline-text {display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.timeline > li > div > .timeline-tag, .timeline > li > div > .timeline-text > .label-action {color: #838A9D;} -.timeline > li > div > .timeline-text > a {color: #313C52;} diff --git a/module/product/css/index.css b/module/product/css/index.css deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/product/css/kanban.css b/module/product/css/kanban.css deleted file mode 100644 index 14266095ad..0000000000 --- a/module/product/css/kanban.css +++ /dev/null @@ -1,2 +0,0 @@ -#showSettingsBox {text-align:right; margin-top:-15px; margin-right:4px;} -#showSettingsBox .checkbox-primary {display:inline-block;} diff --git a/module/product/css/manageline.css b/module/product/css/manageline.css deleted file mode 100644 index edb03f21a7..0000000000 --- a/module/product/css/manageline.css +++ /dev/null @@ -1,16 +0,0 @@ -.row-module {max-width: 600px; min-width: 400px;} -.row-module + .row-module {margin-top: 5px;} -.col-module {min-width: 200px;} -.col-module .form-control {border-radius: 2px 0 0 2px;} -.col-module select.form-control {border-radius: 0 2px 2px 0; border-left-width: 0;} -.col-module select.form-control:focus {margin-left: -1px; border-left-width: 1px;} -.col-module {padding-right: 10px;} -.col-programs .form-control {border-radius: 0 2px 2px 0; border-left-width: 0;} -.col-programs .form-control:focus {margin-left: -1px; border-left-width: 1px;} -.col-actions {width: 80px; padding-left: 5px;} - -#modulesTree li {padding-left: 20px;} -#modulesTree li > .list-toggle {top: 0;} - -#lineForm table tr > td.text-middle span {display: block; float: left;} -.tree li> .module-name {display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} diff --git a/module/product/css/project.css b/module/product/css/project.css deleted file mode 100644 index edf6f9fe5c..0000000000 --- a/module/product/css/project.css +++ /dev/null @@ -1,8 +0,0 @@ -.checkbox-primary {margin-top: 6px;} -.tip {display: inline-block; vertical-align: middle; margin-top: 6px;} -#mainMenu .icon.icon-help {margin-left: 5px;} -td.padding-right {padding-right: 20px !important} - -.c-program {width: 150px;} -.c-progress {width: 70px;} -[lang^=zh].c-progress {width: 60px;} diff --git a/module/product/css/roadmap.css b/module/product/css/roadmap.css deleted file mode 100644 index a3746e142b..0000000000 --- a/module/product/css/roadmap.css +++ /dev/null @@ -1,11 +0,0 @@ -.branch-nav {margin: -10px 0 25px;} -.release-paths {position: relative;} -.release-path {margin-left: 160px; position: relative; overflow: visible;} -.release-head {position: absolute; left: -150px; bottom: 105px; width: 120px; border: 2px solid #EEEEEE; border-radius: 4px; font-size: 20px; padding: 5px 10px; text-align: center;} -.release-head .subtitle {font-size: 12px; color: #7B8599;} -.release-line {margin: 0; padding-bottom: 40px;} -.release-line > li > a:before {border-color: #00da88;} -.release-line > li:nth-child(even) > a {padding-bottom: 38px;} -.release-link-line {pointer-events: none; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA+YAAADiCAMAAAD0xy2eAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABOUExURUdwTOXl5eXl5ebm5ufn5+rq6u7u7unp6eXl5f///+Xl5eXl5efn5+Xl5eXl5eXl5ebm5uXl5eXl5ebm5ubm5ubm5uXl5ebm5uXl5eXl5Uh6G7kAAAAZdFJOUwDuuVQtFQwg1gXH+Dpzoq1CmIV7aEuOX+MTWsN0AAAGrUlEQVQYGe3ACbaYOHRF0SuQkETfw5v/RPNdLpMZZKWez5buVQBcu8zmJACO1WOwcAqAZ7kx66MAeNa+ZncnAI51t1kvAK7F/hEAAAAAAACA/xP93gmAZ6tZOKsAODb2ZuUSAM/aYtZEAXCsTsFs7gTAse4eigD4lqMAAAAAAMD/D09/CYBrvVl/CYBjdXrN+lUAHOumYNavAuBYNwWzTQA866ZwCYBvnQAAAAD8V7RHEgDParHhzgLg2NqYDXMUAMfiPJg1qwA4lu/BbBMAz7rjvQTAtyoAAOBG1wmAb1O4swB4NptZcwmAY3EbzN4pCYBfaSpmwywAnl2NNQLgW44CAABuZAHwLQ1lSgLg2BjMhuUSAL9q25jZu2cB8CsfxcweAfBsnYcsAL51AgAAboxL2wmAZ5vZMF9VANxKZ29mYRsFwK98FDN7swA4Fvc3VAHwLQsAALgxlSMKgGeNmZU9CoBb9dqCmb33KABu1XV7zSwJgGfjPQsAALixHlEAXJvN3u3qBMCtdXvNbGjOLABuxaO3H1EAHEvPUgQAANwYlycLgGe7mZX76gTAq3wuwcyGZsoC4FUd997MLgHwLLVbJwB/j7UTANeyDf2+dgLgVuwHMxv6fa0C4FR37b39WATAse66+0kA/h45CYBvjZX5yQLg1xLsR1imsQqATzVOy2s/kgA4lp+tEYC/R9rOsRMAx1r7UebjygLgU57mMtgvswC4VeNzN++hT0oC4FDVZ7ehLPe55ioAPu3BfhseAXCqi+2xNa9d+rTnFTsB8KLqH7Xq09iPoTTzngXApXNrSrBfRn1i7ATAlS5e5570KWbD2y/b8XQC4NJSgv2W9RljrgLgR5fH9tznqk8ws1D6ZTs6AXCp6d/B/lH1Oc52jakKgBcpj+156FPtt1B6AXCp27elKcHMgj5d6Zdtn55rzALgRcpRn2x/vPrUMaYqAP9hVZ8a1/Y87rnpG32y/Qhv38y7ALiU+xIG+6Xok5r5Ps52jbkTABe6PF5Pq89ofxR9upg7AXAiXc+0b0tT3kaf0cyGtzTLdgqAS2N5B/tHo09ctn162jGmKgAedDmu7Xnp09ofjT5dTFUAnEjtedzz0pd30+cxs/D2zXy3AuBSW4L9tumzzvdxtmvMnQC40OXxes5Vn8n+2PTpkgC4EZ9p35amvMOuz2QWSr/M9zQKgEtTsH/t+qzH2a4xVQFwoaY4Xs+0r/rs9lsopwC4tO7b0pcwmJ367KVftn16rjEJgBddTvrM9sejT46pCoATKY7tedxz06/6zGYWSr9sexQAl+4S7LdLn3Z6rpirAHiR4tieR9ansX+E0o8C4NJzz015BzMb9bmX7TjbMXcC4EaXx06fYv8aogC4NLbnvi19CZb06Usz38dzjVkA/Kj6X8H+SPpUAfAjxfWZ9rnp36pPCKWZ7+m5ogC4VAf7o+rTCYAjKa7PdM9Nr0+1UJr5ntoxC4BLebB/BQFwKsX1me6lb/RJ89HGKgB+jfZLae5zFACX0nk3xX5pBMCvGttjnvRJWQB8myw0e5sFwK0p2C+h2aMAOJXbvQlm1gqAZ/k6sgD8PfpmXzsB8KuzX8rWZgFwKrV3P9iPIgB+1fFoQi8AziV9qgA4d4bljALg2GY/3vnJAuBVfubXfryrAPgVzyVYFgDfogD8Per8JAHwbDWzfh+rAHiVpmYws7CcWQC8qtddzOwWAM/yuawCAABu9HPbCYBj2cyG5swC4FacevtR9lEA3ErPEswWAfCsrncrAADgxraPAuBZN5i921oFwK31fs0szG0nAG7FvZhZLwCe5ak/BAAA3FizAPj2WjmyAPjVzcHMyhEFwK16zcHMyiQAftVrCzYLgGt1jQIAAG7MRxYAz7KZ9VMWALfqNQcz66ckAG7VdhnM7BYAx2q7DKcA+NZ1AgAAXtSyjQLg2WVm7x4FwK94v2ZWpiwAfo1bMLNJAByr1zyMAuBbJwAA4EYsUxYAzw4za55OANyq1zKYDctVBcCt7mnMLIwC4Fg+ytAJgG9ZAADAjWuPAuBaY9afSQD8GrdgNixXFQC3atuYWbirAPiVpmJFAHyLqwAAgBtjEgDX6jssVxUAv9IymIU7CoBfaSpm1p9JAPwat2A2C4BntW1WAQAAAPiPyGVKAuDZYTYslwD4VdvGzN49C4Bf6Shm1kQBcGydhyEJgGvdJQAA4EZOAuDbMiyrAHi2mNl7ZAHwKx2vmTVXFQC/1mUw6wXAszSVQwCcqwIAAG4cSQBcW4ckAK7lU/8D/a9fSZZlwxkAAAAASUVORK5CYII="); height: 196px; position: absolute; left: 10px; right: 100px; top: 97px; background-size: 100% 100%; background-repeat: no-repeat;} -.release-line li .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -.branch-nav .nav li { max-width: 200px; white-space: nowrap; overflow: hidden; } diff --git a/module/product/css/track.css b/module/product/css/track.css deleted file mode 100644 index 6073a2d327..0000000000 --- a/module/product/css/track.css +++ /dev/null @@ -1 +0,0 @@ -.table td {text-align: left; padding: 2px 8px !important;} diff --git a/module/product/css/view.css b/module/product/css/view.css deleted file mode 100644 index 71d10b732b..0000000000 --- a/module/product/css/view.css +++ /dev/null @@ -1,11 +0,0 @@ -.branch-list {padding-left: 0; margin: 0;} -.branch-list > li {float: left; list-style: none; width: 50%; margin: 5px 0;} -.table-data tbody > tr > th {width: 110px;} -.col-12 .cell table td {word-wrap: break-word; word-break: normal;} -td.normal {color: #00da88;} -td.acl {white-space: nowrap;} -.row > .col-sm-12:first-child {padding-bottom: 20px;} -.c-product ,.c-release ,.c-code {width: 100px !important;} -.c-openedBy ,.c-acl ,.c-prs ,.c-common {width:110px !important;} -.c-bugs ,.c-type {width:120px !important;} -.c-release {padding-right: 20px !important;} diff --git a/module/product/js/all.js b/module/product/js/all.js deleted file mode 100644 index f437fc574a..0000000000 --- a/module/product/js/all.js +++ /dev/null @@ -1,216 +0,0 @@ -$("#" + browseType + "Tab").addClass('btn-active-text'); - -/** - * Set batch edit checkbox. - * - * @access public - * @return void - */ -function setCheckbox() -{ - $('#productListForm .c-checkbox, #productListForm .check-all').hide(); - $('.c-name').css('border-left', 'none'); - $(":checkbox[name^='productIDList']").prop('checked', false); - $('.check-all, .program-checkbox, .row-product').removeClass('checked'); - if($.cookie('showProductBatchEdit') == 1) - { - $('#productListForm .c-checkbox, #productListForm .check-all').show(); - $('.c-name').css('border-left', '1px solid #ddd'); - } - else - { - $('.table-actions').hide(); - $('#productsCount').show(); - } -} - -/** - * Update prarent checkbox. - * - * @param object $parent - * @access public - * @return void - */ -function updatePrarentCheckbox($parent) -{ - var $row = $parent.closest('tr'); - var $checkbox = $row.find('.program-checkbox'); - var rowID = $row.data('id'); - var $subRows = $('#productTableList').children('.row-product[data-nest-path^="' + rowID + ',"],.row-product[data-nest-path*=",' + rowID + ',"]'); - var allCount = $subRows.length; - var selectedCount = $subRows.find('input:checkbox:checked').length; - var isAllChecked = allCount > 0 && allCount === selectedCount; - $checkbox.toggleClass('checked', isAllChecked) - .toggleClass('indeterminate', selectedCount > 0 && selectedCount < allCount); - $row.toggleClass('checked', isAllChecked); -} - -/** - * Update all checkbox. - * - * @access public - * @return void - */ -function updateCheckboxes() -{ - $('#productTableList').children('.row-program,.row-line').each(function() - { - updatePrarentCheckbox($(this)) - }); -} - -/** - * Add a statistics prompt statement after the Edit button. - * - * @access public - * @return void - */ -function addStatistic() -{ - var checkedLength = $(":checkbox[name^='productIDList']:checked").length; - if(checkedLength > 0) - { - var summary = checkedProducts.replace('%s', checkedLength); - if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); - - var statistic = "
    " + summary + "
    "; - $('#productsCount').hide(); - $('#productsSummary').remove(); - $('#editBtn').after(statistic); - $('.table-actions').show(); - } - else - { - $('.table-actions').hide(); - $('#productsCount').show(); - $('#productsSummary').addClass('hidden'); - } -} - -/** - * Anti shake operation for jquery. - * - * @param fn $fn - * @param delay $delay - * @access public - * @return void - */ -function debounce(fn, delay) -{ - var timer = null; - return function() - { - if(timer) clearTimeout(timer); - timer = setTimeout(fn, delay) - } -} - -/** - * Update statistics. - * - * @access public - * @return void - */ -function updateStatistic() -{ - debounce(addStatistic(), 200) -} - -$(function() -{ - $('input[name^="showEdit"]').click(function() - { - $.cookie('showProductBatchEdit', $(this).is(':checked') ? 1 : 0, {expires: config.cookieLife, path: config.webRoot}); - setCheckbox(); - }); - setCheckbox(); - - /* Init table sort. */ - $('#productTableList').addClass('sortable').sortable( - { - /* Init vars. */ - reverse: orderBy === 'order_desc', - selector: 'tr', - dragCssClass: 'drag-row', - trigger: '.sort-handler', - - /* Set movable conditions. */ - canMoveHere: function($ele, $target) - { - var canMove = true; - if($ele.hasClass('no-nest')) canMove = $target.hasClass('no-nest') ? true : false; - return $ele.data('parent') === $target.data('parent') && canMove; - }, - start: function(e) - { - e.targets.filter('[data-parent!="' + e.element.attr('data-parent') + '"]').addClass('drop-not-allowed'); - }, - - /* Update order sort. */ - finish: function(e) - { - var products = ''; - e.list.each(function() - { - products += $(this.item).data('id') + ',' ; - }); - $.post(createLink('product', 'updateOrder'), {'products' : products, 'orderBy' : orderBy}); - - $('#productListForm').table('initNestedList'); - } - }); - - $('.main-table').on('click', 'tr', function(e) - { - if($.cookie('showProductBatchEdit') == 1) updateStatistic(); - }); - - $('#productTableList').on('click', 'tr', function(e) - { - if($.cookie('showProductBatchEdit') != 1) e.stopPropagation(); - }); - - $('#productTableList').on('click', '.row-program,.row-line', function(e) - { - if($.cookie('showProductBatchEdit') != 1) return; - if($(e.target).closest('.table-nest-toggle,a').length) return; - - var $row = $(this); - var $checkbox = $row.find('.program-checkbox').toggleClass('checked').removeClass('indeterminate'); - var isChecked = $checkbox.hasClass('checked'); - var rowID = $row.data('id'); - var $subRows = $('#productTableList').children('tr[data-nest-path^="' + rowID + ',"],tr[data-nest-path*=",' + rowID + ',"]'); - $row.toggleClass('checked', isChecked); - $subRows.toggleClass('checked', isChecked); - $subRows.find('input:checkbox').prop('checked', isChecked); - $subRows.find('.program-checkbox').toggleClass('checked', isChecked).removeClass('indeterminate'); - - var parentID = $row.attr('data-parent'); - if(parentID && parentID !== '0') - { - updatePrarentCheckbox($('#productTableList>tr[data-id="' + parentID + '"]')); - } - updateStatistic() - }); - - $('#productListForm').on('checkChange', updateCheckboxes); - updateCheckboxes(); - - $(":checkbox[name^='productIDList']").on('click', function() - { - updateStatistic() - }); - - $(".check-all").on('click', function() - { - if($(":checkbox[name^='productIDList']:not(:checked)").length == 0) - { - $(":checkbox[name^='productIDList']").prop('checked', false); - } - else - { - $(":checkbox[name^='productIDList']").prop('checked', true); - } - updateStatistic() - }); -}); diff --git a/module/product/js/batchedit.js b/module/product/js/batchedit.js deleted file mode 100644 index 7349ccdd1a..0000000000 --- a/module/product/js/batchedit.js +++ /dev/null @@ -1,29 +0,0 @@ -$(function() -{ - $("input[type='radio'][value='open']").parent().each(function() - { - this.title = openTip; - }); - - $("input[type='radio'][value='private']").parent().each(function() - { - this.title = privateTip; - }); -}) - -/** - * Load product lines by program. - * - * @param int $programID - * @param int $productID - * @access public - * @return void - */ -function loadProductLines(programID, productID) -{ - var link = createLink('product', 'ajaxGetLine', 'programID=' + programID + '&productID=' + productID); - $('#line_' + productID).load(link, function() - { - $('#lines' + productID).picker(); - }); -} diff --git a/module/product/js/browse.js b/module/product/js/browse.js deleted file mode 100644 index cc02275ff8..0000000000 --- a/module/product/js/browse.js +++ /dev/null @@ -1,194 +0,0 @@ -$(function() -{ - if(typeof(rawModule) == 'undefined') rawModule = 'product'; - - $('#navbar .nav li').removeClass('active'); - $("#navbar .nav li[data-id=" + storyType + ']').addClass('active'); - - if(vision != 'lite' && rawModule == 'projectstory' && !projectHasProduct && URAndSR) - { - $('#navbar .nav>li[data-id=story]').addClass('active'); - $('#navbar .nav>li[data-id=story]>a').html($('.active [data-id=' + storyType + ']').text() + ''); - } - - $(document).ready(function(){ - var $title = $('#storyList thead th.c-title'); - var headerWidth = $('#storyList thead th.c-title a').innerWidth(); - var buttonWidth = $('#storyList thead th.c-title button').innerWidth(); - if($title.width() < headerWidth + buttonWidth + 16) $title.width(headerWidth + buttonWidth + 30); - }); - - $('#toTaskButton').on('click', function() - { - var planID = $('#plan').val(); - if(planID) - { - parent.location.href = createLink('projectstory', 'importPlanStories', 'projectID=' + projectID + '&planID=' + planID + '&productID=' + productID); - } - }) - - $(document).on('click', '.story-toggle', function(e) - { - var $toggle = $(this); - var id = $(this).data('id'); - var isCollapsed = $toggle.toggleClass('collapsed').hasClass('collapsed'); - $toggle.closest('[data-ride="table"]').find('tr.parent-' + id).toggle(!isCollapsed); - - e.stopPropagation(); - e.preventDefault(); - }); - - // Fix state dropdown menu position - $('.c-stage > .dropdown').each(function() - { - var $this = $(this); - var menuHeight = $(this).find('.dropdown-menu').outerHeight(); - var $tr = $this.closest('tr'); - var height = 0; - while(height < menuHeight) - { - var $next = $tr.next('tr'); - if(!$next.length) break; - height += $next.outerHeight; - } - if(height < menuHeight) - { - $this.addClass('dropup'); - } - }); - - toggleFold('#productStoryForm', unfoldStories, productID, 'product'); - - adjustTableFooter(); - $('body').on('click', '#toggleFold', adjustTableFooter); - $('body').on('click', '.icon.icon-angle-double-right', adjustTableFooter); - - /* Get checked stories. */ - $('#importToLib').on('click', function() - { - var storyIdList = ''; - $("input[name^='storyIdList']:checked").each(function() - { - storyIdList += $(this).val() + ','; - $('#storyIdList').val(storyIdList); - }); - }); - - $('#reviewItem ~ ul > li').on('click', function() - { - var storyIDList = new Array(); - var storyString = ''; - var reviewStoryTips = ''; - $("input[name^='storyIdList']:checked").each(function() - { - storyIDList.push($(this).val()); - }); - - $.each(storyIDList, function(storyKey, storyValue) - { - var getStoryReview = createLink('product', 'ajaxGetReviewers', "productID=" + productID + "&storyID=" + storyValue); - - $.ajaxSettings.async = false; - $.get(getStoryReview, function(data) - { - var reviewer = new Array(); - $(data).find('option:selected').each(function() - { - reviewer.push($(this).val()); - }); - - if($.inArray(account, reviewer) == -1) storyString += ' #' + storyValue; - }); - $.ajaxSettings.async = true; - }); - - reviewStoryTips = reviewStory.replace("%s", storyString); - if(storyString !== '') alert(reviewStoryTips); - }); - - $('#batchUnlinkStory').click(function() - { - var storyIdList = ''; - $("input[name^='storyIdList']:checked").each(function() - { - storyIdList += $(this).val() + ','; - }); - - $.get(createLink('projectstory', 'batchUnlinkStory', 'projectID=' + projectID + '&storyIdList=' + storyIdList), function(data) - { - if(data) - { - $('#batchUnlinkStoryTip tbody').html(data); - $('#batchUnlinkStoryTip').modal({show: true}); - } - else - { - window.location.reload(); - } - }); - }); - - $('#batchUnlinkStoryTip .close, #confirmBtn').click(function() - { - window.location.reload(); - }) - - /* The display of the adjusting sidebarHeader is synchronized with the sidebar. */ - $(".sidebar-toggle").click(function() - { - $("#sidebarHeader").toggle("fast"); - }); - if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); - - /* Shift key selection. */ - var isClickStoryToggle = false; - var lastStorySelected = ''; - $(".story-toggle").click(function() - { - isClickStoryToggle = true; - }); - $("#storyList tbody").on("click","tr",function(e) - { - var nowCheckbox = $(this)['context'].cells[0].childNodes[0].childNodes[0]; - if(e.shiftKey) - { - nowStorySelected = nowCheckbox.value; - if(lastStorySelected != '' && nowStorySelected != '' && lastStorySelected != nowStorySelected) - { - var isStartStorySelected = false; - var isEndStorySelected = false; - $("input[name^='storyIdList']").each(function() - { - isEndStorySelected = ((nowStorySelected == $(this).val() || lastStorySelected == $(this).val()) && isStartStorySelected ) || isEndStorySelected ? true : false; - - $(this)['context'].checked = $(this)['context'].checked || (isStartStorySelected && !isEndStorySelected) ? true : false; - - isStartStorySelected = nowStorySelected == $(this).val() || lastStorySelected == $(this).val() || isStartStorySelected ? true : false; - - if(isEndStorySelected) return; - }); - } - } - else if(!isClickStoryToggle) - { - lastStorySelected = nowCheckbox.value; - } - isClickStoryToggle = false; - }); -}); - -/** - * Adjust the table footer style. - * - * @access public - * @return void - */ -function adjustTableFooter() -{ - if($('.main-col').height() < $(window).height()) - { - $('.table.with-footer-fixed').css('margin-bottom', '0'); - $('.table-footer').removeClass('fixed-footer'); - $('.table-footer').css({"left":"0", "bottom":"0", "width":"unset"}); - } -} diff --git a/module/product/js/create.js b/module/product/js/create.js deleted file mode 100644 index 548053f0ae..0000000000 --- a/module/product/js/create.js +++ /dev/null @@ -1,77 +0,0 @@ -$(function() -{ - $('#lineName').css('border-left-color', ''); - $('[name=newLine]').change(); - - if(programID == 0) $("#line").closest('tr').addClass('hidden'); -}) -/** - * Load product Lines. - * - * @param $rootID - * @access public - * @return void - */ -function loadProductLines(rootID) -{ - link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + rootID + '&viewtype=line' + '&branch=0' + '&rootModuleID=0&returnType=html&fieldID=&needManage=true'); - $('#lineIdBox').load(link, function() - { - $(this).find('select').chosen() - }); -} - -/** - * Set parent program. - * - * @param $parentProgram - * @access public - * @return void - */ -function setParentProgram(parentProgram) -{ - location.href = createLink('product', 'create', 'programID=' + parentProgram); -} - -$('#program').change(function() -{ - var programID = $(this).val(); - if(programID > 0) $("#line").closest('tr').removeClass('hidden'); - - $.get(createLink('product', 'ajaxGetLine', 'programID=' + programID), function(data) - { - $('#line').replaceWith(data); - $('#line').siblings('.picker').remove(); - $('#line').picker(); - }) -}) - -/** - * Toggle line. - * - * @param object $obj - * @access public - * @return void - */ -function toggleLine(obj) -{ - var $obj = $(obj); - if($obj.length == 0) return false; - - var $line = $obj.closest('table').find('#line'); - - if($obj.prop('checked')) - { - $('form .line-no-exist').removeClass('hidden'); - $('form .line-exist').addClass('hidden'); - $('#line_chosen').addClass('hidden'); - $line.attr('disabled', 'disabled'); - } - else - { - $('#line').removeClass('hidden'); - $('form .line-no-exist').addClass('hidden'); - $('#line_chosen').removeClass('hidden'); - $line.removeAttr('disabled'); - } -} diff --git a/module/product/js/edit.js b/module/product/js/edit.js deleted file mode 100644 index 78c8f46ed5..0000000000 --- a/module/product/js/edit.js +++ /dev/null @@ -1,17 +0,0 @@ -$(function() -{ - if(programID == 0) $("#line").closest('tr').addClass('hidden'); -}); - -$('#program').change(function() -{ - var programID = $(this).val(); - programID > 0 ? $("#line").closest('tr').removeClass('hidden') : $("#line").closest('tr').addClass('hidden'); - - $.get(createLink('product', 'ajaxGetLine', 'programID=' + programID), function(data) - { - $('#line').replaceWith(data); - $('#line').siblings('.picker').remove(); - $('#line').picker(); - }) -}); diff --git a/module/product/js/index.js b/module/product/js/index.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/product/js/kanban.js b/module/product/js/kanban.js deleted file mode 100644 index 4798d26c96..0000000000 --- a/module/product/js/kanban.js +++ /dev/null @@ -1,183 +0,0 @@ -/** - * Process kanban data - * @param {string} key Kanban key, used as kanban id - * @param {Object} programsData Programs data - * @returns {Object} kanban data - */ -function processKanbanData(key, programsData) -{ - var kanbanId = key; - - /* Generate columns */ - var columns = []; - var hasDoingProject = false; - var executionsCol; - $.each(kanbanColumns, function(_, column) - { - var colType = column.type; - if(colType === 'doingProject') hasDoingProject = true; - column = $.extend({}, column, - { - kanban: kanbanId, - id: kanbanId + '-' + colType, - parentType: (hasDoingProject && (colType === 'doingProject' || colType === 'doingExecution')) ? 'doing' : false, - }); - - if(colType === 'doingProject') - { - columns.push( - { - kanban: kanbanId, - id: kanbanId + '-doing', - type: 'doing', - asParent: true, - name: doingText, - count: '' - }); - } - else if(colType === 'doingExecution') - { - executionsCol = column; - executionsCol.count = 0; - } - columns.push(column); - }); - - /* Format lanes data */ - var lanes = []; - $.each(programsData, function(programId, programProducts) - { - var subLanes = []; - programProducts.forEach(function(productID) - { - var product = productList[productID]; - var items = {}; - - /* unclosed products */ - var productItem = {id: 'product-' + productID, _id: productID, name: product.name}; - items.unclosedProduct = [productItem]; - - /* plans */ - items.unexpiredPlan = []; - var plans = planList[productID]; - if(plans) - { - $.each(plans, function(planID, plan) - { - items.unexpiredPlan.push($.extend({}, plan, {id: 'plan-' + planID, _id: planID})); - }); - } - - /* doing projects */ - if(hasDoingProject) - { - items.doingProject = []; - var productProjects = projectProduct[productID]; - if(productProjects) - { - $.each(productProjects, function(projectID) - { - var project = projectList[projectID]; - if(!project || !project.id) return; - var projectItem = $.extend({}, project, {id: 'project-' + projectID, _id: projectID}); - items.doingProject.push(projectItem); - - var execution = latestExecutions[projectID]; - if(!execution || !execution.id) return; - - executionsCol.count++; - projectItem.execution = $.extend({}, execution, {id: 'execution-' + execution.id, _id: execution.id}); - }); - } - } - else - { - /* doing execution */ - items.doingExecution = []; - var productExecutions = classicExecution[productID]; - if(productExecutions) - { - $.each(productExecutions, function(_, execution) - { - if(!execution || !execution.id) return; - var executionID = execution.id; - var executionItem = $.extend({}, execution, {id: 'execution-' + executionID, _id: executionID}); - items.doingExecution.push(executionItem); - }); - } - } - - - /* normal release */ - items.normalRelease = []; - var releases = releaseList[productID]; - if(releases) - { - $.each(releases, function(releaseID, release) - { - if(!release || !release.id) return; - var releaseItem = $.extend({}, release, {id: 'release-' + releaseID, _id: releaseID}); - items.normalRelease.push(releaseItem); - }); - } - - subLanes.push({id: kanbanId + '-' + programId + '-' + productID, items: items}); - }); - - var programName = programList[programId]; - if(programName === undefined) programName = '(' + programId + ')'; - lanes.push({id: programId, kanban: kanbanId, name: programName, subLanes: subLanes}); - }); - - return {id: kanbanId, columns: columns, lanes: lanes}; -} - -/** Calculate column height */ -function calcColHeight(col, lane, colCards, colHeight) -{ - if (col.type !== 'doingProject') return colHeight; - return colCards.length * 62; -} - -/** - * Init kanban. - * - * @access public - * @return void - */ -function initKanban() -{ - $.each(kanbanList, function(key, programsData) - { - var $kanban = $('#kanban-' + key); - if(!$kanban.length) return; - var data = processKanbanData(key, programsData); - $kanban.kanban( - { - data: data, - noLaneName: isLightMode, - virtualize: true, - virtualCardList: true, - calcColHeight: calcColHeight - }); - }); -} - -$(function() -{ - /* Init all kanbans */ - initKanban(); - - $('#showAllProjects').click(function() - { - var showAllProjects = $(this).prop('checked') ? 1 : 0; - $.post(createLink('product', 'ajaxSetShowSetting'), {"showAllProjects": showAllProjects}, function() - { - $.get(createLink('product', 'kanban'), function(data) - { - $('#kanbanList').html($(data).find('#kanbanList').html()); - initKanban(); - }); - }) - }) -}); diff --git a/module/product/js/manageline.js b/module/product/js/manageline.js deleted file mode 100644 index cd1748a993..0000000000 --- a/module/product/js/manageline.js +++ /dev/null @@ -1,24 +0,0 @@ -function addItem(obj) -{ - var $inputRow = $(obj).closest('.row-module'); - var $newRow = $('#insertItemBox').children('.row-module').clone().insertAfter($inputRow).addClass('highlight'); - $newRow.find("input[type!='hidden']").val(''); - $newRow.find("select[name^='programs']").chosen(); - $newRow.find('div[class="table-col col-programs"]').addClass('required'); - setTimeout(function() - { - $newRow.removeClass('highlight'); - }, 1600); -} - -function deleteItem(obj) -{ - var $inputRow = $(obj).closest('.row-module'); - if ($inputRow.siblings('.row-module.row-module-new').find('.btn-delete').length > 0) - { - $inputRow.addClass('highlight').fadeOut(500, function() - { - $inputRow.remove(); - }); - } -} diff --git a/module/product/js/project.js b/module/product/js/project.js deleted file mode 100644 index e150fb18e3..0000000000 --- a/module/product/js/project.js +++ /dev/null @@ -1,41 +0,0 @@ -$(function() -{ - $('#mainMenu input[name^="involved"]').click(function() - { - var involved = $(this).is(':checked') ? 1 : 0; - $.cookie('involved', involved, {expires:config.cookieLife, path:config.webRoot}); - window.location.reload(); - }); - - $('#saveButton').on('click', function() - { - var selectProjectID = $('#project').val(); - var currentProductID = $('#product').val(); - var currentBranchID = $('#branch').val(); - - $.get(createLink('project', 'ajaxGetLinkedProducts', 'projectID=' + selectProjectID), function(product) - { - var products = []; - var branches = []; - - var linkedProducts = JSON.parse(product); - for(var productID in linkedProducts) - { - for(var branchID in linkedProducts[productID]) - { - products.push(productID); - branches.push(branchID); - } - } - - products.push(currentProductID); - branches.push(currentBranchID); - - $.post(createLink('project', 'manageProducts', 'projectID=' + selectProjectID), {'products' : products, 'branch' : branches}, function() - { - $('#link2Project').modal('hide'); - window.location.reload(); - }); - }); - }); -}); diff --git a/module/product/js/roadmap.js b/module/product/js/roadmap.js deleted file mode 100644 index 77cdd176c5..0000000000 --- a/module/product/js/roadmap.js +++ /dev/null @@ -1,33 +0,0 @@ -$(function() -{ - // 修复连接曲线位置 - var fixReleasePathLine = function() - { - $('.release-paths.active').each(function() - { - var $lines = $(this).find('.release-line'); - var linesCount = $lines.length; - if (linesCount < 2) return; - $lines.each(function(idx) - { - if (idx >= (linesCount - 1)) return; - var $prev = $(this); - var $next = $lines.eq(idx + 1); - var $line = $prev.next('.release-link-line'); - if(!$line.length) - { - $line = $('
    "); - $root.height(row.boundary.h); - $root.width(row.boundary.w); - $root.append($table); - $root.css("opacity",0.75); - $root.css("z-index",99999); - - $cloneRow.css({"background":"#FFFFFF"}); - $root.addClass("none-select"); - $table.css("cursor","move"); - - //var yOffset = this.options.indicatorYOffset * row.boundary.h; - //$root.css({position: "absolute", top: rowPos.y + yOffset + "px", left: rowPos.x + "px"}); - - this.indicator = {$dom:$root}; - - $("body").append($root); -} - -DtSort.Table.prototype.removeSourceIndicator = function() -{ - this.indicator && this.indicator.$dom.remove(); - this.indicator = undefined; -} - -DtSort.RowBase = function(table){ this.table = table;} - -DtSort.RowBase.prototype.setCanMoveIndicator = function(){ this.table.$container.css("cursor","move");} - -DtSort.RowBase.prototype.removeCanMoveIndicator = function(){ this.table.$container.css("cursor","pointer");} - -DtSort.NestRow = function(table, rows) -{ - DtSort.RowBase.call(this,table); - this.rows = rows; -}; - -DtSort.NestRow.prototype = Object.create(DtSort.RowBase.prototype); - -DtSort.NestRow.prototype.getIndex = function(){ return this.rows[0].index;} - -DtSort.NestRow.prototype.getRow = function(){ return this.rows[0];} - -DtSort.NestRow.prototype.include = function(row) -{ - for(var one of this.rows) - { - if(one.id == row.id) return true; - } - - return false; -} - -DtSort.NestRow.prototype.setMovingCss = function() -{ - for(var one of this.rows) - { - one.$dom.addClass(this.table.options.movingClass); - } -} - -DtSort.NestRow.prototype.removeMovingCss = function() -{ - for(var one of this.rows) - { - one.$dom.removeClass(this.table.options.movingClass); - } -} - -DtSort.NestRow.prototype.setAcceptCss = function(){ this.rows[0].$dom.addClass(this.table.options.acceptableClass);} - -DtSort.NestRow.prototype.removeAcceptCss = function(){ this.rows[0].$dom.removeClass(this.table.options.acceptableClass);} - -DtSort.NestRow.prototype.toString = function(){ return langRowIndex + ' ' + this.getIndex() + ' [' + langNestTotal + ': '+ this.rows.length +']'} - -DtSort.NormalRow = function(table, row) -{ - DtSort.RowBase.call(this,table); - this.row = row; -}; - -DtSort.NormalRow.prototype = Object.create(DtSort.RowBase.prototype); - -DtSort.NormalRow.prototype.getIndex = function() -{ - return this.row.index; -} - -DtSort.NormalRow.prototype.getRow = function(){ return this.row;} -DtSort.NormalRow.prototype.include = function(row){ return this.row.id == row.id;} -DtSort.NormalRow.prototype.setMovingCss = function(){ this.row.$dom.addClass(this.table.options.movingClass);} -DtSort.NormalRow.prototype.removeMovingCss = function(){ this.row.$dom.removeClass(this.table.options.movingClass);} -DtSort.NormalRow.prototype.setAcceptCss = function(){ this.row.$dom.addClass(this.table.options.acceptableClass);} -DtSort.NormalRow.prototype.removeAcceptCss = function(){ this.row.$dom.removeClass(this.table.options.acceptableClass);} -DtSort.NormalRow.prototype.toString = function(){ return langRowIndex + ' ' + this.getIndex() + ' [' + langNormal + ']';} - -DtSort.tools = { - elementSize: function(el) - { - let w = el.clientWidth || el.offsetWidth; - let h = el.clientHeight || el.offsetHeight; - - return { w: w, h: h } - }, - elementPos: function(el) - { - if (el.parentNode === null || el.style.display == 'none') - { - return false; - } - var parent = null; - var pos = []; - var box; - if (el.getBoundingClientRect) - { - // IE - box = el.getBoundingClientRect(); - var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop); - var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); - return { - x: box.left + scrollLeft, - y: box.top + scrollTop - }; - } - else if (document.getBoxObjectFor) - { - box = document.getBoxObjectFor(el); - var borderLeft = (el.style.borderLeftWidth) ? parseInt(el.style.borderLeftWidth) : 0; - var borderTop = (el.style.borderTopWidth) ? parseInt(el.style.borderTopWidth) : 0; - pos = [box.x - borderLeft, box.y - borderTop]; - } - else - { - // safari & opera - pos = [el.offsetLeft, el.offsetTop]; - parent = el.offsetParent; - if (parent != el) - { - while (parent) - { - pos[0] += parent.offsetLeft; - pos[1] += parent.offsetTop; - parent = parent.offsetParent; - } - } - if (ua.indexOf('opera') != -1 || (ua.indexOf('safari') != -1 && el.style.position == 'absolute')) - { - pos[0] -= document.body.offsetLeft; - pos[1] -= document.body.offsetTop; - } - } - if (el.parentNode) - { - parent = el.parentNode; - } else { - parent = null; - } - while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') - { - // account for any scrolled ancestors - pos[0] -= parent.scrollLeft; - pos[1] -= parent.scrollTop; - if (parent.parentNode) - { - parent = parent.parentNode; - } - else - { - parent = null; - } - } - return { - x: pos[0], - y: pos[1] - }; - }, - mousePos: function(event) - { - var e = event || window.event; - var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; - var scrollY = document.documentElement.scrollTop || document.body.scrollTop; - var x = e.pageX || e.clientX + scrollX; - var y = e.pageY || e.clientY + scrollY; - - return { x: x, y: y }; - }, - distance(p1, p2) - { - var dx = p1.x - p2.x; - var dy = p1.y - p2.y; - - return Math.pow((dx * dx + dy * dy), 0.5); - } -}; - -DtSort.sort = function(options) -{ - var dtSort = new DtSort.Table(options); - return dtSort; -}; - - -//tree js -$(function() -{ - $('#caseTableList').on('click', '.c-id a,.c-name a,.c-actions a', function(e) - { - e.stopPropagation(); - }); - - $('#caseTableList').on('click', '.row-case', function(e) - { - var $row = $(this); - $row.toggleClass('checked'); - - updateChildrenCheckboxes($row); - updatePrarentCheckbox($row); - }); - - function updateChildrenCheckboxes($row) - { - var rowID = $row.data('id'); - var isChecked = $row.hasClass('checked'); - - if ($row.hasClass('has-nest-child')) - { - $('#caseTableList tr[data-nest-parent="'+rowID+'"]').each(function(){ - $(this).toggleClass('checked', isChecked); - $(this).find('input:checkbox').prop('checked', isChecked); - - updateChildrenCheckboxes($(this)); - }); - } - } - - /* Update parent checkbox */ - function updatePrarentCheckbox($row) - { - var rowID = $row.data('id'); - var parentID = $row.attr('data-nest-parent'); - var $parent = $('#caseTableList>tr[data-id="' + parentID + '"]'); - if(parentID && parentID !== '0') - { - var isAllChecked = true; - $('#caseTableList tr[data-nest-parent="'+parentID+'"]').each(function(){ - if (!$(this).hasClass('checked')) - { - isAllChecked = false; - } - }); - $parent.toggleClass('checked', isAllChecked); - $parent.find('input:checkbox').prop('checked', isAllChecked); - updatePrarentCheckbox($parent); - } - } - - //only scene - $('input[name^="onlyScene"]').click(function(){ - var onlyScene = $(this).is(':checked') ? 1 : 0; - $.cookie('onlyScene', onlyScene, {expires:config.cookieLife, path:config.webRoot}); - window.location.reload(); - }); - - $("input[name^=caseIDList]").change(function(){ - var trList = $("#caseTableList").find("tr"); - var selectedCaseNum = 0; - for(var i=0; i 0) - { - group.show(); - } - else - { - group.hide(); - } - }); -}); diff --git a/module/testcase/js/create.js b/module/testcase/js/create.js deleted file mode 100644 index 481f5fb464..0000000000 --- a/module/testcase/js/create.js +++ /dev/null @@ -1,250 +0,0 @@ -/* Set the story priview link. */ -function setPreview() -{ - if($('#story').val() == 0) - { - $('#preview').addClass('hidden'); - } - else - { - storyLink = createLink('story', 'view', "storyID=" + $('#story').val()); - if(!isonlybody) - { - var concat = storyLink.indexOf('?') < 0 ? '?' : '&'; - storyLink = storyLink + concat + 'onlybody=yes'; - } - - $('#preview').addClass('iframe'); - $('#preview').removeClass('hidden'); - $('#preview').attr('href', storyLink); - } -} - -$(function() -{ - var $searchStories = $('#searchStories'); - var lastSearchFn = false; - var $searchInput = $('#storySearchInput'); - var $searchResult = $('#searchResult'); - var $selectedItem; - var showSearchModal = function() - { - $searchStories.modal('show').on('shown.zui.modal', function() - { - var key = $('#story_chosen .chosen-results > li.no-results > span').text(); - if(key) $searchInput.val(key).trigger('change'); - $searchInput.focus(); - }); - }; - - $(document).on('change', '#story', function() - { - if($(this).val() === 'showmore') showSearchModal(); - }); - - $(document).on('click', '#priRequiredBox', function() - { - $('#priSelect').removeClass('required'); - }); - - $(document).on('click', '#story_chosen .chosen-results > li.no-results', showSearchModal); - - $searchStories.on('hide.zui.modal', function() - { - var key = ''; - var $story = $('#story'); - if($selectedItem && $selectedItem.length) - { - key = $selectedItem.data('key'); - if(!$story.children('option[value="' + key + '"]').length) - { - $story.prepend(''); - } - } - $story.val(key).trigger("chosen:updated"); - $selectedItem = null; - }); - - var selectItem = function(item) - { - $selectedItem = $(item).first(); - $searchStories.modal('hide'); - }; - - $searchResult.on('click', 'a', function(){selectItem(this);}).on('mouseenter', 'a', function() - { - $searchResult.find('a.selected').removeClass('selected'); - $(this).addClass('selected'); - }).on('mouseleave', 'a', function() - { - $(this).removeClass('selected'); - }); - - $searchInput.on('paste change keyup', function() - { - if(lastSearchFn) clearTimeout(lastSearchFn); - lastSearchFn = setTimeout(function() - { - var key = $searchInput.val() || ''; - if(key && key != $searchInput.data('lastkey')) - { - $searchResult.empty().append('
  • '); - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - var link = createLink('story', 'ajaxSearchProductStories', 'key=' + key + '&productID=' + $('#product').val() + '&branch=' + branch + '&moduleID=' + $('#module').val() + '&storyID=0&status=noclosed&limit=50'); - $.getJSON(link, function(result) - { - $searchResult.empty(); - if(result) - { - for(var key in result) - { - if(key === 'info') - { - $searchResult.append('
  • ' + result[key] + '
  • '); - } - else - { - $searchResult.append("
  • " + result[key] + "
  • "); - } - } - $searchResult.find('li:first > a').addClass('selected'); - } - }); - $searchInput.data('lastkey', key); - } - else if(!key.length) - { - $searchResult.empty(); - } - }, 500); - }).on('keyup', function(e) - { - var $selected = $searchResult.find('a.selected').first(); - if(e.keyCode == 38) // keyup - { - var $prev = $selected.closest('li').prev().children('a'); - if($prev.length) - { - $selected.removeClass('selected'); - $prev.addClass('selected'); - } - } - else if(e.keyCode == 40) // keydown - { - var $next = $selected.closest('li').next().children('a'); - if($next.length) - { - $selected.removeClass('selected'); - $next.addClass('selected'); - } - } - else if(e.keyCode == 13) selectItem($selected); - }); - - if(!isonlybody) $("#preview").modalTrigger({width:960, type:'iframe'}); - - $('[data-toggle=tooltip]').tooltip(); - - initSteps(); - - $('#pri').on('change', function() - { - var $select = $(this); - var $selector = $select.closest('.pri-selector'); - var value = $select.val(); - $selector.find('.pri-text').html('' + value + ''); - }); - - $.get(createLink('testcase', 'ajaxGetStatus', 'methodName=create'), function(status) - { - $('#status').val(status).change(); - }); - - $('#subNavbar li[data-id="testcase"]').addClass('active'); - - $('#customField').click(function() - { - hiddenRequireFields(); - }); - - /* Implement a custom form without feeling refresh. */ - $('#formSettingForm .btn-primary').click(function() - { - saveCustomFields('createFields'); - return false; - }); -}); - - -function loadAllNew(productID) -{ - loadProductBranchesNew(productID); -} - -function loadProductBranchesNew(productID) -{ - $('#branch').remove(); - - var param = page == 'create' ? 'active' : 'all'; - var oldBranch = page == 'edit' ? caseBranch : 0; - var param = "productID=" + productID + "&oldBranch=" + oldBranch + "¶m=" + param; - if(typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) param += "&projectID=" + objectID; - $.get(createLink('branch', 'ajaxGetBranches', param), function(data) - { - if(data) - { - $('#product').closest('.input-group').append(data); - $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '95px'); - } - - loadProductModulesNew(productID); - setStories(); - }) -} - -function loadProductModulesNew(productID, branch) -{ - if(typeof(branch) == 'undefined') branch = $('#branch').val(); - if(!branch) branch = 0; - var currentModuleID = config.currentMethod == 'edit' ? $('#module').val() : 0; - link = createLink('testcase', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + currentModuleID); - $('#moduleIdBox').load(link, function() - { - var $inputGroup = $(this); - $inputGroup.find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + ""); - $inputGroup.fixInputGroup(); - }); - setScenes(); - setStories(); -} - -function setScenes() -{ - moduleID = $('#module').val(); - productID = $('#product').val(); - branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - link = createLink('testcase', 'ajaxGetModuleScenes', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&stype=2&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1'); - - $('#sceneIdBox').load(link, function() - { - $(this).find('select').chosen() - }); -} - -function loadBranchNew() -{ - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - loadProductModulesNew($('#product').val(), branch); - - setStories(); -} - -function loadModuleRelatedNew() -{ - setScenes(); - setStories(); -} diff --git a/module/testcase/js/createscene.js b/module/testcase/js/createscene.js deleted file mode 100644 index d9501c89a6..0000000000 --- a/module/testcase/js/createscene.js +++ /dev/null @@ -1,66 +0,0 @@ -function loadAllNew(productID) -{ - loadProductBranchesNew(productID); -} - -function loadProductBranchesNew(productID) -{ - $('#branch').remove(); - - var param = page == 'create' ? 'active' : 'all'; - var oldBranch = page == 'edit' ? caseBranch : 0; - var param = "productID=" + productID + "&oldBranch=" + oldBranch + "¶m=" + param; - if(typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) param += "&projectID=" + objectID; - $.get(createLink('branch', 'ajaxGetBranches', param), function(data) - { - if(data) - { - $('#product').closest('.input-group').append(data); - $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '95px'); - } - - loadProductModulesNew(productID); - }) -} - -function loadProductModulesNew(productID, branch) -{ - if(typeof(branch) == 'undefined') branch = $('#branch').val(); - if(!branch) branch = 0; - var currentModuleID = config.currentMethod == 'edit' ? $('#module').val() : 0; - link = createLink('testcase', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + currentModuleID); - $('#moduleIdBox').load(link, function() - { - var $inputGroup = $(this); - $inputGroup.find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + ""); - $inputGroup.fixInputGroup(); - }); - setScenes(); -} - -function setScenes() -{ - moduleID = $('#module').val(); - productID = $('#product').val(); - branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - link = createLink('testcase', 'ajaxGetModuleScenes', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&stype=2&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1'); - - $('#sceneIdBox').load(link, function() - { - $(this).find('select').chosen() - }); -} - -function loadBranchNew() -{ - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - loadProductModulesNew($('#product').val(), branch); -} - -function loadModuleRelatedNew() -{ - setScenes(); -} diff --git a/module/testcase/js/edit.js b/module/testcase/js/edit.js deleted file mode 100644 index 8cce84d8fb..0000000000 --- a/module/testcase/js/edit.js +++ /dev/null @@ -1,165 +0,0 @@ -/** - * Get story list. - * - * @param string $module - * @access public - * @return void - */ -function getList() -{ - productID = $('#product').get(0).value; - storyID = $('#story').get(0).value; - link = createLink('search', 'select', 'productID=' + productID + '&projectID=0&module=story&moduleID=' + storyID); - $('#storyListIdBox a').attr("href", link); -} - -$(document).ready(function() -{ - /* Set secondary menu highlighting. */ - if(isLibCase) - { - $('#navbar li[data-id=caselib]').addClass('active'); - $('#navbar li[data-id=testcase]').removeClass('active'); - } - - $(document).on('change', '[name^=steps], [name^=expects]', function() - { - var steps = []; - var expects = []; - var status = $('#status').val(); - - $('[name^=steps]').each(function(){ steps.push($(this).val()); }); - $('[name^=expects]').each(function(){ expects.push($(this).val()); }); - - $.post(createLink('testcase', 'ajaxGetStatus', 'methodName=update&caseID=' + caseID), {status : status, steps : steps, expects : expects}, function(status) - { - $('#status').val(status).change(); - }); - }); - - initSteps(); -}); - -/** - * Load lib modules. - * - * @param int $libID - * @access public - * @return void - */ -function loadLibModules(libID) -{ - link = createLink('tree', 'ajaxGetOptionMenu', 'libID=' + libID + '&viewtype=caselib&branch=0&rootModuleID=0&returnType=html&fieldID=&needManage=true'); - $('#moduleIdBox').load(link, function() - { - $(this).find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + "") - }); -} - -/** - * Load by branch. - * - * @param int oldBranch - * @access public - * @return void - */ -function loadBranch(oldBranch) -{ - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - - var result = true; - if(branch) - { - for(taskID in testtasks) - { - if(branch != oldBranch && testtasks[taskID]['branch'] != branch) - { - var tip = confirmUnlinkTesttask.replace("%s", caseID); - result = confirm(tip); - if(!result) $('#branch').val(oldBranch).trigger("chosen:updated"); - break; - } - } - } - - if(result) - { - loadProductModules($('#product').val(), branch); - setStories(); - } -} - -function loadAllNew(productID) -{ - loadProductBranchesNew(productID); -} - -function loadProductBranchesNew(productID) -{ - $('#branch').remove(); - - var param = page == 'create' ? 'active' : 'all'; - var oldBranch = page == 'edit' ? caseBranch : 0; - var param = "productID=" + productID + "&oldBranch=" + oldBranch + "¶m=" + param; - if(typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) param += "&projectID=" + objectID; - $.get(createLink('branch', 'ajaxGetBranches', param), function(data) - { - if(data) - { - $('#product').closest('.input-group').append(data); - $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '95px'); - } - - loadProductModulesNew(productID); - setStories(); - }) -} - -function loadProductModulesNew(productID, branch) -{ - if(typeof(branch) == 'undefined') branch = $('#branch').val(); - if(!branch) branch = 0; - var currentModuleID = config.currentMethod == 'edit' ? $('#module').val() : 0; - link = createLink('testcase', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + currentModuleID); - $('#moduleIdBox').load(link, function() - { - var $inputGroup = $(this); - $inputGroup.find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + ""); - $inputGroup.fixInputGroup(); - }); - setScenes(); - setStories(); -} - -function setScenes() -{ - moduleID = $('#module').val(); - productID = $('#product').val(); - branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - link = createLink('testcase', 'ajaxGetModuleScenes', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&stype=2&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1'); - - $('#sceneIdBox').load(link, function() - { - $(this).find('select').chosen() - }); -} - - -function loadBranchNew() -{ - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - loadProductModulesNew($('#product').val(), branch); - - setStories(); -} - -function loadModuleRelatedNew() -{ - setScenes(); - setStories(); -} diff --git a/module/testcase/js/editscene.js b/module/testcase/js/editscene.js deleted file mode 100644 index 9bfb5f9cf0..0000000000 --- a/module/testcase/js/editscene.js +++ /dev/null @@ -1,66 +0,0 @@ -function loadAllNew(productID) -{ - loadProductBranchesNew(productID); -} - -function loadProductBranchesNew(productID) -{ - $('#branch').remove(); - - var param = page == 'create' ? 'active' : 'all'; - var oldBranch = page == 'edit' ? caseBranch : 0; - var param = "productID=" + productID + "&oldBranch=" + oldBranch + "¶m=" + param; - if(typeof(tab) != 'undefined' && (tab == 'execution' || tab == 'project')) param += "&projectID=" + objectID; - $.get(createLink('branch', 'ajaxGetBranches', param), function(data) - { - if(data) - { - $('#product').closest('.input-group').append(data); - $('#branch').css('width', config.currentMethod == 'create' ? '120px' : '95px'); - } - - loadProductModulesNew(productID); - }) -} - -function loadProductModulesNew(productID, branch) -{ - if(typeof(branch) == 'undefined') branch = $('#branch').val(); - if(!branch) branch = 0; - var currentModuleID = config.currentMethod == 'edit' ? $('#module').val() : 0; - link = createLink('testcase', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true&extra=¤tModuleID=' + currentModuleID); - $('#moduleIdBox').load(link, function() - { - var $inputGroup = $(this); - $inputGroup.find('select').chosen() - if(typeof(caseModule) == 'string') $('#moduleIdBox').prepend("" + caseModule + ""); - $inputGroup.fixInputGroup(); - }); - setScenes(); -} - -function setScenes() -{ - moduleID = $('#module').val(); - productID = $('#product').val(); - branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - link = createLink('testcase', 'ajaxGetModuleScenes', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&stype=1&storyID=0&onlyOption=false&status=noclosed&limit=50&type=full&hasParent=1&number=¤tScene=' + sceneId); - - $('#sceneIdBox').load(link, function() - { - $(this).find('select').chosen() - }); -} - -function loadBranchNew() -{ - var branch = $('#branch').val(); - if(typeof(branch) == 'undefined') branch = 0; - loadProductModulesNew($('#product').val(), branch); -} - -function loadModuleRelatedNew() -{ - setScenes(); -} diff --git a/module/testcase/js/export.js b/module/testcase/js/export.js deleted file mode 100644 index 5702eed2bf..0000000000 --- a/module/testcase/js/export.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - if($('.pager', window.parent.document).data('rec-total') >= 10000) $('.part').removeClass('hidden'); -}); diff --git a/module/testcase/js/groupcase.js b/module/testcase/js/groupcase.js deleted file mode 100644 index 4eb3535d5b..0000000000 --- a/module/testcase/js/groupcase.js +++ /dev/null @@ -1,9 +0,0 @@ -$(function() -{ - $('input[name^="showAutoCase"]').click(function() - { - var showAutoCase = $(this).is(':checked') ? 1 : 0; - $.cookie('showAutoCase', showAutoCase, {expires:config.cookieLife, path:config.webRoot}); - window.location.reload(); - }); -}) diff --git a/module/testcase/js/importfromlib.js b/module/testcase/js/importfromlib.js deleted file mode 100644 index 054105cd5f..0000000000 --- a/module/testcase/js/importfromlib.js +++ /dev/null @@ -1,139 +0,0 @@ -$(function() -{ - $('.querybox-toggle').parent().addClass('active'); - - $(document).on('click', '.chosen-with-drop', function() - { - var select = $(this).prev('select'); - if($(select).val() == 'ditto') - { - var index = $(select).closest('td').index(); - var row = $(select).closest('tr').index(); - var table = $(select).closest('tr').parent(); - var value = ''; - for(i = row - 1; i >= 0; i--) - { - value = $(table).find('tr').eq(i).find('td').eq(index).find('select').val(); - if(value != 'ditto') break; - } - $(select).val(value); - $(select).trigger("chosen:updated"); - } - }); - $('.pager a.pager-item').attr('data-app', app); -}) - -/** - * Reload. - * - * @param int $libID - * @access public - * @return void - */ -function reload(libID) -{ - link = createLink('testcase','importFromLib','productID='+ productID + '&branch=' + branch + '&libID='+libID); - location.href = link; -} - -/** - * Update modules. - * - * @param int $productID - * @param int $branch - * @param int $caseID - * @access public - * @return void - */ -function updateModules(productID, branch, caseID) -{ - if(typeof(branch) == 'undefined') branch = 0; - - var moduleLink = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branch + '&rootModuleID=0&returnType=html&fieldID=&needManage=true'); - var tr = $('#module' + caseID).closest('tr'); - if(branch !== 'ditto') - { - loadModules(tr, caseID, moduleLink, undefined, branch); - tr.nextAll().each(function() - { - var nextCaseID = $(this).attr('id'); - var nextBranch = $('#branch' + nextCaseID + ' option:selected').val(); - if(nextBranch !== 'ditto') return false; - var nextTr = $('#module' + nextCaseID).closest('tr'); - loadModules(nextTr, nextCaseID, moduleLink, true, branch); - }); - } - else - { - var branchID = ''; - tr.prevAll().each(function() - { - var prevCaseID = $(this).attr('id'); - var prevBranch = $('#branch' + prevCaseID + ' option:selected').val(); - if(prevBranch !== 'ditto') - { - branchID = prevBranch; - return false; - } - }); - link = createLink('tree', 'ajaxGetOptionMenu', 'productID=' + productID + '&viewtype=case&branch=' + branchID + '&rootModuleID=0&returnType=html&fieldID=&needManage=true'); - loadModules(tr, caseID, link, true, branchID); - tr.nextAll().each(function() - { - var nextCaseID = $(this).attr('id'); - var nextBranch = $('#branch' + nextCaseID + ' option:selected').val(); - if(nextBranch !== 'ditto') return false; - var nextTr = $('#module' + nextCaseID).closest('tr'); - loadModules(nextTr, nextCaseID, link, true, branchID); - }); - } -} - -/** - * Load modules. - * - * @param object $tr - * @param int $caseID - * @param string $link - * @param boolean $isAddDitto - * @param int $branch - * @access public - * @return void - */ -function loadModules(tr, caseID, link, isAddDitto, branch) -{ - var isAddDitto = (typeof(isAddDitto) === 'undefined') ? false : true; - - $('#module' + caseID).parent('td').load(link, function(data) - { - if(canImportModules[branch][caseID] != undefined && Object.keys(canImportModules[branch][caseID]).length > 0) - { - $('tr select#module').children().each(function() - { - moduleID = $(this).val(); - if(canImportModules[branch][caseID][moduleID] == undefined) - { - $(this).remove(); - } - }) - } - - tr.find('#module').chosen(); - tr.find('#module').attr({"id": 'module' + caseID, "name": 'module[' + caseID + ']'}); - tr.find('#module' + caseID).removeAttr('onchange'); - if(isAddDitto == true) addDittoOption(caseID); - }); -} - -/** - * add ditto option in select. - * - * @param int $caseID - * @access public - * @return void - */ -function addDittoOption(caseID) -{ - $('#module' + caseID).append(""); - $('#module' + caseID).trigger('chosen:updated'); -} diff --git a/module/testcase/js/review.js b/module/testcase/js/review.js deleted file mode 100644 index 0fca8a6732..0000000000 --- a/module/testcase/js/review.js +++ /dev/null @@ -1,10 +0,0 @@ -$(function() -{ - $('#result').change(function() - { - $.post(createLink('testcase', 'ajaxGetStatus', 'methodName=review&caseID=' + caseID), {result : $(this).val()}, function(status) - { - $('#status').val(status).change(); - }); - }); -}) diff --git a/module/testcase/js/showscript.js b/module/testcase/js/showscript.js deleted file mode 100644 index 1280979a67..0000000000 --- a/module/testcase/js/showscript.js +++ /dev/null @@ -1,20 +0,0 @@ -$(document).ready(function() -{ - var $pre = $('.repoCode .content pre'); - var rowTip = ''; - if($('#rowTip').length > 0) rowTip = $('#rowTip').html(); - - if($pre.length) - { - hljs.initHighlightingOnLoad(); - var content = hljs.highlight($pre.attr('class'), $pre.text()); - var code = '', line; - var arr = content.value.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/); - for(var i = 0 ; i < arr.length ; i++) - { - line = i + 1; - code += "
    " + line + "" + (arr[i] || ' ') + rowTip + ""; - } - $pre.html("" + code + "
    "); - } -}); diff --git a/module/testcase/js/showxmindimport.js b/module/testcase/js/showxmindimport.js deleted file mode 100644 index 202f51d52a..0000000000 --- a/module/testcase/js/showxmindimport.js +++ /dev/null @@ -1,1496 +0,0 @@ -var mindmapMgr = undefined; - -$(document).ready(function() -{ - mindmapMgr = new ztmindmap.Wraper({ - product: productID, - branch: branch, - typeKeys:{ - module: userConfig_module, - scene: userConfig_scene, - testcase: userConfig_case, - stepGroup: userConfig_group, - pri: userConfig_pri - } - }); - - $.get(createLink('testcase', 'getXmindImport'),function(res) - { - var data = JSON.parse(res); - if(ztmindmap.isArray(data)) - { - var rootTopic = data[0].rootTopic; - mindmapMgr.initFromJSON(rootTopic); - } - else - { - var sheet = data["xmap-content"]["sheet"]; - if(ztmindmap.isArray(sheet)) sheet = sheet[0]; - mindmapMgr.initFromSheet(sheet); - } - - mindmapMgr.render(); - }); - - $("#xmindmapSave").click(function(e) - { - var data = mindmapMgr.toJson(); - if(data.testcaseList.length == 0) - { - alert(jsLng.caseNotExist); - return; - } - - $.post(createLink('testcase', 'saveXmindImport'),data,function(res) - { - var res = JSON.parse(res); - if(res.result != "success") - { - if(res.message && res.message !== '') - { - alert(res.message); - return; - } - - alert(jsLng.saveFail); - } - else - { - //var params = "productID=" + productID + "&branch=" + branch; - var params = "productID=" + productID; - parent.location = createLink('testcase', 'browse',params); - } - }); - }) -}); - -function setStories(){ - //do nothing -} - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -ztmindmap.ModuleManager = function(wraper){ this.wraper = wraper;} -ztmindmap.ModuleManager.prototype.clearNodeDisplay = function($node, data){ $node.find(".suffix").hide();}; - -ztmindmap.ModuleManager.prototype.getContextMenuList = function(data) -{ - if(data.$.typeBy.import == true) return []; - - //如果上一个节点时模型,当前节点可以在 ”场景“ 和 ”测试用例间切换“ - var parentNode = this.wraper.findParentNode(data); - if(parentNode.$.type == "module") - { - var menus = []; - - if(data.$.type == "testcase" || data.$.type == undefined) menus.push({action:"addScene", label:jsLng.set2Scene}); - if(data.$.type == "scene" || data.$.type == undefined) menus.push({action:"addTestcase", label:jsLng.set2Testcase}); - if(data.$.type != undefined) menus.push({action:"delType", label:jsLng.clearSetting}); - - return menus; - } - - return []; -}; - -ztmindmap.ModuleManager.prototype.delType = function($node,data) -{ - this.wraper.changeNodeType($node,data,undefined); - this.wraper.clearTypeAfter($node,data); - //this.refreshDisplay(); -} - -ztmindmap.ModuleManager.prototype.addScene = function($node,data) -{ - var moduleData = this.wraper.findParentData(data); - data.$.moduleID = moduleData.$.moduleID; - this.wraper.changeNodeType($node,data,"scene"); - this.wraper.clearTypeAfter($node,data); - //this.refreshDisplay(); -} - -ztmindmap.ModuleManager.prototype.addTestcase = function($node,data) -{ - this.wraper.changeNodeType($node,data,"testcase"); - this.wraper.clearTypeAfter($node,data); - //this.refreshDisplay(); -} - -ztmindmap.ModuleManager.prototype.refreshNodeDisplay = function($node, data) -{ - $node.find(".suffix").hide(); - - if(data.$.moduleID != undefined) - { - $node.find(".suffix").show(); - $node.find(".suffix").find(".content").html(this.wraper.disKeys['module'] + ":" + data.$.moduleID); - } -} - -ztmindmap.ModuleManager.prototype.refreshDisplay = function(){ this.wraper.refreshDisplay();}; - - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -ztmindmap.SceneManager = function(wraper) -{ - this.wraper = wraper; - this.proprMgr = new ztmindmap.SceneProperyManager(this); - this.proprMgr.init(); -}; - -ztmindmap.SceneManager.prototype.clearNodeDisplay = function($node, data) -{ - $node.find(".suffix").hide(); - $node.find(".scene-indicator").hide(); - - $node.removeAttr("title"); - data.tooltip = undefined; - data.$.moduleID = undefined; - $node.tooltip('destroy'); -}; - -ztmindmap.SceneManager.prototype.refreshNodeDisplay = function($node, data) -{ - $node.find(".scene-indicator").show(); - - $node.find(".scene-indicator").removeClass("scene-indicator-yes"); - - if(data.$.moduleID != undefined) - { - $node.attr("title",data.tooltip); - $node.tooltip(); - - $node.find(".scene-indicator").addClass("scene-indicator-yes"); - } - - if(data.$.sceneID != undefined) - { - $node.find(".suffix").show(); - $node.find(".suffix").find(".content").html(this.wraper.disKeys['scene'] + ":" + data.$.sceneID); - } -}; - -ztmindmap.SceneManager.prototype.getContextMenuList = function(data) -{ - var parentNode = this.wraper.findParentNode(data); - if(parentNode.$.type == "scene" && (data.$.type != "testcase" && data.$.type != "scene")) - return [{action:"addTestcase", label:jsLng.set2Testcase}]; - - if(data.$.typeBy.import == true || data.$.type != "scene") return []; - - //如果有父场景(包括父父节点),当前节点禁止设置所属模块,只能最前面的场景节点设置 - var parents = this.wraper.findParentNodes(data); - for(var i=0;ispan").html(); - - this.data.$.moduleID = moduleID; - this.data.tooltip = moduleName; - this.mgr.refreshNodeDisplay(this.$node,this.data); - - this.mgr.wraper.autoSetSceneModuleAfter(this.$node,this.data); - this.mgr.refreshDisplay(); - - this.$modal.modal("hide"); -}; - - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -ztmindmap.StepGroupManager = function(wraper){ this.wraper = wraper;}; - -ztmindmap.StepGroupManager.prototype.clearNodeDisplay = function($node, data){ $node.find(".suffix").hide();}; - -ztmindmap.StepGroupManager.prototype.refreshNodeDisplay = function($node, data) -{ - $node.find(".suffix").hide(); - $node.find(".suffix").show(); - $node.find(".suffix").find(".content").html(this.wraper.disKeys['stepGroup']); -}; - - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -/** - * 设为场景:节点后面的自动推断, 按照最多4级来判断:测试用例 -> 步骤分组 ->步骤 -> 期望结果 - * - * 清除前面场景:不做其他推断 - * 清除后面场景:直接子节点设置为测试用例 - * 清除当前场景:仅在只有一个场景的情况下有这个菜单,同时删除所有用例 - * - * 设为废弃:当前节点及其后续节点全部丢掉 - * 重新启用:当前节点及其后续节点全部启用 - * - * 清除场景: 操作不够明确,无法判断用户意图,这里不提供 - */ - -ztmindmap.nodeTemplate = - "
    " + - " " + - " " + - "
    " + - "
    {text}
    " + - "
    {caption}
    " + - "
    " + - "
    " + - "
    [M:10000]
    " + - "
    "; - -ztmindmap.defaultTypeKeys = { - module: "M", - scene: "S", - testcase: "C", - stepGroup:"G", - pri: "P" -} - - -ztmindmap.Wraper = function(params) -{ - this.data = undefined; - this.productID = params.product; - this.branch = params.branch; - this.typeKeys = $.extend({},ztmindmap.defaultTypeKeys,params.typeKeys); - this.disKeys = $.extend({},ztmindmap.defaultTypeKeys,params.typeKeys); - - for(var key in this.typeKeys) this.typeKeys[key] = this.typeKeys[key].toLowerCase(); - - this.nodeMgrs = { - scene: new ztmindmap.SceneManager(this), - testcase: new ztmindmap.TestcaseManager(this), - module: new ztmindmap.ModuleManager(this), - stepGroup: new ztmindmap.StepGroupManager(this) - } -}; - -ztmindmap.Wraper.prototype.initFromJSON = function(root) -{ - var rootNode = this.paserXmindNode(root,0); - - this.xmindJson2zendao(root,rootNode,1); - - this.data = rootNode; - - this.inheritImportProps(); -} - -ztmindmap.Wraper.prototype.initFromSheet = function(sheet) -{ - var title = ztmindmap.isObject(sheet.title) ? sheet.title.text : sheet.title; - - var root = {id:sheet.id, text:title,children:[],type:"tmpTop"}; - - this.xmindXml2zendao(sheet.topic, root, 0); - - this.data = root.children[0]; - - this.inheritImportProps(); -}; - -ztmindmap.Wraper.prototype.render = function() -{ - var that = this; - - that.instance = $('#mindmap').mindmap({ - hSpace:80, - showToggleButton: true, - nodeTeamplate: ztmindmap.nodeTemplate, - data: that.data, - enableDrag: false, - subLineWidth: 2, - afterNodeLoad: function(event) - { - var data = event.data; - var $node = event.$node; - - that.refreshNodeDisplay($node,data); - that.register($node,data); - - $node.on("contextmenu",function(e) - { - var contextMenuList = that.getContextMenuList(data); - if(contextMenuList.length == 0) return; - - e.preventDefault(); - - $.zui.ContextMenu.show(contextMenuList,{event:e,onClickItem:function(item) - { - if(item.type == undefined) - that[item.action] && that[item.action]($node,data); - else - that.nodeMgrs[item.type][item.action] && that.nodeMgrs[item.type][item.action]($node, data); - }}); - }); - } - }).data('zui.mindmap'); - - for(var key in this.nodeMgrs) - { - this.nodeMgrs[key]["init"] && this.nodeMgrs[key]["init"](); - } -}; - -ztmindmap.Wraper.prototype.refreshDisplay = function(){ this.instance.showNode();}; - -ztmindmap.Wraper.prototype.getContextMenuList = function(data) -{ - var contextMenuList = []; - - if(data.$.typeBy.import == false) - { - if(data.$.type != "scene") - { - var parents = this.findParentNodes(data); - var canChangeToScene = true; - for(var i=parents.length-1;i>=0;i--) - { - var item = parents[i]; - if(item.$.type == "testcase" || item.$.type == "stepGroup") - { - canChangeToScene = false; - break; - } - } - - if(canChangeToScene == true) contextMenuList.push({ action: "setAsScene", label: jsLng.set2Scene}); - } - - if(data.$.type == "scene") - { - var removeBeforeScene = this.canRemoveSceneBefore(data); - var removeAfterScene = this.canRemoveSceneAfter(data); - - if(removeBeforeScene == true) contextMenuList.push({ action: "clearBeforeScene", label: jsLng.clearBefore }); - - if(removeAfterScene == true) contextMenuList.push({ action: "clearAfterScene", label: jsLng.clearAfter }); - - if(removeBeforeScene == false && removeAfterScene == false && data.$.typeBy.import == false) contextMenuList.push({ action: "clearCurrentScene", label: jsLng.clearCurrent }); - } - } - - for(var key in this.nodeMgrs) - { - var mgr = this.nodeMgrs[key]; - var menuList = mgr.getContextMenuList != undefined ? mgr.getContextMenuList(data) : []; - - if(menuList.length > 0 && contextMenuList.length >0) contextMenuList.push({type:"divider"}); - - for(var i=0; i 测试步骤 -> 预期 - //测试用例 -> 测试步骤分组 -> 测试步骤 -> 预期 - if(length > 4) - { - //本身 + 子元素长度 大于 4 的肯定不是测试用例,这里自动推断为场景 - childData.$.moduleID = data.$.moduleID; - childData.tooltip = data.tooltip; - this.changeNodeType($childNode,childData,"scene"); - - this.autoReasoningAfter($childNode,childData); - } - else - { - //本身 + 子元素长度 小于等于 4 的可能是场景,也可能是测试用例,这里默认推断为测试用例 - //这里需要用户通过界面手动指定 - this.changeNodeType($childNode,childData,"testcase"); - } - } -} - -/** - * 移除给点节点下面的所有场景 和 测试用例 - * @param {Object} $node 给定节点$Dom - * @param {Object} data 给定节点数据 - */ -ztmindmap.Wraper.prototype.autoRemoveSceneAfer = function($node,data) -{ - var children = data.children || []; - for(var i=0; i=2 ? parentList[parentList.length-2] : undefined; -} - -/** - * 查找给数据的父节点,父父数据的集合(包括当前叶子节点) - * @param {Object} purData - */ -ztmindmap.Wraper.prototype.findParentDatas = function(purData) -{ - var results = []; - - function findParentDataPath(data) - { - if(data == purData) return true; - - var children = data.children || []; - for(var child of children) - { - if(findParentDataPath(child) == true) - { - results.unshift(child); - return true; - } - } - - return false; - } - - var flag = findParentDataPath(this.data); - - if(flag == true) results.unshift(this.data); - - return results; -} - -/** - * 查找给数据的父节点,父父节点的集合 - * 倒序,使用的时候注意坑 - * @param {Object} data - */ -ztmindmap.Wraper.prototype.findParentNodes = function(data) -{ - - var results = []; - - function findParentPath(iData) - { - if(iData.id == data.parent) - { - results.push(iData); - return true; - } - - var children = iData.children || []; - for(var child of children) - { - if(findParentPath(child) == true) - { - results.push(child); - return true; - } - } - - return false; - } - - findParentPath(this.instance.data); - - return results; -} - -/** - * 查找给定数据的父节点 - * @param {Object} data 给定数据 - */ -ztmindmap.Wraper.prototype.findParentNode = function(data) -{ - function findParentImpl(iData) - { - if(iData.id == data.parent) return iData; - - var children = iData.children || []; - for(var child of children) - { - var result = findParentImpl(child); - if(result != undefined) return result; - } - - return undefined; - } - - return findParentImpl(this.instance.data); -} - -ztmindmap.Wraper.prototype.refreshNodeDisplay = function($node,data) -{ - var mgr = this.nodeMgrs[data.$.type]; - mgr && mgr.refreshNodeDisplay && mgr.refreshNodeDisplay($node,data); -} - -ztmindmap.Wraper.prototype.register = function($node, data) -{ - var mgr = this.nodeMgrs[data.$.type]; - mgr && mgr.register && mgr.register($node,data); -} - -ztmindmap.Wraper.prototype.changeNodeType = function($node,data,newType) -{ - if(data.$.type == newType) return; - - var oldMgr = this.nodeMgrs[data.$.type]; - var newMgr = this.nodeMgrs[newType]; - - data.$.type = newType; - - if(oldMgr != undefined) - { - oldMgr["clearNodeDisplay"] && oldMgr["clearNodeDisplay"]($node,data); - oldMgr["unRegister"] && oldMgr["unRegister"]($node,data); - } - - if(newMgr != undefined) - { - newMgr["refreshNodeDisplay"] && newMgr["refreshNodeDisplay"]($node,data); - newMgr["register"] && newMgr["register"]($node,data); - } -}; - -ztmindmap.Wraper.prototype.xmindXml2zendao = function(topic, parent,level) -{ - var obj = this.paserXmindNode(topic,level); - parent.children.push(obj); - - var joinChildren = []; - - if(topic.children != undefined) - { - var children = topic.children; - if(ztmindmap.isObject(children)) children = [children]; - - for(child of children) - { - var topicsList = child.topics; - if(ztmindmap.isObject(topicsList)) topicsList = [topicsList]; - - for(var topics of topicsList) - { - var topic = topics.topic; - if(ztmindmap.isObject(topic)) topic = [topic]; - for(var t of topic) - { - joinChildren.push(t); - } - } - } - } - - for(var i=0; i=0;i--) - { - if(dataList[i].$.type == "scene") - { - lastIndex = i; - break; - } - } - - if(lastIndex < 0 || lastIndex == dataList.length-1) return; - - var nextData = dataList[lastIndex+1]; - nextData.$.type = "testcase"; - } - - function checkOtherBetweenScene(dataList) - { - var firstSceneIndex = -1; - var lastSceneIndex = -1; - - for(var i=0;i=0;i--) - { - if(dataList[i].$.type == "scene") - { - lastSceneIndex = i; - break; - } - } - - if(firstSceneIndex == lastSceneIndex) - return; - - for(var i=firstSceneIndex;i<=lastSceneIndex;i++) - { - dataList[i].$.type = "scene"; - } - } - - function checkSceneAfterModuleNode(dataList) - { - var referIndex = -1; - for(var i=0;i=0;i--) - { - if(dataList[i].$.type == "scene" && dataList[i].$.typeBy.import == true) - { - lastSceneIndex = i; - break; - } - } - - if(firstSceneIndex == lastSceneIndex) return; - - for(var i=firstSceneIndex;i<=lastSceneIndex;i++) - { - dataList[i].$.typeBy.import = true; - dataList[i].$.typeBy.create = "auto"; - } - } -} - -ztmindmap.Wraper.prototype.paserXmindNode = function(nodeData, level) -{ - var titleInfo = ztmindmap.splitText(getNodeText(nodeData.title)); - - var obj = { id:nodeData.id, - text: titleInfo.text, - type: level == 0 ? "root": (level == 1 ? "sub" : "node"), - children:[], - subSide:"right", - $:{ - type: undefined, - typeBy: { import:false, create: "auto" } - }}; - - var props = ztmindmap.kv2Obj(titleInfo.suffix); - if(obj.type == "root" && titleInfo.suffix != undefined) - this['setPropsInProduct'] && this['setPropsInProduct'](obj, titleInfo.suffix); - else if(props[this.typeKeys.module] != undefined) - this['setPropsInModule'] && this['setPropsInModule'](obj, props); - else if(props[this.typeKeys.scene] != undefined) - this['setPropsInScene'] && this['setPropsInScene'](obj, props); - else if(props[this.typeKeys.testcase] != undefined) - this['setPropsInTestcase'] && this['setPropsInTestcase'](obj, props); - else if(props[this.typeKeys.stepGroup] != undefined) - { - obj.$.type = "stepGroup"; - obj.$.typeBy.import = true; - } - - return obj; - - function getNodeText(v) - { - return ztmindmap.isObject(v) ? v.text : v; - } -}; - -ztmindmap.Wraper.prototype.setPropsInProduct = function(obj, suffix) -{ - if(ztmindmap.isID(suffix) == false) return; - - obj.readonly = true; - obj.$.productID = suffix * 1; - obj.$.type = "product"; - obj.$.typeBy.import = true; - obj.$.typeBy.create = "auto"; -} - -ztmindmap.Wraper.prototype.setPropsInModule = function(obj, props) -{ - var moduleID = props[this.typeKeys.module]; - - obj.$.type = "module"; - obj.$.typeBy.create = "auto"; - - if(ztmindmap.isID(moduleID) == true) - { - obj.readonly = true; - obj.$.moduleID = moduleID; - obj.$.typeBy.import = true; - } -} - -ztmindmap.Wraper.prototype.setPropsInScene = function(obj, props) -{ - var sceneID = props[this.typeKeys.scene]; - - obj.$.type = "scene"; - obj.$.typeBy.create = "auto"; - - if(ztmindmap.isID(sceneID)) - { - obj.$.sceneID = sceneID; - obj.$.typeBy.import = true; - } -} - -ztmindmap.Wraper.prototype.setPropsInTestcase = function(obj, props) -{ - - var testcaseID = props[this.typeKeys.testcase]; - - obj.$.type = "testcase"; - obj.$.pri = props[this.typeKeys['pri']] || 3; - obj.$.typeBy.create = "auto"; - - if(ztmindmap.isID(testcaseID)) - { - obj.$.testcaseID = testcaseID; - obj.$.typeBy.import = true; - } -} - -ztmindmap.Wraper.prototype.toJson = function() -{ - var that = this; - - var sceneList = []; - var testcaseList = []; - - var rootData = this.instance.data; - - function sceneToJson(data) - { - if(data.$.type == "scene") sceneList.push(that.singleSceneToJson(data)); - if(data.$.type == "testcase") return; - - var children = data.children || []; - for(var child of children) sceneToJson(child); - } - - function testcaseToJson(data) - { - if(data.$.type == "testcase") - testcaseList.push(that.singleTestCaseToJson(data)); - else { - var children = data.children || []; - for(var child of children) - testcaseToJson(child); - } - } - - sceneToJson(rootData); - testcaseToJson(rootData); - - return {sceneList:sceneList, testcaseList:testcaseList}; -}; - -ztmindmap.Wraper.prototype.singleSceneToJson = function(data) -{ - var obj = { - name: data.text, - module: ztmindmap.toNum(data.$.moduleID,undefined), - product: this.productID * 1, - branch: this.branch * 1, - tmpId: data.id, - tmpPId: data.parent, - } - - if(data.$.sceneID != undefined && data.$.sceneID != "") obj.id = data.$.sceneID * 1; - - return obj; -}; - -ztmindmap.Wraper.prototype.singleTestCaseToJson = function(data) -{ - var parentNode = this.findParentNode(data); - - //获取测试用例数据 - var obj = { - pri: ztmindmap.toNum(data.$.pri,3), - name: data.text, - //module: ztmindmap.toNum(scene.$.moduleID,0), - product: this.productID * 1, - branch: this.branch * 1, - tmpId: data.id, - tmpPId: data.parent, - } - - if(parentNode.$.type == "scene") - obj.module = ztmindmap.toNum(parentNode.$.moduleID,0); - else if(parentNode.$.type == "module") - obj.module = ztmindmap.toNum(parentNode.$.moduleID,0); - else - obj.module = 0; - - //设置测试用例的id - if(data.$.testcaseID != undefined && data.$.testcaseID != "") - obj.id = data.$.testcaseID * 1; - - //获取测试用例的步骤 - obj.stepList = []; - var children = data.children || []; - for(var child of children) - { - var step = { - type: "step", - desc: child.text, - tmpId: child.id, - tmpPId: child.parent, - } - - obj.stepList.push(step); - - var maxLng = ztmindmap.getLengthOfNode(child); - var nextChilds = child.children || []; - - //child的子元素: - //1) 有且仅只有一个,这个子元素作为期望结果来处理 - if(maxLng == 2 && child.$.type != "stepGroup") - { - step.expect = nextChilds[0].text; - step.type = "step"; - continue; - } - - //2) 有多个子元素, 当前元素是步骤分组, 这些子元素作为子步骤 - if(maxLng > 2 || child.$.type == "stepGroup") - { - step.type = "group"; - for(var nextChild of nextChilds) - { - var subStep = { - type: "item", - desc: nextChild.text, - tmpId: nextChild.id, - tmpPId: nextChild.parent - }; - - //如果后续只有一个子元素,作为期望的结果来处理,超过一个子元素,丢掉后面的子元素 - var nextNextChild = nextChild.children || []; - if(nextNextChild.length == 1) - subStep.expect = nextNextChild[0].text; - - obj.stepList.push(subStep); - } - } - } - - return obj; -}; - - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -ztmindmap.TestcaseManager = function(wraper) -{ - this.wraper = wraper; - this.priSelector = undefined; -} - -ztmindmap.TestcaseManager.prototype.init = function() -{ - this.priSelector = new ztmindmap.PriSelector(this); -} - -ztmindmap.TestcaseManager.prototype.register = function($node, data) -{ - let that = this; - - $node.find(".pri-level").click(function(e) - { - that.priSelector.show($node,data); - }); -}; - -ztmindmap.TestcaseManager.prototype.unRegister = function($node, data) -{ - $node.find(".pri-level").unbind(); -}; - -ztmindmap.TestcaseManager.prototype.getContextMenuList = function(data) -{ - var parent = this.wraper.findParentNode(data); - if(parent == undefined || parent.$.type != "testcase") - return []; - - if(data.$.type == "stepGroup") - return [{action:"removeStepGroup", label:jsLng.removeGroup}]; - else - return [{action:"addStepGroup", label:jsLng.set2Group}]; -}; - -ztmindmap.TestcaseManager.prototype.removeStepGroup = function($node,data) -{ - this.wraper.changeNodeType($node,data,undefined); - this.refreshDisplay(); -} - -ztmindmap.TestcaseManager.prototype.addStepGroup = function($node,data) -{ - this.wraper.changeNodeType($node,data,"stepGroup"); - this.refreshDisplay(); -} - -ztmindmap.TestcaseManager.prototype.clearNodeDisplay = function($node, data) -{ - $node.find(".suffix").hide(); - $node.find(".pri-level").hide(); -}; - -ztmindmap.TestcaseManager.prototype.refreshNodeDisplay = function($node, data) -{ - $node.find(".pri-level").show(); - - $node.find(".pri-level").removeClass("pri-1"); - $node.find(".pri-level").removeClass("pri-2"); - $node.find(".pri-level").removeClass("pri-3"); - $node.find(".pri-level").removeClass("pri-4"); - - if(data.$.pri == undefined) - { - $node.find(".pri-level").addClass("pri-empty"); - $node.find(".pri-level").html(""); - } - else - { - $node.find(".pri-level").removeClass("pri-empty"); - $node.find(".pri-level").html(data.$.pri); - $node.find(".pri-level").addClass("pri-" + data.$.pri); - } - - if(data.$.testcaseID != undefined) - { - $node.find(".suffix").show(); - $node.find(".suffix").find(".content").html(this.wraper.disKeys['testcase'] + ":" + data.$.testcaseID); - } -}; - -ztmindmap.TestcaseManager.prototype.refreshDisplay = function() -{ - this.wraper.refreshDisplay(); -} - -ztmindmap.PriSelector = function(mgr) -{ - this.$gradeDom = undefined; - this.$node = undefined; - this.data = undefined; - this.mgr = mgr; - - this.init(); -}; - -ztmindmap.PriSelector.prototype.init = function() -{ - var that = this; - - var htmlStr = ""; - htmlStr += "
    "; - htmlStr += " 1"; - htmlStr += " 2"; - htmlStr += " 3"; - htmlStr += " 4"; - htmlStr += "
    "; - - var $priDom = $(htmlStr); - - $(".mindmap-container").append($priDom); - - $priDom.find("a").on("click",function(e) - { - var pri = $(e.currentTarget).attr("pri"); - that.data.$.pri = pri; - that.mgr.refreshNodeDisplay(that.$node,that.data); - that.mgr.refreshDisplay(); - }); - - $(document).click(function() - { - that.hide(); - }) - - $priDom.hide(); - that.$priDom = $priDom; -}; - -ztmindmap.PriSelector.prototype.show = function($node, data) -{ - this.$node = $node; - this.data = data; - - var nodeLeft = $node.position().left - 15; - var nodeTop = $node.position().top; - var nodeHeight = $node.height(); - - this.$priDom.css({left:nodeLeft, top:nodeTop + nodeHeight + 10}); - - this.$priDom.show(); -}; - -ztmindmap.PriSelector.prototype.hide = function($node, data) -{ - this.$node = undefined; - this.data = undefined; - - this.$priDom && this.$priDom.hide(); -}; - - -if(window.ztmindmap == undefined) window.ztmindmap = {}; - -ztmindmap.isArray = function(obj) -{ - return Object.prototype.toString.call(obj) === '[object Array]'; -} - -ztmindmap.isObject = function(obj) -{ - return Object.prototype.toString.call(obj) === '[object Object]'; -}; - -ztmindmap.getLengthOfNode = function(data) -{ - var maxLength = 0; - - var children = data.children || []; - for(var i=0; i ' + (isFullscreen ? retrack : fullscreen)); - - $('#mainMenu .fullscreen-btn').click(function() - { - $('.side-col').toggleClass('hidden'); - $('body').toggleClass('case-fullscreen'); - - var isFullscreen = $('body').hasClass('case-fullscreen'); - $('#mainMenu .fullscreen-btn').attr('title', isFullscreen ? retrack : fullscreen); - $('#mainMenu .fullscreen-btn').html(' ' + (isFullscreen ? retrack : fullscreen)); - $.cookie('caseFullscreen', isFullscreen); - - setTimeout($.resetToolbarPosition, 50); - }); - - limitIframeLevel(); -}) diff --git a/module/testcase/js/zerocase.js b/module/testcase/js/zerocase.js deleted file mode 100644 index 249058dd35..0000000000 --- a/module/testcase/js/zerocase.js +++ /dev/null @@ -1,5 +0,0 @@ -$(document).ready(function() -{ - $('#zerocaseTab').addClass('btn-active-text'); - $('.pager').attr('data-app', tab); -}); diff --git a/module/testreport/css/create.css b/module/testreport/css/create.css deleted file mode 100644 index 9b548fe4c1..0000000000 --- a/module/testreport/css/create.css +++ /dev/null @@ -1,9 +0,0 @@ -#mainContent .main-header h2 .heading {float: left;} -#mainContent .main-header h2 .input-group {float: left; width: 300px; margin-left: 10px; font-weight: normal;} -#mainContent .detail {border: 1px solid #e5e5e5; margin: 20px 0 0; padding: 0;} -#mainContent .detail-title {background: #eee; padding: 10px;} -#mainContent .detail-content {padding: 0;} -#mainContent .detail .form-actions {padding-bottom: 20px;} -#mainContent .main-header h2 .input-group {margin-top: 1px;} -.c-name {max-width: 100px;} -#profile {vertical-align: unset;} diff --git a/module/testreport/css/edit.css b/module/testreport/css/edit.css deleted file mode 100644 index 7303eee93d..0000000000 --- a/module/testreport/css/edit.css +++ /dev/null @@ -1,3 +0,0 @@ -.c-name {max-width: 100px;} -#profile {vertical-align: unset;} -.c-full-date {width: 190px;} diff --git a/module/testreport/css/view.css b/module/testreport/css/view.css deleted file mode 100644 index c6ca04ec4a..0000000000 --- a/module/testreport/css/view.css +++ /dev/null @@ -1,9 +0,0 @@ -.main {padding: 0px !important;} -.main .nav-tabs {padding-left: 20px; padding-top: 10px;} -.main .tab-content {border: 0px;} -.tab-content #builds tr:last-child td, .tab-content #cases tr:last-child td,.tab-content #bugs tr:last-child td,.tab-content #legacyBugs tr:last-child td {border-bottom: 0px;} -.tab-pane > table {border: 1px solid #ddd;} -.tab-pane > table:first-child {border-top: none;} -.c-name {max-width: 100px;} -#profile {vertical-align: unset;} -.c-full-date {width: 190px;} diff --git a/module/testreport/js/create.js b/module/testreport/js/create.js deleted file mode 100644 index 6485cca0dc..0000000000 --- a/module/testreport/js/create.js +++ /dev/null @@ -1,12 +0,0 @@ -$(function() -{ - $('#mainContent .main-header h2 #selectTask').change(function() - { - var taskID = $(this).val(); - if(taskID) - { - location.href = createLink('testreport', 'create', 'objectID=' + taskID + '&objectType=testtask'); - return false; - } - }); -}) diff --git a/module/testreport/js/view.js b/module/testreport/js/view.js deleted file mode 100644 index 9276d5c790..0000000000 --- a/module/testreport/js/view.js +++ /dev/null @@ -1,15 +0,0 @@ -$(function() -{ - $('.tab-pane').removeClass('active'); - activeTab = activeTab == 'basic' ? 'basic' : 'tabCase'; - $('.tab-pane#' + activeTab).addClass('active'); - - $('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e) - { - var href = $(e.target).data('target'); - if(href == '#tabComment') - { - $('.tab-content #tabComment .article-content img').each(function(){setImageSize($(this), 0 , 0);}); - } - }); -}); diff --git a/module/testsuite/css/browse.css b/module/testsuite/css/browse.css deleted file mode 100644 index 10cf4e6fb1..0000000000 --- a/module/testsuite/css/browse.css +++ /dev/null @@ -1,3 +0,0 @@ -.table td.c-desc div {height: 25px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; float: left; max-width: calc(100% - 20px);} -.table td.c-desc .more {height: 25px; float: left;} -.c-name {width: 200px;} diff --git a/module/testsuite/css/view.css b/module/testsuite/css/view.css deleted file mode 100644 index baa0051c1e..0000000000 --- a/module/testsuite/css/view.css +++ /dev/null @@ -1 +0,0 @@ -.caseModule {overflow: hidden; white-space: nowrap; width:90px;} diff --git a/module/testsuite/js/linkcase.js b/module/testsuite/js/linkcase.js deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/module/testsuite/js/view.js b/module/testsuite/js/view.js deleted file mode 100644 index 7cb0a3d2d1..0000000000 --- a/module/testsuite/js/view.js +++ /dev/null @@ -1,4 +0,0 @@ -$(function() -{ - $("#mainMenu .pull-right .divider:first").remove(); -}) diff --git a/module/testtask/css/batchrun.css b/module/testtask/css/batchrun.css deleted file mode 100644 index 2fc3d5df44..0000000000 --- a/module/testtask/css/batchrun.css +++ /dev/null @@ -1,5 +0,0 @@ -.table-form > tbody > tr > th, .table-form > tbody > tr > td {border-bottom: 1px solid #ddd;} -.outer .table.table-form tbody > tr:last-child td {border: 1px solid #ddd;} - -.wordwrap {word-wrap: break-word; white-space: normal !important;} -.step-item {padding-left: 20px;} diff --git a/module/testtask/css/browse.css b/module/testtask/css/browse.css deleted file mode 100644 index dc35533db0..0000000000 --- a/module/testtask/css/browse.css +++ /dev/null @@ -1,6 +0,0 @@ -#taskList tbody>tr>td, #taskList thead>tr>th {white-space: nowrap;} -#taskList td {overflow: hidden; text-overflow: unset;} -.c-name {width: 200px;} -.c-id {width: 60px;} -.c-user, .c-status {width: 80px;} -.status-blocked {left: -5px;} diff --git a/module/testtask/css/browseunits.css b/module/testtask/css/browseunits.css deleted file mode 100644 index 843aaf11fe..0000000000 --- a/module/testtask/css/browseunits.css +++ /dev/null @@ -1,5 +0,0 @@ -td.pass {background-color: unset !important; border-color: unset !important; border-bottom: 1px solid #eee !important; color: green;} -td.fail {background-color: unset !important; border-color: unset !important; border-bottom: 1px solid #eee !important; color: red;} - -#subHeader #dropMenu .col-left .list-group {margin-bottom: 0px; padding-top: 10px;} -#subHeader #dropMenu .col-left {padding-bottom: 0px;} diff --git a/module/testtask/css/cases.css b/module/testtask/css/cases.css deleted file mode 100644 index 07ce91ae3e..0000000000 --- a/module/testtask/css/cases.css +++ /dev/null @@ -1,16 +0,0 @@ -tbody > tr > td > .btn-icon {margin-right: 3px;} -tbody > tr > td .icon-share {font-size: 9px;} - -.table-footer .table-actions .input-group {float: left;} -.table-footer .table-actions #assignedTo_chosen a.chosen-default {height: 28px; line-height: 15px;} -.table-footer .table-actions .input-group-addon {padding: 4px 12px;} -.table-footer -.table-footer.fixedTfootAction .chosen-results li.active-result {color: black;} -.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single {height: 28px; padding: 3px 6px;} -.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single span {font-size: 12px;} -.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single div {line-height: 10px;} -td.c-story {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -td .warning {color: red;} -#modules .active {font-weight: bolder;} - -.tree li > a.active {color: #0c64eb;} diff --git a/module/testtask/css/create.css b/module/testtask/css/create.css deleted file mode 100644 index 7dfbe349e6..0000000000 --- a/module/testtask/css/create.css +++ /dev/null @@ -1,5 +0,0 @@ -#mailtoGroup .chosen-container-single a {border-left-width: 0px;} -#ownerAndPriBox .picker .picker-selections .picker-selection {width: 158px;} -.table tbody>tr>td {width: 400px;} -[lang^='en'] .table tbody>tr>td, [lang^='de'] .table tbody>tr>td {width: 460px;} -[lang^='fr'] .table tbody>tr>td {width: 480px;} diff --git a/module/testtask/css/edit.css b/module/testtask/css/edit.css deleted file mode 100644 index 7dfbe349e6..0000000000 --- a/module/testtask/css/edit.css +++ /dev/null @@ -1,5 +0,0 @@ -#mailtoGroup .chosen-container-single a {border-left-width: 0px;} -#ownerAndPriBox .picker .picker-selections .picker-selection {width: 158px;} -.table tbody>tr>td {width: 400px;} -[lang^='en'] .table tbody>tr>td, [lang^='de'] .table tbody>tr>td {width: 460px;} -[lang^='fr'] .table tbody>tr>td {width: 480px;} diff --git a/module/testtask/css/groupcase.css b/module/testtask/css/groupcase.css deleted file mode 100644 index 245f7b8923..0000000000 --- a/module/testtask/css/groupcase.css +++ /dev/null @@ -1,2 +0,0 @@ -.group-header > a {line-height: 20px; display: block; max-height: 40px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;} -.case-title {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} diff --git a/module/testtask/css/linkcase.css b/module/testtask/css/linkcase.css deleted file mode 100644 index 02b3b0cf79..0000000000 --- a/module/testtask/css/linkcase.css +++ /dev/null @@ -1,3 +0,0 @@ -td.title {overflow: hidden; white-space: nowrap; text-overflow: ellipsis;} -.main-table .table-header {box-shadow: none;} -.c-version, .c-result {width: 80px;} diff --git a/module/testtask/css/report.css b/module/testtask/css/report.css deleted file mode 100644 index 3f6d52bed1..0000000000 --- a/module/testtask/css/report.css +++ /dev/null @@ -1,8 +0,0 @@ -.table-bordered caption {border: 1px solid #ddd;} -.table-bordered tr > th:first-child, .table-bordered tr > td:first-child {border-left: 1px solid #ddd !important;} -.table-bordered tr > th:last-child, .table-bordered tr > td:last-child {border-right: 1px solid #ddd !important;} - -.panel-heading > strong > span {float: right; color: #29a8cd;} - -.checkboxes {margin-bottom: 10px;} -.checkboxes .checkbox-primary {margin-bottom: 5px;} diff --git a/module/testtask/css/results.css b/module/testtask/css/results.css deleted file mode 100644 index 9d8eba2e57..0000000000 --- a/module/testtask/css/results.css +++ /dev/null @@ -1,13 +0,0 @@ -body {background: white;} - -.resultSteps .step-id {text-align: right;} -.resultSteps .step-item-id {background-color: transparent; border: none; display: none; width: 30px; padding-left: 0; padding-right: 0; text-align: right; padding-right: 8px;} -.resultSteps .checkbox-inline input[type="checkbox"] {top: -2px;} -.resultSteps .btn-group .btn {padding-left: 0; padding-right: 0; min-width: 30px;} -.resultSteps .step-actions {width: 98px;} -.resultSteps .active td {transition: background-color .5s;} -.resultSteps .step-group .step-steps {resize: none; max-height: 30px;} -.resultSteps .step-group .step-expects {display: none;} -.resultSteps .step-item .step-item-id {display: table-cell;} -.resultSteps .step-item .step-id {color: transparent;} -.result-item .span-warning{color: #f1a325;} diff --git a/module/testtask/css/runcase.css b/module/testtask/css/runcase.css deleted file mode 100644 index d2fb82b85b..0000000000 --- a/module/testtask/css/runcase.css +++ /dev/null @@ -1,35 +0,0 @@ -.outer > #titlebar {display: none;} - -.table > thead > tr > th {vertical-align: middle;} -.btn-file {float: right; padding: 0px 5px !important;} -.fix-border td {border: 0px;} -.fix-position td {vertical-align: middle;} - -#filesName {float: right;} -.nav > li {margin-right: 5px; display: inline-block; margin-top: 5px;} - -#steps .step-id {text-align: center; vertical-align: middle;} -#steps .step-item-id {background-color: transparent; border: none; display: none; width: 40px; padding-left: 0; padding-right: 0; text-align: right; padding-right: 8px;} -#steps .checkbox-inline input[type="checkbox"] {top: -2px;} -#steps .btn-group .btn {padding-left: 0; padding-right: 0; min-width: 30px;} -#steps .step-actions {width: 98px;} -#steps .active td {transition: background-color .5s;} -#steps .step-group .step-steps {resize: none; max-height: 30px;} -#steps .step-group .step-expects {display: none;} -#steps .step-item .step-item-id {display: table-cell;} -#steps .step-item .step-id {color: transparent;} - -.resultSteps .step-id {text-align: right;} -.resultSteps .step-item-id {background-color: transparent; border: none; display: none; width: 30px; padding-left: 0; padding-right: 0; text-align: right; padding-right: 8px;} -.resultSteps .checkbox-inline input[type="checkbox"] {top: -2px;} -.resultSteps .btn-group .btn {padding-left: 0; padding-right: 0; min-width: 30px;} -.resultSteps .step-actions {width: 98px;} -.resultSteps .active td {transition: background-color .5s;} -.resultSteps .step-group .step-steps {resize: none; max-height: 30px;} -.resultSteps .step-group .step-expects {display: none;} -.resultSteps .step-item .step-item-id {display: table-cell;} -.resultSteps .step-item .step-id {color: transparent;} - -.form-condensed textarea[id*='reals'] {height: 35px;} - -.result-item .span-warning{color: #f1a325;} diff --git a/module/testtask/css/unitcases.css b/module/testtask/css/unitcases.css deleted file mode 100644 index 9c9f67389f..0000000000 --- a/module/testtask/css/unitcases.css +++ /dev/null @@ -1,4 +0,0 @@ -th.c-side {width: 260px;} -td.pass {color: green;} -td.fail {color: red;} -#pageNav .btn-group.open ul.dropdown-menu {max-height: 350px; overflow-y: auto;} diff --git a/module/testtask/css/view.css b/module/testtask/css/view.css deleted file mode 100644 index d9fea618c3..0000000000 --- a/module/testtask/css/view.css +++ /dev/null @@ -1 +0,0 @@ -.main-content .main-col .cell, .main-content .side-col .cell {border: 1px solid #f1f1f1;} diff --git a/module/testtask/js/batchrun.js b/module/testtask/js/batchrun.js deleted file mode 100644 index 21e696936c..0000000000 --- a/module/testtask/js/batchrun.js +++ /dev/null @@ -1,21 +0,0 @@ -$(function() -{ - if(from == 'testcase') - { - $("#navbar li[data-id='testtask']").toggleClass('active'); - $("#navbar li[data-id='testcase']").toggleClass('active'); - } -}); - -$(document).on('keyup', 'form input:text', function() -{ - var preSelect = $(this).parent().prev().find('select'); - if($(this).val() == '' && $(preSelect).val() == 'fail') - { - $(preSelect).val('pass'); - } - else if($(this).val() != '' && $(preSelect).val() == 'pass') - { - $(preSelect).val('fail'); - } -}) diff --git a/module/testtask/js/browse.js b/module/testtask/js/browse.js deleted file mode 100644 index 79cd7db965..0000000000 --- a/module/testtask/js/browse.js +++ /dev/null @@ -1,25 +0,0 @@ -function changeDate(begin, end, condition) -{ - if(begin.indexOf('-') != -1) - { - var beginarray = begin.split("-"); - var begin = ''; - for(i=0 ; i < beginarray.length ; i++) - { - begin = begin + beginarray[i]; - } - } - if(end.indexOf('-') != -1) - { - var endarray = end.split("-"); - var end = ''; - for(i=0 ; i < endarray.length ; i++) - { - end = end + endarray[i]; - } - } - - condition = condition + '&beginTime=' + begin + '&endTime=' + end; - link = createLink('testtask', 'browse', condition); - location.href=link; -} diff --git a/module/testtask/js/cases.js b/module/testtask/js/cases.js deleted file mode 100644 index 5666bc15c0..0000000000 --- a/module/testtask/js/cases.js +++ /dev/null @@ -1,5 +0,0 @@ -$(document).ready(function() -{ - if(browseType == 'bysearch') $.toggleQueryBox(true); - if($('#caseList thead th.w-title').width() < 150) $('#caseList thead th.w-title').width(150); -}); diff --git a/module/testtask/js/create.js b/module/testtask/js/create.js deleted file mode 100755 index 80909db538..0000000000 --- a/module/testtask/js/create.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Load execution related builds - * - * @access public - * @return void - */ -function loadProductRelated() -{ - loadExecutions($('#product').val()); - loadTestReports($('#product').val()); - loadExecutionBuilds($('#execution').val()) -} - -/** - * Load executions. - * - * @param int productID - * @access public - * @return void - */ -function loadExecutions(productID) -{ - var executionID = $('#execution').val(); - link = createLink('product', 'ajaxGetExecutions', 'productID=' + productID + '&projectID=' + projectID + '&branch='); - $.get(link, function(data) - { - if(!data) data = ''; - $('#execution').replaceWith(data); - $('#execution_chosen').remove(); - $("#execution").val(executionID); - $("#execution").chosen(); - }); -} - -/* If the mouse hover over the manage contacts button, give tip. */ -$(function() -{ - adjustPriBoxWidth(); - if($('#execution').val() != 0 && multiple) loadExecutionBuilds($('#execution').val()); -}); diff --git a/module/testtask/js/edit.js b/module/testtask/js/edit.js deleted file mode 100755 index 2e8300669a..0000000000 --- a/module/testtask/js/edit.js +++ /dev/null @@ -1,5 +0,0 @@ -$(function() -{ - adjustPriBoxWidth(); - if(config.onlybody) $('#ownerAndPriBox .picker-selection').css('width', '123px'); -}) diff --git a/module/testtask/js/groupcase.js b/module/testtask/js/groupcase.js deleted file mode 100644 index 8157df3154..0000000000 --- a/module/testtask/js/groupcase.js +++ /dev/null @@ -1,4 +0,0 @@ -$(document).ready(function() -{ - $('#' + browseType + 'Tab').addClass('active'); -}); diff --git a/module/testtask/js/linkcase.js b/module/testtask/js/linkcase.js deleted file mode 100644 index 3190f8ec60..0000000000 --- a/module/testtask/js/linkcase.js +++ /dev/null @@ -1,20 +0,0 @@ -$(function() -{ - adjustTableFooter(); -}); - -/** - * Adjust the table footer style. - * - * @access public - * @return void - */ -function adjustTableFooter() -{ - if($('#mainContent').height() < $(window).height()) - { - $('.table').removeClass('with-footer-fixed'); - $('.table-footer').removeClass('fixed-footer'); - $('.table-footer').css({'left': 0, 'bottom': 0, 'width': 'unset'}); - } -} diff --git a/module/testtask/js/report.js b/module/testtask/js/report.js deleted file mode 100644 index 9273a6df57..0000000000 --- a/module/testtask/js/report.js +++ /dev/null @@ -1,19 +0,0 @@ -$(function() -{ - var resizeChartTable = function() - { - $('.table-wrapper').each(function() - { - var $this = $(this); - $this.css('max-height', $this.closest('.table').find('.chart-wrapper').outerHeight()); - }); - }; - resizeChartTable(); - $(window).resize(resizeChartTable); -}); - -function changeChartType(type) -{ - $('form').attr('action', createLink('testtask', 'report', 'productID=' + productID + '&taskID=' + taskID + '&browseType=' + browseType + '&branchID=' + branchID + '&moduleID=' + moduleID + '&chartType=' + type)); - $('form').find('#submit').click(); -} diff --git a/module/testtask/js/results.js b/module/testtask/js/results.js deleted file mode 100644 index dcae57dc37..0000000000 --- a/module/testtask/js/results.js +++ /dev/null @@ -1,71 +0,0 @@ -$(function() -{ - $('.result-item').click(function() - { - var $this = $(this); - if($this.data('status') == 'running') - { - return; - } - $this.toggleClass('show-detail'); - var show = $this.hasClass('show-detail'); - $this.next('.result-detail').toggleClass('hide', !show); - $this.find('.collapse-handle').toggleClass('icon-angle-down', !show).toggleClass('icon-angle-top', show);; - }); - - $(".step-group input[type='checkbox']").click(function() - { - var $next = $(this).closest('tr').next(); - while($next.length && $next.hasClass('step-item')) - { - var isChecked = $(this).prop('checked'); - $next.find("input[type='checkbox']").prop('checked', isChecked); - $next = $next.next(); - } - }); - - $('#casesResults table caption .result-tip').html($('#resultTip').html()); - if($('tr:first').length == 0) return false; - - if($('tr:first').data('status') == 'ready') - { - $('tr:first').click(); - } - else - { - var times = 0; - var id = $('tr:first').data('id') - var link = createLink('testtask', 'ajaxGetResult', 'resultID=' + id); - - var resultInterval = setInterval(() => { - times++; - if(times > 600) - { - clearInterval(resultInterval); - } - - $.get(link, function(task) - { - task = JSON.parse(task); - task = task.data; - if(task.ZTFResult != '') - { - clearInterval(resultInterval); - window.location.reload(); - } - }); - }, 1000); - } - - $('#casesResults').click(function(event) - { - if(event.target.id.indexOf('checkAll') !== -1) - { - var checkAll = document.getElementById(event.target.id); - var checkAll = $(checkAll); - var isChecked = checkAll.prop('checked'); - - checkAll.closest('tbody').children('tr').find('input[type=checkbox]').prop('checked', isChecked); - } - }); -}); diff --git a/module/testtask/js/runcase.js b/module/testtask/js/runcase.js deleted file mode 100644 index cc95dd5e4f..0000000000 --- a/module/testtask/js/runcase.js +++ /dev/null @@ -1,130 +0,0 @@ -custom = false; -$(document).on('keyup', 'form textarea', function() -{ - var preSelect = $(this).closest('table').parent().prev().find('select'); - if($(this).val() == '' && $(preSelect).val() == 'fail' && !custom) - { - $(preSelect).val('pass'); - } - else if($(this).val() != '' && $(preSelect).val() == 'pass' && !custom) - { - $(preSelect).val('fail').parent().addClass('has-error'); - setTimeout(function(){$(preSelect).parent().removeClass('has-error');},'1000'); - } -}) - -function checkStepValue(result) -{ - if(result == 'pass') custom = true; -} - -/* Delete a file. */ -function deleteFile(fileID) -{ - if(!fileID) return; - hiddenwin.location.href =createLink('file', 'delete', 'fileID=' + fileID); -} - -/* Download a file, append the mouse to the link. Thus we call decide to open the file in browser no download it. */ -function downloadFile(fileID, extension, imageWidth) -{ - if(!fileID) return; - var url = createLink('file', 'download', 'fileID=' + fileID + '&mouse=left'); - url += url.indexOf('?') >= 0 ? '&' : '?'; - url += sessionString; - window.open(url, '_blank'); - return false; -} - -/* Load files name when upload files. */ -function loadFilesName() -{ - $('#filesName').find('li').remove();//Remove file name in li label before uploading files every time. - $('.fileBox').each(function() - { - fileName = $(this).find('input[type="file"]').val(); - if(fileName.lastIndexOf('\\')) fileName = fileName.substring(fileName.lastIndexOf('\\') + 1);//Process the file name. - labelName = $(this).find('input[type="text"]').val(); - if(labelName) fileName = labelName;//If label name exits, set label name as file name. - - if(fileName) $('#filesName').append("
  • " + fileName + '
  • ');//Show file name. - }) -} - -$(document).ready(function() -{ - // First unbind ajaxForm for form. - $("#dataform").unbind('submit'); - - // Bind ajaxForm for form again. - $('#dataform').ajaxForm( - { - finish:function(response) - { - if(response.locate) - { - if(response.locate == 'reload' && response.target == 'parent') - { - parent.$.cookie('selfClose', 1); - parent.$.closeModal(null, 'this'); - } - else if(response.next) - { - location.href = response.locate; - } - else - { - // Get cases result - $('#resultsContainer').load(response.locate + " #casesResults", function() - { - $('tr:first').addClass("show-detail"); - $('#tr-detail_1').removeClass("hide"); - - $('.result-item').click(function() - { - var $this = $(this); - $this.toggleClass('show-detail'); - var show = $this.hasClass('show-detail'); - $this.next('.result-detail').toggleClass('hide', !show); - $this.find('.collapse-handle').toggleClass('icon-chevron-down', !show).toggleClass('icon-chevron-up', show); - }); - - $('#casesResults table caption .result-tip').html($('#resultTip').html()); - - $("#submit").text(caseResultSave); - $("#submit").attr({"disabled":"disabled"}); - }); - } - - if(typeof(window.parent.runCase) != 'undefined') window.parent.runCase = true; - } - - return false; - } - }); - - window.parent.triggerHidden(); - - $(document).on('click', ".step-group input[type='checkbox']", function() - { - var $next = $(this).closest('tr').next(); - while($next.length && $next.hasClass('step-item')) - { - var isChecked = $(this).prop('checked'); - $next.find("input[type='checkbox']").prop('checked', isChecked); - $next = $next.next(); - } - }); - - $('#resultsContainer').click(function(event) - { - if(event.target.id.indexOf('checkAll') !== -1) - { - var checkAll = document.getElementById(event.target.id); - var checkAll = $(checkAll); - var isChecked = checkAll.prop('checked'); - - checkAll.closest('tbody').children('tr').find('input[type=checkbox]').prop('checked', isChecked); - } - }); -}); diff --git a/module/testtask/js/view.js b/module/testtask/js/view.js deleted file mode 100644 index 58f8c49c97..0000000000 --- a/module/testtask/js/view.js +++ /dev/null @@ -1,16 +0,0 @@ -$(function() -{ - $('.loadAjax').each(function() - { - var $this = $(this); - $this.load($this.data('url'), function() - { - $('#caseList').tablesorter( - { - saveSort: true, - widgets: ['zebra', 'saveSort'], - widgetZebra: {css: ['odd', 'even'] } - }).find('a.iframe').modalTrigger(); - }); - }); -}); diff --git a/module/todo/css/assignto.css b/module/todo/css/assignto.css deleted file mode 100644 index 85f4742d06..0000000000 --- a/module/todo/css/assignto.css +++ /dev/null @@ -1,3 +0,0 @@ -#end_chosen .chosen-single {border-left: none;} -#begin_chosen .chosen-results, #end_chosen .chosen-results {max-height: 150px;} -#todoAssignForm {margin-bottom: 20px;} \ No newline at end of file diff --git a/module/todo/css/batchcreate.css b/module/todo/css/batchcreate.css deleted file mode 100755 index ca1968b83e..0000000000 --- a/module/todo/css/batchcreate.css +++ /dev/null @@ -1,29 +0,0 @@ -#todoBatchAddHeader {padding-bottom: 12px;} -#todoBatchAddHeader .input-group {width: 230px; position: relative; top: -3px; left: 15px;} -#todoBatchAddForm .col-id {width: 50px; text-align: center; color: #838A9D;} -#todoBatchAddForm .col-type {width: 120px;} -#todoBatchAddForm .col-pri {width: 90px;} -html[lang="en"] #todoBatchAddForm .col-pri {width: 105px;} -#todoBatchAddForm .col-date {width: 180px;} -#todoBatchAddForm .col-pending {width: 70px;} -#todoBatchAddForm .col-assignedTo {width: 120px;} -#todoBatchAddForm .col-name {width: auto;} -#todoBatchAddForm .col-future {width: 90px;} -#todoBatchAddForm .col-future #select-all {overflow: visible;} -html[lang="en"] #todoBatchAddForm .col-pending {width: 90px;} -#todoBatchAddForm .chosen-container-single .chosen-single {border-radius: 0;} -#todoBatchAddForm .control-time-begin + .chosen-container-single .chosen-single {border-radius: 2px 0 0 2px; border-right-width: 0; padding-right: 1px;} -#todoBatchAddForm .control-time-begin + .chosen-container-active .chosen-single {border-right-width: 1px; padding-right: 0;} -#todoBatchAddHeader [name="date"]:disabled {color: #ccc; text-decoration: line-through;} -#mainContent .main-header > .input-group {width: 240px;} -html[lang="en"] #mainContent .main-header > .input-group, html[lang="de"] #mainContent .main-header > .input-group {width: 250px;} - -#formSettingBtn {position: absolute; top: 14px; right: 20px; z-index: 1000;} -#formSettingBtn .dropdown {margin-right: 0px;} -#formSettingBtn #formSetting {padding: 10px 12px;} -#formSettingBtn .checkboxes {padding: 10px 3px;} -#formSettingBtn .checkbox-primary {width: 50%; float: left; margin: 3px 0;} -#formSetting .btn {margin-right: 8px;} -[lang^='fr'] #formSetting {width: 345px !important;} -[lang^='de'] #formSetting {width: 380px !important;} -.visible {overflow: visible !important;} diff --git a/module/todo/css/batchedit.css b/module/todo/css/batchedit.css deleted file mode 100644 index 34d98f66cb..0000000000 --- a/module/todo/css/batchedit.css +++ /dev/null @@ -1,10 +0,0 @@ -.input-group > .form-control:first-child {border-right: 0;} - -div[id*="ends"] .chosen-single {border-left: none;} - -.c-id {width: 40px;} -.c-pri, .c-date {width: 100px;} -.c-status, .c-assignedTo {width: 120px;} -.c-beginAndEnd{width: 300px;} -.c-assignedTo {padding-left: 0px !important;} -.visible {overflow: visible;} diff --git a/module/todo/css/create.css b/module/todo/css/create.css deleted file mode 100644 index 1c096596a5..0000000000 --- a/module/todo/css/create.css +++ /dev/null @@ -1,11 +0,0 @@ -#begin_chosen {width: 50% !important;} -.switchDate {border-left: none;} -#end_chosen .chosen-single {border-left: none;} -.cycleConfig .checkbox-primary {float: left; width: 100px;} -.cycleConfig .tab-pane {padding: 8px 0px;} -.cycleConfig .tab-pane .input-group {width: 380px;} -.nameBox {display: grid;} -.pri-selector > .btn {padding: 5px 12px;} -#assignedTo_chosen.chosen-container .chosen-results {max-height: 180px;} -.inputGroupWidth {padding-top: 5px;} -.nameBox + span {border-radius: 0px;} diff --git a/module/todo/css/edit.css b/module/todo/css/edit.css deleted file mode 100644 index cd803cffb1..0000000000 --- a/module/todo/css/edit.css +++ /dev/null @@ -1,11 +0,0 @@ -.todoType {margin-top: 6px;} -.dateSwitcher {margin-top: 6px;} -.form-horizontal .required::after {right: -10px;} -.tab-content .tab-pane .input-group {padding: 5px 0px; width: 380px;} -.nameBox {display: grid;} -.chosen-container-single .chosen-single {height: 34px;} -#begin_chosen .chosen-single {border-right-width: 0px;} -.beginBox {padding-right: 0px;} -.endBox {padding-left: 0px;} -.beforeDaysBox {width: 250px; padding-top: 5px;} -.nameBox + span {border-radius: 0px;} diff --git a/module/todo/js/batchcreate.js b/module/todo/js/batchcreate.js deleted file mode 100644 index 23326e1719..0000000000 --- a/module/todo/js/batchcreate.js +++ /dev/null @@ -1,36 +0,0 @@ -function updateAction(date) -{ - if(date.indexOf('-') != -1) - { - var dateArray = date.split('-'); - date = ''; - for(i = 0; i < dateArray.length; i++) - { - date = date + dateArray[i]; - } - } - location.href = createLink('todo', 'batchCreate', 'date=' + date); -} - -$(function() -{ - setBeginsAndEnds(); - $('.main-header #date').change(function() - { - $('#todoBatchAddForm #date').val($(this).val()); - }); - $('.main-header #switchDate').change(function() - { - var value = $(this).prop('checked') ? 'on' : ''; - $('#todoBatchAddForm #switchDate').val(value); - }); - $('.main-header #date').change(); - parent.$('#triggerModal .modal-content .modal-header .close').hide(); - - $("#select-all").on('click', function() - { - var isChecked = $("#select-all").hasClass('checked'); - $("select[name^=begins]").attr("disabled", isChecked ? false : true).trigger('chosen:updated'); - $("select[name^=ends]").attr("disabled", isChecked ? false : true).trigger('chosen:updated'); - }); -}); diff --git a/module/todo/js/create.js b/module/todo/js/create.js deleted file mode 100644 index 5a8f3044ad..0000000000 --- a/module/todo/js/create.js +++ /dev/null @@ -1,41 +0,0 @@ -$(function() -{ - selectNext(); - $('#date').change(function() - { - var selectTime = $(this).val() != today ? start : nowTime; - $('#begin').val(selectTime); - $('#begin').trigger("chosen:updated"); - selectNext(); - }) - - $('#cycle').change(function() - { - if($(this).prop('checked')) - { - $('.cycleConfig').removeClass('hidden'); - $('#switchDate').closest('.input-group-addon').addClass('hidden'); - $('#type').closest('tr').addClass('hidden'); - $('#type').val('custom'); - loadList('custom'); //Fix bug 3278. - } - else - { - $('.cycleConfig').addClass('hidden'); - $('#switchDate').closest('.input-group-addon').removeClass('hidden'); - $('#type').closest('tr').removeClass('hidden'); - } - }); - $('ul.nav-tabs a').click(function() - { - if($(this).data('type'))$('input[id*=type][id*=config]').val($(this).data('type')); - }); - - $('#pri').on('change', function() - { - var $select = $(this); - var $selector = $select.closest('.pri-selector'); - var value = $select.val(); - $selector.find('.pri-text').html('' + value + ''); - }); -}) diff --git a/module/todo/js/edit.js b/module/todo/js/edit.js deleted file mode 100644 index bfdba4bcd1..0000000000 --- a/module/todo/js/edit.js +++ /dev/null @@ -1,31 +0,0 @@ -$(function() -{ - loadList($('#type').val(), '', defaultType, objectID); - - $('#pri').on('change', function() - { - var $select = $(this); - var $selector = $select.closest('.pri-selector'); - var value = $select.val(); - $selector.find('.pri-text').html('' + value + ''); - }); - - alignWidth(); - - $(window).resize(function() - { - alignWidth(); - }); -}); - -/** - * Align with the date width. - * - * @access public - * @return void - */ -function alignWidth() -{ - var dateWidth = $('#date').parent().width(); - $('.dateWidth').width(dateWidth); -} diff --git a/module/todo/js/view.js b/module/todo/js/view.js deleted file mode 100644 index b0d2614cfc..0000000000 --- a/module/todo/js/view.js +++ /dev/null @@ -1,169 +0,0 @@ -$(function() -{ - if(config.onlybody == 'yes') $('.main-actions').css('width', '100%'); - - $('#toStoryLink').click(function() - { - $('#productModal .modal-body .input-group .input-group-btn').addClass('hidden'); - $('#productModal #toStoryButton').closest('.input-group-btn').removeClass('hidden'); - }) - - $('#toBugLink').click(function() - { - $('#productModal .modal-body .input-group .input-group-btn').addClass('hidden'); - $('#productModal #toBugButton').closest('.input-group-btn').removeClass('hidden'); - }) - - $('#toTaskButton').click(function() - { - var executionID = $('#execution').val(); - if(!executionID) - { - alert(selectExecution); - return false; - } - var onlybody = config.onlybody == 'yes'; - var link = createLink('task', 'create', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=0&todoID=' + todoID, config.defaultView, onlybody); - - if(!onlybody) window.parent.$.apps.open(link, 'execution'); - if(onlybody) location.href = link; - }) - - $('#toStoryButton').click(function() - { - var onlybody = config.onlybody == 'yes'; - var productID = $('#product').val(); - var link = createLink('story', 'create', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&projectID=0&bugID=0&planID=0&todoID=' + todoID, config.defaultView, onlybody); - - if(!onlybody) window.parent.$.apps.open(link, 'product'); - if(onlybody) location.href = link; - }) - - $('#toBugButton').click(function() - { - var onlybody = config.onlybody == 'yes'; - var productID = $('#bugProduct').val(); - if(!productID) - { - alert(selectProduct); - return false; - } - - var link = createLink('bug', 'create', 'productID=' + productID + '&branch=0&extras=todoID=' + todoID, config.defaultView, onlybody); - if(!onlybody) window.parent.$.apps.open(link, 'qa'); - if(onlybody) location.href = link; - }) - - $('#project, #product').change(); -}); - -/** - * Link to create product. - * - * @access public - * @return void - */ -function createProduct() -{ - var onlybody = config.onlybody; - config.onlybody = 'no'; - - var link = createLink('product', 'create'); - - config.onlybody = onlybody; - window.parent.$.apps.open(link, 'product'); -} - -/** - * Link to create project. - * - * @access public - * @return void - */ -function createProject() -{ - var onlybody = config.onlybody; - config.onlybody = 'no'; - - var link = createLink('project', 'create'); - - config.onlybody = onlybody; - window.parent.$.apps.open(link, 'project'); -} - -/** - * Create execution. - * - * @access public - * @return void - */ -function createExecution() -{ - var onlybody = config.onlybody; - config.onlybody = 'no'; - - var link = createLink('execution', 'create'); - - config.onlybody = onlybody; - window.parent.$.apps.open(link, 'execution'); -} - -/** - * Get executions by project id. - * - * @param int $projectID - * @access public - * @return void - */ -function getExecutionByProject(projectID) -{ - link = createLink('todo', 'ajaxGetExecutionPairs', "projectID=" + projectID); - $('#executionIdBox').load(link, function() - { - $(this).find('select').chosen(); - }) -} - -/** - * Get products by project id. - * - * @param int $projectID - * @access public - * @return void - */ -function getProductByProject(projectID) -{ - link = createLink('todo', 'ajaxGetProductPairs', "projectID=" + projectID); - $('#productIdBox').load(link, function() - { - $(this).find('select').chosen(); - }) -} - -/** - * Get programs by product id. - * - * @param int $productID - * @access public - * @return void - */ -function getProgramByProduct(productID) -{ - link = createLink('todo', 'ajaxGetProgramID', "productID=" + productID + '&type=product'); - $.post(link, function(data) - { - $('#productProgram').val(data); - }) -} - -/** - * Toggle show execution. - * - * @param bool $multiple - * @access public - * @return void - */ -function toggleExecution(multiple) -{ - $('#executionIdBox').closest('tr').toggleClass('hidden', !multiple); -} diff --git a/module/tree/js/browse.js b/module/tree/js/browse.js deleted file mode 100644 index e3bbe5df8a..0000000000 --- a/module/tree/js/browse.js +++ /dev/null @@ -1,81 +0,0 @@ -function syncModule(rootID, type) -{ - moduleID = type == 'task' ? $('#projectModule').val() : $('#productModule').val(); - type = type == 'task' ? 'task' : 'story'; - - link = createLink('tree', 'ajaxGetSonModules', 'moduleID=' + moduleID + '&rootID=' + rootID + '&type=' + type); - $.getJSON(link, function(modules) - { - if(modules.length == 0) - { - alert(noSubmodule); - return false; - } - - $('.helplink').addClass('hidden'); - var $inputgroup = $('
    ').append($('.col-actions .icon-close:first').closest('.table-row').clone()).html(); - - $.each(modules, function(key, module) - { - $('#sonModule > .table-row').each(function() - { - moduleName = $(this).find('input[id^=modules]').val(); - if(moduleName == module.name) modules[key] = null; - if(!moduleName) $(this).closest('#sonModule > .table-row').not('.copy').remove(); - }) - }); - - $.each(modules, function(key, module) - { - if(module) - { - /* Duplicate removal for mdoule name. */ - var unique = true; - $('#sonModule > .table-row').not('.copy').each(function() - { - if($(this).find('.table-col:first').find(':input').val() == module.name) unique = false; - }) - - if(unique) - { - $('#sonModule').append($inputgroup); - $('#sonModule .table-row:last input[id^=modules]').val(module.name); - $('#sonModule .table-row:last input[id^=shorts]').val(module.short); - } - } - }) - $('#sonModule').append($inputgroup); - }) -} - -function syncProductOrProject(obj, type) -{ - if(type == 'product') viewType = 'story'; - if(type == 'project') viewType = 'task'; - link = createLink('tree', 'ajaxGetOptionMenu', 'rootID=' + obj.value + "&viewType=" + viewType + "&branch=all&rootModuleID=0&returnType=json"); - $.getJSON(link, function(modules) - { - $('.helplink').addClass('hidden'); - $('#' + type + 'Module').empty(); - $.each(modules, function(key, value) - { - $('#' + type + 'Module').append('') - } - } - else - { - $('#osNamePhysics').empty(); - for(var i in windowsList) - { - console.log(windowsList[i]) - $('#osNamePhysics').append('') - } - } - $('#osNamePhysics').trigger('chosen:updated'); - }) -}) \ No newline at end of file diff --git a/module/zanode/js/view.js b/module/zanode/js/view.js deleted file mode 100644 index 7a8a48a5f9..0000000000 --- a/module/zanode/js/view.js +++ /dev/null @@ -1,243 +0,0 @@ -var checkInterval; -var intervalTimes = 0; - -$('#checkServiceStatus').click(function(){ - $('#serviceContent').addClass('loading'); - checkServiceStatus(); -}) - -function checkServiceStatus(){ - $.get(createLink('zanode', 'ajaxGetServiceStatus', 'nodeID=' + nodeID), function(response) - { - var resultData = JSON.parse(response); - var isSuccess = true - - for (var key in resultData.data) - { - if(key == "ZTF") - { - if(resultData.data[key] == 'ready') - { - $('.dot-ztf').removeClass("text-danger") - $('.dot-ztf').addClass("text-success") - } - else{ - $('.dot-ztf').removeClass("text-success") - $('.dot-ztf').addClass("text-danger") - } - - if(resultData.data[key] == 'ready' || resultData.data[key] == 'not_available') - { - $('.ztf-status').text(zanodeLang.init[resultData.data[key]]) - $('.ztf-install').text(''); - $('.ztf-install-icon').hide(); - } - else - { - if(resultData.data[key] == 'unknown') - { - if(hostType == 'physics') - { - $('.ztf-status').text(zanodeLang.init.not_install) - } - else - { - $('.ztf-status').text(zanodeLang.init.unknown) - } - } - else - { - $('.ztf-status').text(zanodeLang.initializing) - } - $('.ztf-install').text(zanodeLang.install); - } - } - else if(key == "node") - { - if(resultData.data[key] && zanodeLang.statusList[nodeStatus] != zanodeLang.statusList[resultData.data[key]]) - { - window.location.reload(); - } - } - else - { - if(resultData.data[key] == 'ready') - { - $('.dot-zenagent').removeClass("text-danger") - $('.dot-zenagent').addClass("text-success") - } - else{ - $('.dot-zenagent').removeClass("text-success") - $('.dot-zenagent').addClass("text-danger") - } - $('.zenagent-status').text(zanodeLang.init[resultData.data[key]]) - if(resultData.data[key] == 'ready') - { - $('.node-init-install').show(); - } - else - { - if(resultData.data[key] == 'unknown') - { - $('.ztf-zenagent').text(zanodeLang.init.unknown) - } - else - { - $('.zenagent-status').text(zanodeLang.initializing) - } - } - } - if(resultData.data[key] !== 'ready' && key != 'node') - { - isSuccess = false - } - }; - - if(!isSuccess) - { - $('.init-fail').show(); - $('.init-success').hide(); - } - else - { - clearInterval(checkInterval) - $('.init-success').show(); - $('.init-fail').hide(); - } - setTimeout(function() { - $('#serviceContent').removeClass('loading'); - $(".service-status, .status-notice").show() - }, 500); - }); - return -} - -$('.node-init-install').on('click', function(){ - $(this).addClass('load-indicator loading'); - var link = $(this).data('href') - var that = this - $.get(link, function(response) - { - $(that).removeClass('load-indicator'); - $(that).removeClass('loading'); - $('#checkServiceStatus').trigger("click") - }) -}) - -$('.btn-ssh-copy').live('click', function() -{ - var copyText = $('#ssh-copy'); - copyText.show(); - copyText .select(); - document.execCommand("Copy"); - copyText.hide(); - $('.btn-ssh-copy').tooltip({ - trigger: 'click', - placement: 'bottom', - title: zanodeLang.copied, - tipClass: 'tooltip-success' - }); - - $(this).tooltip('show'); - var that = this; - setTimeout(function() - { - $(that).tooltip('hide') - }, 2000) -}) - -$('.btn-pwd-copy').live('click', function() -{ - var copyText = $('#pwd-copy'); - copyText.show(); - copyText .select(); - document.execCommand("Copy"); - copyText.hide(); - $('.btn-pwd-copy').tooltip({ - trigger: 'click', - placement: 'bottom', - title: zanodeLang.copied, - tipClass: 'tooltip-success' - }); - - $(this).tooltip('show'); - var that = this; - setTimeout(function() - { - $(that).tooltip('hide') - }, 2000) -}) - -$('.btn-init-copy').live('click', function() -{ - var copyText = $('#initBash'); - copyText.show(); - copyText .select(); - document.execCommand("Copy"); - copyText.hide(); - $('.btn-init-copy').tooltip({ - trigger: 'click', - placement: 'top', - title: zanodeLang.copied, - tipClass: 'tooltip-success' - }); - - $(this).tooltip('show'); - var that = this; - setTimeout(function() - { - $(that).tooltip('hide') - }, 2000) -}) - -$('.btn-pwd-show').live('click', function() -{ - var pwd = $('#pwd-copy').text(); - var pwdStar = "******".padEnd(pwd.length, '*') - var html = $(this).html() - if(html.indexOf('icon-eye-off') != -1) - { - $('#pwd-text').text(pwdStar) - $(this).html("") - } - else - { - $('#pwd-text').text(pwd) - $(this).html("") - } -}) - -$('#jumpManual').click(function() -{ - var encodedHelpPageUrl = encodeURIComponent('https://www.zentao.net/book/zentaopms/974.html?fullScreen=zentao'); - var urlForNewTab = webRoot + '#app=help&url=' + encodedHelpPageUrl; - window.open(urlForNewTab) -}) - - -$(function(){ - $('#checkServiceStatus').trigger("click") - if(hostType == 'physics'){ - return; - } - checkInterval = setInterval(() => { - intervalTimes++; - if(intervalTimes > 200) - { - clearInterval(checkInterval) - } - checkServiceStatus(); - }, 3000); -}) - -/** - * Edit Snapshot. - * - * @param string $link - * @access public - * @return void - */ -function editSnapshot(link) -{ - $('#editSnapshot').attr('href', link).click(); -}