diff --git a/module/block/css/dashboard.css b/module/block/css/dashboard.css index 9969a13dca..e69de29bb2 100644 --- a/module/block/css/dashboard.css +++ b/module/block/css/dashboard.css @@ -1,67 +0,0 @@ -body {background: #fafafa;} - -.page-content {margin-top: -19px; border-top: 1px solid #3280fc;} - -#wrap .outer {background-color: #fafafa;} -#wrap .outer > .dashboard {margin-left: -10px; margin-right: -10px;} - -/* panel style */ -.panel-block .table th {background-color: #fafafa} -.panel-primary {border-color: transparent;!important;} -.panel-success > .panel-heading, -.panel-warning > .panel-heading, -.panel-primary > .panel-heading, -.panel-info > .panel-heading, -.panel-danger > .panel-heading {color: #333; border: none; border-bottom: 1px solid rgba(0,0,0,.04);} -.panel-success, .panel-success .table-header-fixed th {background: #d1fecb!important; border-color: #b0e4ac!important} -.panel-success > .panel-heading {background: #c5f7c1!important; } -.panel-warning, .panel-warning .table-header-fixed th {background: #fdfdc7!important; border-color: #e1e09a!important} -.panel-warning > .panel-heading {background: #f8f7b6!important;} -.panel-primary, .panel-primary .table-header-fixed th {background: #d8f2fa!important; border-color: #badfeb!important} -.panel-primary > .panel-heading {background: #c9ecf8!important; color: #333!important; border:none!important;} -.panel-info, .panel-info .table-header-fixed th {background: #dcd8fe!important; border-color: #d0c9ee!important} -.panel-info > .panel-heading {background: #d4cdf3!important;} -.panel-danger, .panel-danger .table-header-fixed th {background: #f5d0f5!important; border-color: #e9b9e9!important} -.panel-danger > .panel-heading {background: #f1c3f1!important;} -.panel-success .table td, .panel-success .table th, -.panel-warning .table td, .panel-warning .table th, -.panel-primary .table td, .panel-primary .table th, -.panel-info .table td, .panel-info .table th, -.panel-danger .table td, .panel-danger .table th {border: none; background-color: transparent} -.panel-success .table tr:nth-child(even) > td, .panel-success .table th, -.panel-warning .table tr:nth-child(even) > td, .panel-warning .table th, -.panel-primary .table tr:nth-child(even) > td, .panel-primary .table th, -.panel-info .table tr:nth-child(even) > td, .panel-info .table th, -.panel-danger .table tr:nth-child(even) > td, .panel-danger .table th {background: rgba(255,255,255,.25);} -.panel-success .table tr:nth-child(odd) > td, -.panel-warning .table tr:nth-child(odd) > td, -.panel-primary .table tr:nth-child(odd) > td, -.panel-info .table tr:nth-child(odd) > td, -.panel-danger .table tr:nth-child(odd) > td {background: rgba(0,0,0,.03);} -.panel-success .table tr:last-child > td, -.panel-warning .table tr:last-child > td, -.panel-primary .table tr:last-child > td, -.panel-info .table tr:last-child > td -.panel-danger .table tr:last-child > td {border-bottom: 1px solid rgba(0,0,0,0.05)} -.panel-success .table tr:hover > th, -.panel-warning .table tr:hover > th, -.panel-primary .table tr:hover > th, -.panel-info .table tr:hover > th, -.panel-danger .table tr:hover > th {background: none;} -.panel-success .table.table-hover tr:hover > td, -.panel-warning .table.table-hover tr:hover > td, -.panel-primary .table.table-hover tr:hover > td, -.panel-info .table.table-hover tr:hover > td, -.panel-danger .table.table-hover tr:hover > td {background: rgba(255,255,255,.4);} - -.block.input-group-btn .btn-success {background: #d1fecb; color: #333; text-shadow: none; border-color: #ccc} -.block.input-group-btn .btn-warning {background: #fdfdc7; color: #333; text-shadow: none; border-color: #ccc} -.block.input-group-btn .btn-info {background: #dcd8fe; color: #333; text-shadow: none; border-color: #ccc} -.block.input-group-btn .btn-danger {background: #f5d0f5; color: #333; text-shadow: none; border-color: #ccc} -.block.input-group-btn .btn-primary, .block.input-group-btn .btn-primary:focus {background: #d8f2fa; color: #333; text-shadow: none; border-color: #ccc} -.block.input-group-btn .btn-success:hover {border-color: #aaa} -.block.input-group-btn .btn-warning:hover {border-color: #aaa} -.block.input-group-btn .btn-primary:hover {border-color: #aaa} -.block.input-group-btn .btn-info:hover {border-color: #aaa} -.block.input-group-btn .btn-danger:hover {border-color: #aaa} -.block.input-group-btn .btn-primary .caret, .block.input-group-btn .btn-success .caret, .block.input-group-btn .btn-warning .caret, .block.input-group-btn .btn-danger .caret, .block.input-group-btn .btn-info .caret {border-top-color: #333} diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 5f37ae76b6..411cd05b58 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -167,7 +167,7 @@ $lang->my = new stdclass(); $lang->my->menu = new stdclass(); $lang->my->menu->index = 'Home|my|index'; -$lang->my->menu->todo = array('link' => 'Todo|my|todo|', 'subModule' => 'todo'); +$lang->my->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => 'Task|my|task|', 'subModule' => 'task'); $lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug'); $lang->my->menu->testtask = array('link' => 'Test Task|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase'); diff --git a/module/common/lang/menuOrder.php b/module/common/lang/menuOrder.php index a2561ca4c8..e6edf25c96 100644 --- a/module/common/lang/menuOrder.php +++ b/module/common/lang/menuOrder.php @@ -16,7 +16,7 @@ $lang->index->menuOrder[10] = 'project'; /* my menu order. */ $lang->my->menuOrder[5] = 'account'; $lang->my->menuOrder[10] = 'index'; -$lang->my->menuOrder[15] = 'todo'; +$lang->my->menuOrder[15] = 'calendar'; $lang->my->menuOrder[20] = 'task'; $lang->my->menuOrder[25] = 'bug'; $lang->my->menuOrder[30] = 'testtask'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 4cb1c6b231..77e9daa7fb 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -167,7 +167,7 @@ $lang->my = new stdclass(); $lang->my->menu = new stdclass(); $lang->my->menu->index = '首页|my|index'; -$lang->my->menu->todo = array('link' => '待办|my|todo|', 'subModule' => 'todo'); +$lang->my->menu->calendar = array('link' => '日程|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => '任务|my|task|', 'subModule' => 'task'); $lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug'); $lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase'); diff --git a/module/my/control.php b/module/my/control.php index 5eff4c7b4b..8b7a64744a 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -62,6 +62,11 @@ class my extends control $this->display(); } + public function calendar() + { + $this->locate($this->createLink('my', 'todo')); + } + /** * My todos. * diff --git a/module/my/view/index.html.php b/module/my/view/index.html.php index 04ae954272..ce507842fd 100644 --- a/module/my/view/index.html.php +++ b/module/my/view/index.html.php @@ -10,6 +10,5 @@ */ ?> -version);?> fetch('block', 'dashboard', 'module=my');?> - \ No newline at end of file + diff --git a/www/js/zui/min.js b/www/js/zui/min.js index a8a7259c20..7770dfb3ea 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -4,10937 +4,24 @@ * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2018 cnezsoft.com; Licensed MIT */ - -/* ======================================================================== - * ZUI: jquery.extensions.js - * http://zui.sexy - * ======================================================================== - * Copyright (c) 2014-2016 cnezsoft.com; Licensed MIT - * ======================================================================== */ - - -(function($, window, undefined) { - 'use strict'; - - /* Check jquery */ - if(typeof($) === 'undefined') throw new Error('ZUI requires jQuery'); - - // ZUI shared object - if(!$.zui) $.zui = function(obj) { - if($.isPlainObject(obj)) { - $.extend($.zui, obj); - } - }; - - var MOUSE_BUTTON_CODES = { - all: -1, - left: 0, - middle: 1, - right: 2 - }; - - var lastUuidAmend = 0; - $.zui({ - uuid: function(asNumber) { - var uuidNumber = (new Date()).getTime() * 1000 + (lastUuidAmend++) % 1000; - return asNumber ? uuidNumber : uuidNumber.toString(36); - }, - - callEvent: function(func, event, proxy) { - if($.isFunction(func)) { - if(proxy !== undefined) { - func = $.proxy(func, proxy); - } - var result = func(event); - if(event) event.result = result; - return !(result !== undefined && (!result)); - } - return 1; - }, - - clientLang: function() { - var lang; - var config = window.config; - if(typeof(config) != 'undefined' && config.clientLang) { - lang = config.clientLang; - } - if(!lang) { - var hl = $('html').attr('lang'); - lang = hl ? hl : (navigator.userLanguage || navigator.userLanguage || 'zh_cn'); - } - return lang.replace('-', '_').toLowerCase(); - }, - - strCode: function(str) { - var code = 0; - if(str && str.length) { - for(var i = 0; i < str.length; ++i) { - code += i * str.charCodeAt(i); - } - } - return code; - }, - - getMouseButtonCode: function(mouseButton) { - if(typeof mouseButton !== 'number') { - mouseButton = MOUSE_BUTTON_CODES[mouseButton]; - } - if(mouseButton === undefined || mouseButton === null) mouseButton = -1; - return mouseButton; - } - }); - - $.fn.callEvent = function(name, event, model) { - var $this = $(this); - var dotIndex = name.indexOf('.zui.'); - var shortName = dotIndex < 0 ? name : name.substring(0, dotIndex); - var e = $.Event(shortName, event); - - if((model === undefined) && dotIndex > 0) { - model = $this.data(name.substring(dotIndex + 1)); - } - - if(model && model.options) { - var func = model.options[shortName]; - if($.isFunction(func)) { - e.result = $.zui.callEvent(func, e, model); - } - } - $this.trigger(e); - return e; - }; - - $.fn.callComEvent = function(component, eventName, params) { - if (params !== undefined && !$.isArray(params)) { - params = [params]; - } - var $this = this; - var result = $this.triggerHandler(eventName, params); - - var eventCallback = component.options[eventName]; - if (eventCallback) { - result = eventCallback.apply(component, params); - } - return result; - }; -}(jQuery, window, undefined)); - - -/* ======================================================================== - * ZUI: typography.js - * http://zui.sexy - * ======================================================================== - * Copyright (c) 2014-2016 cnezsoft.com; Licensed MIT - * ======================================================================== */ - - -(function($) { - 'use strict'; - - $.fn.fixOlPd = function(pd) { - pd = pd || 10; - return this.each(function() { - var $ol = $(this); - $ol.css('paddingLeft', Math.ceil(Math.log10($ol.children().length)) * pd + 10); - }); - }; - - $(function() { - $('.ol-pd-fix,.article ol').fixOlPd(); - }); -}(jQuery)); - - -/* ======================================================================== - * Bootstrap: button.js v3.0.3 - * http://getbootstrap.com/javascript/#buttons - * - * ZUI: The file has been changed in ZUI. It will not keep update with the - * Bootsrap version in the future. - * http://zui.sexy - * ======================================================================== - * Copyright 2011-2014 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - * ======================================================================== */ - - -+ function($) { - 'use strict'; - - // BUTTON PUBLIC CLASS DEFINITION - // ============================== - - var Button = function(element, options) { - this.$element = $(element) - this.options = $.extend({}, Button.DEFAULTS, options) - this.isLoading = false - } - - Button.DEFAULTS = { - loadingText: 'loading...' - } - - Button.prototype.setState = function(state) { - var d = 'disabled' - var $el = this.$element - var val = $el.is('input') ? 'val' : 'html' - var data = $el.data() - - state = state + 'Text' - - if(!data.resetText) $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout($.proxy(function() { - if(state == 'loadingText') { - this.isLoading = true - $el.addClass(d).attr(d, d) - } else if(this.isLoading) { - this.isLoading = false - $el.removeClass(d).removeAttr(d) - } - }, this), 0) - } - - Button.prototype.toggle = function() { - var changed = true - var $parent = this.$element.closest('[data-toggle="buttons"]') - - if($parent.length) { - var $input = this.$element.find('input') - if($input.prop('type') == 'radio') { - if($input.prop('checked') && this.$element.hasClass('active')) changed = false - else $parent.find('.active').removeClass('active') - } - if(changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change') - } - - if(changed) this.$element.toggleClass('active') - } - - - // BUTTON PLUGIN DEFINITION - // ======================== - - var old = $.fn.button - - $.fn.button = function(option) { - return this.each(function() { - var $this = $(this) - var data = $this.data('zui.button') - var options = typeof option == 'object' && option - - if(!data) $this.data('zui.button', (data = new Button(this, options))) - - if(option == 'toggle') data.toggle() - else if(option) data.setState(option) - }) - } - - $.fn.button.Constructor = Button - - - // BUTTON NO CONFLICT - // ================== - - $.fn.button.noConflict = function() { - $.fn.button = old - return this - } - - - // BUTTON DATA-API - // =============== - - $(document).on('click.zui.button.data-api', '[data-toggle^=button]', function(e) { - var $btn = $(e.target) - if(!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - e.preventDefault() - }) - -}(jQuery); - - -/* ======================================================================== - * Bootstrap: alert.js v3.0.0 - * http://twbs.github.com/bootstrap/javascript.html#alerts - * ======================================================================== - * Copyright 2013 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ZUI: The file has been changed in ZUI. It will not keep update with the - * Bootsrap version in the future. - * http://zui.sexy - * ======================================================================== */ - - -+ function($) { - 'use strict'; - - // ALERT CLASS DEFINITION - // ====================== - - var dismiss = '[data-dismiss="alert"]' - var zuiname = 'zui.alert'; - - var Alert = function(el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function(e) { - var $this = $(this) - var selector = $this.attr('data-target') - - if(!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 - } - - var $parent = $(selector) - - if(e) e.preventDefault() - - if(!$parent.length) { - $parent = $this.hasClass('alert') ? $this : $this.parent() - } - - $parent.trigger(e = $.Event('close.' + zuiname)) - - if(e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent.trigger('closed.' + zuiname).remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent - .one($.support.transition.end, removeElement) - .emulateTransitionEnd(150) : - removeElement() - } - - - // ALERT PLUGIN DEFINITION - // ======================= - - var old = $.fn.alert - - $.fn.alert = function(option) { - return this.each(function() { - var $this = $(this) - var data = $this.data(zuiname) - - if(!data) $this.data(zuiname, (data = new Alert(this))) - if(typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - // ALERT NO CONFLICT - // ================= - - $.fn.alert.noConflict = function() { - $.fn.alert = old - return this - } - - - // ALERT DATA-API - // ============== - - $(document).on('click.' + zuiname + '.data-api', dismiss, Alert.prototype.close) - -}(window.jQuery); - -/* ======================================================================== - * ZUI: pager.js - * http://zui.sexy - * ======================================================================== - * Copyright (c) 2017-2018 cnezsoft.com; Licensed MIT - * ======================================================================== */ - - -(function($) { - 'use strict'; - - var NAME = 'zui.pager'; // model name - - var DEFAULT_PAGER = { - page: 0, // current page index - recTotal: 0, // records total count - recPerPage: 10, // records count per page - }; - - var LANG = { - zh_cn: { - prev: '上一页', - next: '下一页', - first: '第一页', - last: '最后一页', - goto: '跳转', - pageOf: '第 {page} 页', - totalPage: '共 {totalPage} 页', - totalCount: '共 {recTotal} 项', - pageSize: '每页 {recPerPage} 项', - itemsRange: '第 {start} ~ {end} 项', - pageOfTotal: '第 {page}/{totalPage} 页' - }, - zh_tw: { - prev: '上一頁', - next: '下一頁', - first: '第一頁', - last: '最後一頁', - goto: '跳轉', - pageOf: '第 {page} 頁', - totalPage: '共 {totalPage} 頁', - totalCount: '共 {recTotal} 項', - pageSize: '每頁 {recPerPage} 項', - itemsRange: '第 {start} ~ {end} 項', - pageOfTotal: '第 {page}/{totalPage} 頁' - }, - en: { - prev: 'Prev', - next: 'Next', - first: 'First', - last: 'Last', - goto: 'Goto', - pageOf: 'Page {page}', - totalPage: '{totalPage} pages', - totalCount: '{recTotal} items', - pageSize: '{recPerPage} items per page', - itemsRange: 'From {start} to {end}', - pageOfTotal: 'Page {page} of {totalPage}' - } - }; - - // The pager model class - var Pager = function(element, options) { - var that = this; - that.name = NAME; - that.$ = $(element); - - options = that.options = $.extend({}, Pager.DEFAULTS, this.$.data(), options); - - var lang = options.lang || 'zh_cn'; - that.lang = $.isPlainObject(lang) ? ($.extend(true, {}, LANG[lang.lang || $.zui.clientLang()], lang)) : LANG[lang]; - - that.state = {}; - - that.set(options.page, options.recTotal, options.recPerPage); - - that.$.on('click', '.pager-goto-btn', function() { - var $goto = $(this).closest('.pager-goto'); - var page = parseInt($goto.find('.pager-goto-input').val()); - if (page !== NaN) { - that.set(page); - } - }).on('click', '.pager-item', function() { - var page = $(this).data('page'); - if (typeof page === 'number' && page > 0) { - that.set(page); - } - }).on('click', '.pager-size-menu [data-size]', function() { - var size = $(this).data('size'); - if (typeof size === 'number' && size > 0) { - that.set(-1, -1, size); - } - }); - }; - - Pager.prototype.set = function(page, recTotal, recPerPage) { - var that = this; - if (typeof page === 'object' && page !== null) { - recPerPage = page.recPerPage; - recTotal = page.recTotal; - page = page.page; - } - var state = that.state; - if (!state) { - state = $.extend({}, DEFAULT_PAGER); - } - var oldState = $.extend({}, state); - if (typeof recPerPage === 'number' && recPerPage > 0) { - state.recPerPage = recPerPage; - } - if (typeof recTotal === 'number' && recTotal >= 0) { - state.recTotal = recTotal; - } - if (typeof page === 'number' && page >= 0) { - state.page = page; - } - state.totalPage = (state.recTotal && state.recPerPage) ? (Math.ceil(state.recTotal / state.recPerPage)) : 1; - state.page = Math.max(0, Math.min(state.page, state.totalPage)); - // stateRecCount is items count in current page - state.pageRecCount = state.recTotal; - if (state.page && state.recTotal) { - if (state.page < state.totalPage) { - state.pageRecCount = state.recPerPage; - } else if (state.page > 1) { - state.pageRecCount = state.recTotal - (state.recPerPage * (state.page - 1)); - } - } - state.skip = state.page > 1 ? ((state.page - 1) * state.recPerPage) : 0; - state.start = state.skip + 1; - state.end = state.skip + state.pageRecCount; - state.prev = state.page > 1 ? (state.page - 1) : 0; - state.next = state.page < state.totalPage ? (state.page + 1) : 0; - that.state = state; - if (oldState.page !== state.page || oldState.recTotal !== state.recTotal || oldState.recPerPage !== state.recPerPage) { - that.$.callComEvent(that, 'onPageChange', [state, oldState]); - } - return that.render(); - }; - - Pager.prototype.createLinkItem = function(page, text, asAElement) { - var that = this; - if (text === undefined) { - text = page; - } - var $ele = $('').attr('href', page ? that.createLink(page, that.state) : '###').html(text); - if (!asAElement) { - $ele = $('
').append($ele).toggleClass('active', page === that.state.page).toggleClass('disabled', !page); - } - return $ele; - }; - - Pager.prototype.createNavItems = function(maxCount) { - var that = this; - var $nav = that.$; - var pager = that.state; - var totalPage = pager.totalPage; - var page = pager.page; - var appendItem = function(p, to) { - if(p === false) { - $nav.append(that.createLinkItem(0, to || '')); - return; - } - if(to === undefined) to = p; - for(var i = p; i <= to; ++i) { - $nav.append(that.createLinkItem(i)); - } - }; - if (maxCount === undefined) { - maxCount = that.options.maxNavCount || 10; - } - appendItem(1); - if(totalPage > 1) { - if(totalPage <= maxCount) { - appendItem(2, totalPage); - } - else if(page < (maxCount - 2)) { - appendItem(2, maxCount - 2); - appendItem(false); - appendItem(totalPage); - } - else if(page > (totalPage - maxCount + 2)) { - appendItem(false); - appendItem((totalPage - maxCount + 2), totalPage); - } - else { - appendItem(false); - appendItem(page - Math.ceil((maxCount-4)/2), page + Math.floor((maxCount-4)/2)); - appendItem(false); - appendItem(totalPage); - } - } - }; - - Pager.prototype.createGoto = function() { - var that = this; - var pager = this.state; - var $goto = $('