未验证 提交 d89392f5 编写于 作者: C catouse

* update dist and doc files.

上级 96f2bd8e
/*!
* ZUI: Theme - v1.10.0 - 2021-11-04
* ZUI: Theme - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
a {
......
此差异已折叠。
/*!
* ZUI: Standard edition - v1.10.0 - 2021-11-04
* ZUI: Standard edition - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
......@@ -4189,9 +4189,7 @@ input[type="checkbox"]:focus {
}
@-moz-document url-prefix() {
input[type="radio"]:focus {
outline: 2px solid #3280fc;
-moz-outline-radius: 100%;
outline: none;
}
}
input[type="number"]::-webkit-outer-spin-button,
......@@ -4749,6 +4747,22 @@ textarea.form-condensed .form-control {
-o-transform: scale(1);
transform: scale(1);
}
.checkbox-primary.indeterminate > label:after,
.radio-primary.indeterminate > label:after,
.checkbox-primary input:indeterminate + label:after,
.radio-primary input:indeterminate + label:after {
top: 14px;
left: 3px;
width: 8px;
height: 2px;
content: ' ';
background-color: #a3a2bc;
opacity: 1;
-webkit-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.checkbox-primary.focus > label:after,
.radio-primary.focus > label:after,
.checkbox-primary > input:focus + label:after,
......
/*!
* ZUI: Lite edition - v1.10.0 - 2021-11-04
* ZUI: Lite edition - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
......@@ -3675,9 +3675,7 @@ input[type="checkbox"]:focus {
}
@-moz-document url-prefix() {
input[type="radio"]:focus {
outline: 2px solid #3280fc;
-moz-outline-radius: 100%;
outline: none;
}
}
input[type="number"]::-webkit-outer-spin-button,
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
/*!
* ZUI: Lang.de - v1.10.0 - 2021-11-04
* ZUI: Lang.de - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang('de', {
......
/*!
* ZUI: Lang.de - v1.10.0 - 2021-11-04
* ZUI: Lang.de - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite <strong>{page}</strong>",totalPage:"<strong>{totalPage}</strong> Seiten",totalCount:"Total: <strong>{recTotal}</strong> Artikel",pageSize:"<strong>{recPerPage}</strong> Artikel pro Seite",itemsRange:"Seiten <strong>{start}</strong> bis <strong>{end}</strong>",pageOfTotal:"Seite <strong>{page}</strong>/<strong>{totalPage}</strong>"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}});
\ No newline at end of file
/*!
* ZUI: Lang.fr - v1.10.0 - 2021-11-04
* ZUI: Lang.fr - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang('fr', {
......
/*!
* ZUI: Lang.fr - v1.10.0 - 2021-11-04
* ZUI: Lang.fr - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page <strong>{page}</strong>",totalPage:"<strong>{totalPage}</strong> pages",totalCount:"Total: <strong>{recTotal}</strong> items",pageSize:"<strong>{recPerPage}</strong> per page",itemsRange:"De <strong>{start}</strong> à <strong>{end}</strong>",pageOfTotal:"Page <strong>{page}</strong> de <strong>{totalPage}</strong>"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}});
\ No newline at end of file
/*!
* ZUI: Lang.ja - v1.10.0 - 2021-11-04
* ZUI: Lang.ja - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang('ja', {
......
/*!
* ZUI: Lang.ja - v1.10.0 - 2021-11-04
* ZUI: Lang.ja - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
$.zui.lang("ja",{"zui.pager":{pageOfText:"ページ{0}",prev:"前へ",next:"次のページ",first:"最初のページ",last:"最後のページ","goto":"回す",pageOf:"ページ <strong>{page}</strong>",totalPage:"合計 <strong>{totalPage}</strong> ページ",totalCount:"<strong>{recTotal}</strong> アイテム",pageSize:"1ページに <strong>{recPerPage}</strong> 個のアイテム",itemsRange:"ページ <strong>{start}</strong> からページ <strong>{end}</strong>",pageOfTotal:"合計 <strong>{page}</strong>/<strong>{totalPage}</strong>"},"zui.boards":{append2end:"最後に移動"},"zui.browser":{tip:"安心してネットを使うために、今すぐブラウザをアップグレード !"},"zui.calendar":{weekNames:["月曜日","火曜日","水曜日","木曜日","金曜日","土曜日","日曜日"],monthNames:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",year:"{0}年",month:"{0}月",yearMonth:"{0}年{1}月"},"zui.chosenIcons":{emptyIcon:"[アイコンなし]",commonIcons:"共通のアイコン",webIcons:"Webアイコン",editorIcons:"エディターアイコン",directionalIcons:"矢印の合流点",otherIcons:"その他のアイコン"},"zui.colorPicker":{errorTip:"有効な色の値ではありません"},"zui.datagrid":{errorCannotGetDataFromRemote:"リモートサーバーからデータを取得できません({0})。",errorCannotHandleRemoteData:"リモートサーバーから返されたデータを処理できません。"},"zui.guideViewer":{prevStep:"前のステップ",nextStep:"次のステップ"},"zui.tabs":{reload:"リロード",close:"閉じる",closeOthers:"他のタブを閉じる",closeRight:"右のタブを閉じる",reopenLast:"最後に閉じたタブを復元",errorCannotFetchFromRemote:"リモートサーバーからコンテンツを取得できません({0})。"},"zui.uploader":{},datetimepicker:{days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["","","","","","","",""],daysMin:["","","","","","","",""],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",suffix:[],meridiem:[]},chosen:{no_results_text:"見つかりません"},bootbox:{OK:"オーケー",CANCEL:"キャンセル",CONFIRM:"確認する"}});
\ No newline at end of file
/*!
* ZUI: Standard edition - v1.10.0 - 2021-11-04
* ZUI: Standard edition - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
......@@ -21,6 +21,10 @@
/* Check jquery */
if(typeof($) === 'undefined') throw new Error('ZUI requires jQuery');
if(!Number.isNaN && typeof isNaN === 'function') Number.isNaN = isNaN;
if(!Number.parseInt && typeof parseInt === 'function') Number.parseInt = parseInt;
if(!Number.parseFloat && typeof parseFloat === 'function') Number.parseFloat = parseFloat;
/* ZUI shared object */
if(!$.zui) $.zui = function(obj) {
if($.isPlainObject(obj)) {
......@@ -161,7 +165,7 @@
langData[comName][langName] = data[comName];
});
} else if (langName && !componentName && !data) {
$.each(data, function(theLangName) {
$.each(langName, function(theLangName) {
var comsData = data[theLangName];
$.each(comsData, function(comName) {
if (!langData[comName]) {
......@@ -217,16 +221,20 @@
},
_scrollbarWidth: 0,
checkBodyScrollbar: function() {
if(document.body.clientWidth >= window.innerWidth) return 0;
if(!$.zui._scrollbarWidth) {
getScrollbarSize: function() {
var scrollbarWidth = $.zui._scrollbarWidth;
if (!scrollbarWidth) {
var scrollDiv = document.createElement('div');
scrollDiv.className = 'scrollbar-measure';
document.body.appendChild(scrollDiv);
$.zui._scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
$.zui._scrollbarWidth = scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
}
return $.zui._scrollbarWidth;
return scrollbarWidth;
},
checkBodyScrollbar: function() {
if(document.body.clientWidth >= window.innerWidth) return 0;
return $.zui.getScrollbarSize();
},
fixBodyScrollbar: function() {
if($.zui.checkBodyScrollbar()) {
......@@ -279,6 +287,27 @@
};
}(jQuery, window, undefined));
(function() {
'use strict';
var useRaf = typeof window.requestAnimationFrame === 'function';
function asap(callback, delayTime) {
if (useRaf && !delayTime) {
return requestAnimationFrame(callback);
}
return setTimeout(callback, delayTime || 0);
}
function clearAsap(id) {
if (useRaf) {
return cancelAnimationFrame(id);
}
clearTimeout(id);
}
$.zui({asap: asap, clearAsap: clearAsap});
}());
/* ========================================================================
* ZUI: typography.js
* http://openzui.com
......@@ -2816,7 +2845,7 @@
mousePos,
moved;
var mouseMove = function(event) {
var mouseMoveHandler = function(event) {
var mX = event.pageX,
mY = event.pageY;
moved = true;
......@@ -2856,6 +2885,17 @@
}
};
var mouseMoveTimer = 0;
var mouseMove = function(event) {
if (mouseMoveTimer) {
($.zui.clearAsap || clearTimeout)(mouseMoveTimer);
}
mouseMoveTimer = ($.zui.asap || setTimeout)(function() {
mouseMoveTimer = 0;
mouseMoveHandler(event);
}, 0);
};
var mouseUp = function(event) {
$(document).off(eventSuffix);
if(!moved) {
......@@ -2991,6 +3031,7 @@
sensorOffsetX: 0,
sensorOffsetY: 0,
dropToClass: 'drop-to',
dropTargetClass: 'drop-target',
// mouseButton: -1 // 0, 1, 2, -1, all, left, right, middle
};
var idIncrementer = 0;
......@@ -3022,12 +3063,12 @@
selector = setting.selector,
handle = setting.handle,
flex = setting.flex,
container = setting.container,
canMoveHere = setting.canMoveHere,
dropToClass = setting.dropToClass,
noShadow = setting.noShadow,
$ele = $root,
isMouseDown = false,
$container = container ? $(setting.container).first() : (selector ? $root : $('body')),
$container,
$targets,
$target,
$shadow,
......@@ -3042,34 +3083,45 @@
lastMouseOffset,
mouseDownBackEventCall;
var mouseMove = function(event) {
if (setting.dropOnMouseleave) {
mouseUpEvent += ' mouseleave' + eventSuffix;
}
var mouseMoveHandler = function(event) {
if(!isMouseDown) return;
mouseOffset = {left: event.pageX, top: event.pageY};
// ignore small move
if(Math.abs(mouseOffset.left - startMouseOffset.left) < deviation && Math.abs(mouseOffset.top - startMouseOffset.top) < deviation) return;
if($shadow === null) // create shadow
if(!$shadow) // create shadow
{
// ignore small move
if(Math.abs(mouseOffset.left - startMouseOffset.left) < deviation && Math.abs(mouseOffset.top - startMouseOffset.top) < deviation) return;
var cssPosition = $container.css('position');
if(cssPosition != 'absolute' && cssPosition != 'relative' && cssPosition != 'fixed') {
oldCssPosition = cssPosition;
$container.css('position', 'relative');
}
$shadow = $ele.clone().removeClass('drag-from').addClass('drag-shadow').css({
position: 'absolute',
width: $ele.outerWidth(),
transition: 'none'
}).appendTo($container);
if (noShadow) {
$shadow = {};
} else {
$shadow = $ele.clone().removeClass('drag-from').addClass('drag-shadow').css({
position: 'absolute',
width: $ele.outerWidth(),
transition: 'none'
}).appendTo($container);
}
$ele.addClass('dragging');
$targets.addClass(setting.dropTargetClass);
that.trigger('start', {
event: event,
element: $ele,
shadowElement: $shadow,
targets: $targets
shadowElement: noShadow ? null : $shadow,
targets: $targets,
mouseOffset: mouseOffset
});
}
......@@ -3081,8 +3133,10 @@
left: offset.left - containerOffset.left,
top: offset.top - containerOffset.top
};
$shadow.css(position);
$.extend(lastMouseOffset, mouseOffset);
if (!noShadow) {
$shadow.css(position);
}
var isNew = false;
isIn = false;
......@@ -3122,7 +3176,9 @@
if(!flex) {
$ele.toggleClass('drop-in', isIn);
$shadow.toggleClass('drop-in', isIn);
if (!noShadow) {
$shadow.toggleClass('drop-in', isIn);
}
} else if($target !== null && $target.length) {
isIn = true;
}
......@@ -3137,17 +3193,27 @@
selfTarget: isSelf,
clickOffset: clickOffset,
offset: offset,
position: {
left: offset.left - containerOffset.left,
top: offset.top - containerOffset.top
},
mouseOffset: mouseOffset
position: position,
mouseOffset: mouseOffset,
lastMouseOffset: lastMouseOffset,
});
}
$.extend(lastMouseOffset, mouseOffset);
event.preventDefault();
};
var mouseMoveTimer = 0;
var mouseMove = function(event) {
if (mouseMoveTimer) {
($.zui.clearAsap || clearTimeout)(mouseMoveTimer);
}
mouseMoveTimer = ($.zui.asap || setTimeout)(function() {
mouseMoveTimer = 0;
mouseMoveHandler(event);
}, 0);
};
var mouseUp = function(event) {
$(document).off(eventSuffix);
clearTimeout(mouseDownBackEventCall);
......@@ -3162,6 +3228,7 @@
if($shadow === null) {
$ele.removeClass('drag-from');
that.trigger('always', {
target: $target,
event: event,
cancel: true
});
......@@ -3207,9 +3274,12 @@
that.trigger('drop', eventOptions);
}
$targets.removeClass(dropToClass);
$targets.removeClass(dropToClass).removeClass(setting.dropTargetClass);
$ele.removeClass('dragging').removeClass('drag-from');
$shadow.remove();
if (!noShadow) {
$shadow.remove();
}
$shadow = null;
that.trigger('finish', eventOptions);
......@@ -3241,6 +3311,7 @@
}
isMouseDown = true;
$container = setting.container ? (typeof setting.container === 'function' ? setting.container($ele, $root) : $(setting.container).first()) : (selector ? $root : $('body'))
$targets = typeof setting.target === 'function' ? setting.target($ele, $root) : $container.find(setting.target),
$target = null,
$shadow = null,
......@@ -4024,7 +4095,14 @@
}
try {
$modal.attr('ref', frame.contentWindow.location.href);
var frame$ = window.frames[iframeName].$;
var frameWindow = window.frames[iframeName];
// Support for reset modal width by var modalWidthReset in iframe page
if(frameWindow.modalWidthReset) {
options.width = frameWindow.modalWidthReset;
}
var frame$ = frameWindow.$;
if(frame$ && options.height === 'auto' && options.size != 'fullscreen') {
// todo: update iframe url to ref attribute
......@@ -5026,6 +5104,23 @@
}(window.jQuery);
+function($) {
$(document).on('mouseenter.zui.dropdown', '.dropdown-submenu', function() {
var $menu = $(this).children('.dropdown-menu');
var isDropUp = $menu.closest('.dropup ').length;
$menu.css(isDropUp ? 'bottom' : 'top', 0);
($.zui.asap || setTimout)(function() {
var bouding = $menu[0].getBoundingClientRect();
if(isDropUp) {
$menu.css('bottom', bouding.top < 0 ? bouding.top : 0);
} else {
var bottomSpace = $(window).height() - bouding.bottom;
$menu.css('top', bottomSpace < 0 ? bottomSpace : 0);
}
}, 0);
});
}(window.jQuery);
/* ========================================================================
* ZUI: contextmenu.js
* http://openzui.com
......@@ -5054,7 +5149,7 @@
menuTemplate: '<ul class="dropdown-menu"></ul>',
toggleTrigger: false,
duration: 200,
limitInsideWindow: true
// maxMenuHeight: null,
};
var isShowingMenu = false;
......@@ -5068,7 +5163,8 @@
});
return ContextMenu;
};
var createMenuItem = function(item, index) {
function createMenuItem(item, index) {
if (typeof item === 'string') {
if (item === 'seperator' || item === 'divider' || item === '-' || item === '|') {
item = {type: 'seperator'};
......@@ -5099,8 +5195,39 @@
if (item.onClick) {
$a.on('click', item.onClick);
}
return $('<li />').toggleClass('disabled', item.disabled === true).append($a);
};
var $item = $('<li />')
.toggleClass('disabled', item.disabled === true)
.append($a);
if (item.items) {
$item.data('item', item).addClass('dropdown-submenu');
}
return $item;
}
/**
* Create context menu item list
* @param {Object[]} items Context menu item
* @param {JQuery} $list Context menu item list element
* @param {{itemCreator: function(Object, number, Object)}} options Context menu options
* @returns {boolean} Return true if successfully
*/
function createMenuItems(items, $list, options) {
var itemCreator = options.itemCreator || createMenuItem;
var itemsType = typeof items;
if (itemsType === 'string') {
items = items.split(',');
} else if (itemsType === 'function') {
items = items(options);
}
if (!items) {
return false;
}
$.each(items, function(index, item) {
$list.append(itemCreator(item, index, options));
});
return true;
}
var isContextMenuShow = function(id) {
var $target = $('#' + targetId);
......@@ -5157,13 +5284,45 @@
if (!$target.length) {
$target = $('<div style="position: fixed; z-index: 2000;" class="contextmenu" id="' + targetId + '"><div class="contextmenu-menu"></div></div>').appendTo('body');
}
var $menu = $target.find('.contextmenu-menu').off('click.' + NAME).on('click.' + NAME, 'a,.contextmenu-item', function(e) {
var $menu = $target.find('.contextmenu-menu').empty();
$menu.off('click.' + NAME).on('click.' + NAME, 'a,.contextmenu-item', function(e) {
var $item = $(this);
var clickResult = options.onClickItem && options.onClickItem($item.data('item'), $item, e, options);
if (clickResult !== false) {
hideContextMenu();
}
}).empty();
}).off('mouseenter.' + NAME).on('mouseenter.' + NAME, '.dropdown-submenu', function(e) {
var $item = $(this);
var item = $item.data('item');
var $subMenu = $item.children('.dropdown-menu');
if(item) {
if (item.items) {
if(!$subMenu.length) {
$subMenu = $(options.menuTemplate).appendTo($item);
}
createMenuItems(item.items, $subMenu, options);
}
$item.removeData('item');
}
if (!$subMenu.length) {
return;
}
// Adjust submenu position
$subMenu.removeClass('pull-left').css('top', 0);
var itemBounding = $item[0].getBoundingClientRect();
var menuBounding = $subMenu[0].getBoundingClientRect();
var winWidth = window.innerWidth;
var winHeight = window.innerHeight;
if (menuBounding.bottom > winHeight) {
var subMenuTop = Math.max(-menuBounding.top, winHeight - menuBounding.bottom);
$subMenu.css('top', subMenuTop);
}
if (menuBounding.right > winWidth) {
$subMenu.addClass('pull-left');
}
});
$menu.attr('class', 'contextmenu-menu' + (options.className ? (' ' + options.className) : ''))
$target.attr('class', 'contextmenu contextmenu-show');
......@@ -5174,19 +5333,8 @@
} else {
$menu.append(options.menuTemplate);
var $menuList = $menu.children().first();
var itemCreator = options.itemCreator || createMenuItem;
var itemsType = typeof items;
if (itemsType === 'string') {
items = items.split(',');
} else if (itemsType === 'function') {
items = items(options);
}
if (!items) {
return false;
}
$.each(items, function(index, item) {
$menuList.append(itemCreator(item, index, options));
});
var result = createMenuItems(items, $menuList, options);
if (result === false) return result;
}
// Show menu
......@@ -5218,21 +5366,24 @@
if (x === undefined) x = mouseX;
if (y === undefined) y = (options.event || options).clientY;
if (y === undefined) y = mouseY;
var winHeight = window.innerHeight;
var winWidth = window.innerWidth;
// var maxMenuHeight = options.maxMenuHeight;
// if (typeof maxMenuHeight !== 'number') maxMenuHeight = winHeight;
// else winHeight = Math.min(winHeight, maxMenuHeight);
var $menuList = $menu.children().first();
// $menuList.css({maxHeight: maxMenuHeight, overflowY: 'auto', margin: 0});
var menuWidth = $menuList.outerWidth();
var menuHeight = $menuList.outerHeight();
if (options.position) {
var newPos = options.position({x: x, y: y, width: menuWidth, height: menuHeight}, options, $menu);
var newPos = options.position({x: x, y: y, width: menuWidth, height: menuHeight, winHeight: winHeight, winWidth: winWidth}, options, $menu);
if (newPos) {
x = newPos.x;
y = newPos.y;
}
}
if (options.limitInsideWindow) {
var $w = $(window);
x = Math.max(0, Math.min(x, $w.width() - menuWidth));
y = Math.max(0, Math.min(y, $w.height() - menuHeight));
}
x = Math.max(0, Math.min(x, winWidth - menuWidth));
y = Math.max(0, Math.min(y, winHeight - menuHeight));
$target.css({
left: x,
......@@ -5243,12 +5394,10 @@
if (animation) {
$menu.addClass(animation);
animationTimer = setTimeout(function() {
// $menu.show();
afterShow();
isShowingMenu = false;
}, 10);
} else {
// $menu.show();
afterShow();
isShowingMenu = false;
}
......
/*!
* ZUI: Lite edition - v1.10.0 - 2021-11-04
* ZUI: Lite edition - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*! Some code copy from Bootstrap v3.0.0 by @fat and @mdo. (Copyright 2013 Twitter, Inc. Licensed under http://www.apache.org/licenses/)*/
......@@ -21,6 +21,10 @@
/* Check jquery */
if(typeof($) === 'undefined') throw new Error('ZUI requires jQuery');
if(!Number.isNaN && typeof isNaN === 'function') Number.isNaN = isNaN;
if(!Number.parseInt && typeof parseInt === 'function') Number.parseInt = parseInt;
if(!Number.parseFloat && typeof parseFloat === 'function') Number.parseFloat = parseFloat;
/* ZUI shared object */
if(!$.zui) $.zui = function(obj) {
if($.isPlainObject(obj)) {
......@@ -161,7 +165,7 @@
langData[comName][langName] = data[comName];
});
} else if (langName && !componentName && !data) {
$.each(data, function(theLangName) {
$.each(langName, function(theLangName) {
var comsData = data[theLangName];
$.each(comsData, function(comName) {
if (!langData[comName]) {
......@@ -217,16 +221,20 @@
},
_scrollbarWidth: 0,
checkBodyScrollbar: function() {
if(document.body.clientWidth >= window.innerWidth) return 0;
if(!$.zui._scrollbarWidth) {
getScrollbarSize: function() {
var scrollbarWidth = $.zui._scrollbarWidth;
if (!scrollbarWidth) {
var scrollDiv = document.createElement('div');
scrollDiv.className = 'scrollbar-measure';
document.body.appendChild(scrollDiv);
$.zui._scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
$.zui._scrollbarWidth = scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
}
return $.zui._scrollbarWidth;
return scrollbarWidth;
},
checkBodyScrollbar: function() {
if(document.body.clientWidth >= window.innerWidth) return 0;
return $.zui.getScrollbarSize();
},
fixBodyScrollbar: function() {
if($.zui.checkBodyScrollbar()) {
......@@ -2698,7 +2706,14 @@
}
try {
$modal.attr('ref', frame.contentWindow.location.href);
var frame$ = window.frames[iframeName].$;
var frameWindow = window.frames[iframeName];
// Support for reset modal width by var modalWidthReset in iframe page
if(frameWindow.modalWidthReset) {
options.width = frameWindow.modalWidthReset;
}
var frame$ = frameWindow.$;
if(frame$ && options.height === 'auto' && options.size != 'fullscreen') {
// todo: update iframe url to ref attribute
......@@ -3700,6 +3715,23 @@
}(window.jQuery);
+function($) {
$(document).on('mouseenter.zui.dropdown', '.dropdown-submenu', function() {
var $menu = $(this).children('.dropdown-menu');
var isDropUp = $menu.closest('.dropup ').length;
$menu.css(isDropUp ? 'bottom' : 'top', 0);
($.zui.asap || setTimout)(function() {
var bouding = $menu[0].getBoundingClientRect();
if(isDropUp) {
$menu.css('bottom', bouding.top < 0 ? bouding.top : 0);
} else {
var bottomSpace = $(window).height() - bouding.bottom;
$menu.css('top', bottomSpace < 0 ? bottomSpace : 0);
}
}, 0);
});
}(window.jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.0.0
* http://twzui.github.com/bootstrap/javascript.html#carousel
......
此差异已折叠。
此差异已折叠。
/*!
* ZUI: Ajax 响应模拟工具 - v1.10.0 - 2021-11-04
* ZUI: Ajax 响应模拟工具 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: Ajax 响应模拟工具 - v1.10.0 - 2021-11-04
* ZUI: Ajax 响应模拟工具 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(e){"use strict";var a=[],l=e.ajax,r=function(l){for(var r=a.length-1;r>=0;--r){var t=a[r];if(t.urlMatch instanceof RegExp){if(t.urlMatch.test(l))return e.extend(!0,{url:l},t)}else if("function"==typeof t.urlMatch){if(t.urlMatch(l))return e.extend(!0,{url:l},t)}else if(0===l.indexOf(t.urlMatch))return e.extend(!0,{url:l},t)}},t=function(a){var t=a.url,n=r(t);if(n){var o=function(l,r){if(!n.aborted){var t=a.dataType;"json"===t?"string"==typeof l&&(l=e.parseJSON(l)):"string"!=typeof l&&(l=JSON.stringify(l)),a.success&&a.success(l,r),n.doneCallback&&n.doneCallback(l,r),a.complete&&a.complete(null,r),n.alwaysCallback&&n.alwaysCallback(l,r)}},c=function(e,l){n.aborted||(a.error&&a.error(null,e,l),n.failCallback&&n.failCallback(e,l),a.complete&&a.complete(null,e),n.alwaysCallback&&n.alwaysCallback(e,l))};a.beforeSend&&a.beforeSend(null,a);var u=function(){if(!n.aborted){var e="function"==typeof n.route?n.route.call(n,a,o,c):n.route;return e!==!0&&(e===!1?c(500):o(e,200)),console.groupCollapsed("%cFakeAjax %c"+t+"%c "+(e===!1?"Error":"Success"),"color: lightblue","text-decoration: underline",e===!1?"color: red":"color: green"),console.log("response",e),console.log("ajax options",a),console.groupEnd(),e}};return setTimeout(u,n.delay||0),n}return l.apply(null,arguments)},n=function(r,n,o){e.ajax_origin||(e.ajax_origin=l,e.ajax=t);var c={done:function(e){return this.doneCallback=e,this},fail:function(e){return this.failCallback=e,this},always:function(e){return this.alwaysCallback=e,this},abort:function(){this.aborted=!0}};e.isPlainObject(r)?e.extend(c,r):(c.urlMatch=r,c.route=n,e.isPlainObject(o)?e.extend(c,o):"number"==typeof o&&(c.delay=o)),a.push(c)};e.fakeServer=n}(jQuery);
\ No newline at end of file
/*!
* ZUI: 数组辅助方法 - v1.10.0 - 2021-11-04
* ZUI: 数组辅助方法 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 数组辅助方法 - v1.10.0 - 2021-11-04
* ZUI: 数组辅助方法 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(){"use strict";var r="function";Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(r){var t=this.length,e=Number(arguments[1]);for(isNaN(e)?e=t-1:(e=e<0?Math.ceil(e):Math.floor(e),e<0?e+=t:e>=t&&(e=t-1));e>-1;e--)if(e in this&&this[e]===r)return e;return-1}),Array.prototype.every||(Array.prototype.every=function(t){var e=this.length;if(typeof t!=r)throw new TypeError;for(var o=arguments[1],n=0;n<e;n++)if(n in this&&!t.call(o,this[n],n,this))return!1;return!0}),Array.prototype.filter||(Array.prototype.filter=function(t){var e=this.length;if(typeof t!=r)throw new TypeError;for(var o=[],n=arguments[1],i=0;i<e;i++)if(i in this){var f=this[i];t.call(n,f,i,this)&&o.push(f)}return o}),Array.prototype.indexOf||(Array.prototype.indexOf=function(r){var t=this.length,e=Number(arguments[1])||0;for(e=e<0?Math.ceil(e):Math.floor(e),e<0&&(e+=t);e<t;e++)if(e in this&&this[e]===r)return e;return-1}),Array.prototype.map||(Array.prototype.map=function(t){var e=this.length;if(typeof t!=r)throw new TypeError;for(var o=new Array(e),n=arguments[1],i=0;i<e;i++)i in this&&(o[i]=t.call(n,this[i],i,this));return o}),Array.prototype.where||(Array.prototype.where=function(t,e){e=e||[];var o,n,i;return this.forEach(function(f){n=!0;for(var a in t)if(o=t[a],typeof o===r?n=o(f):(i=f[a],n=i&&i===o),!n)break;n&&e.push(f)}),e}),Array.prototype.groupBy||(Array.prototype.groupBy=function(r){var t={};return this.forEach(function(e){var o=e[r];o||(o="unkown"),t[o]||(t[o]=[]),t[o].push(e)}),t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(r){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),e=t.length>>>0;if("function"!=typeof r)throw new TypeError("predicate must be a function");for(var o=arguments[1],n=0;n<e;){var i=t[n];if(r.call(o,i,n,t))return i;n++}}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(r){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),e=t.length>>>0;if("function"!=typeof r)throw new TypeError("predicate must be a function");for(var o=arguments[1],n=0;n<e;){var i=t[n];if(r.call(o,i,n,t))return n;n++}return-1}})}();
\ No newline at end of file
/*!
* ZUI: 看板 - v1.10.0 - 2021-11-04
* ZUI: 看板 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.board-item {
......
/*!
* ZUI: 看板 - v1.10.0 - 2021-11-04
* ZUI: 看板 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 看板 - v1.10.0 - 2021-11-04
* ZUI: 看板 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.board-item{padding:6px 10px;margin-bottom:5px;background:#fff;border:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.05);box-shadow:0 1px 0 rgba(0,0,0,.05);-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.board-item:hover{-webkit-box-shadow:0 1px 1 rgba(0,0,0,.1);box-shadow:0 1px 1 rgba(0,0,0,.1)}.board-item.board-item-empty{display:none;color:grey;border-style:dashed}.board-item.board-item-shadow{display:none;padding:0;background:#ddd;border:none;border-color:#ddd;-webkit-box-shadow:inset 0 0 4px rgba(0,0,0,.1);box-shadow:inset 0 0 4px rgba(0,0,0,.1);-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.board-item.drag-shadow{width:250px;cursor:move;background-color:#fff;border-color:#c4c4c4;-webkit-box-shadow:1px 1px 15px rgba(0,0,0,.25);box-shadow:1px 1px 15px rgba(0,0,0,.25);opacity:.9}.board-item.drag-from{background-color:#ebf2f9}.board-list .board-item:last-child{margin-bottom:0}.board{float:left;width:250px;margin-right:10px}.board.drop-in-empty .board-item-empty{height:0;padding:0;margin:0;overflow:hidden;border:transparent}.board:last-child{margin-right:0}.board>.panel-body{padding:5px;background:#f1f1f1}.boards:after,.boards:before{display:table;content:" "}.boards:after{clear:both}.boards.dragging .board.drop-in{border-color:#c4c4c4;-webkit-box-shadow:1px 1px 15px rgba(0,0,0,.25);box-shadow:1px 1px 15px rgba(0,0,0,.25)}.boards.dragging .board.drop-in .board-item-shadow{display:block}.boards.dragging .board .board-item.board-item-empty{display:block}.boards.dragging .board-item.disable-drop{display:none}.boards.drop-in .board-item.drag-from{height:0;padding:0;margin:0;overflow:hidden;border:transparent}
\ No newline at end of file
/*!
* ZUI: 看板 - v1.10.0 - 2021-11-04
* ZUI: 看板 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(t){"use strict";if(!t.fn.droppable)throw new Error("Droppable requires for boards");var a="zui.boards",o=function(a,o){this.$=t(a),this.options=this.getOptions(o),this.getLang(),this.init()};o.DEFAULTS={lang:"en",langs:{zh_cn:{append2end:"移动到末尾"},zh_tw:{append2end:"移动到末尾"},en:{append2end:"Move to the end."}}},o.prototype.getOptions=function(a){return a=t.extend({},o.DEFAULTS,this.$.data(),a)},o.prototype.getLang=function(){var o=this.options;this.langName=o.lang||t.zui.clientLang(),this.lang=t.zui.getLangData(a,this.langName,o.langs)},o.prototype.init=function(){var a=1,o=this.lang;this.$.find('.board-item:not(".disable-drop"), .board:not(".disable-drop")').each(function(){var i=t(this);i.attr("id")?i.attr("data-id",i.attr("id")):i.attr("data-id")||i.attr("data-id","board"+a++),i.hasClass("board")&&i.find(".board-list").append('<div class="board-item board-item-empty"><i class="icon-plus"></i> {append2end}</div>'.format(o)).append('<div class="board-item board-item-shadow"></div>'.format(o))}),this.bind()},o.prototype.bind=function(a){var o=this.$,i=this.options;o.droppable(t.extend({before:i.before,target:'.board-item:not(".disable-drop, .board-item-shadow")',flex:!0,selector:'.board-item:not(".disable-drop, .board-item-shadow")',start:function(t){o.addClass("dragging").find(".board-item-shadow").height(t.element.outerHeight())},drag:function(t){if(o.find(".board.drop-in-empty").removeClass("drop-in-empty"),t.isIn){var a=t.target.closest(".board").addClass("drop-in"),i=a.find(".board-item-shadow"),e=t.target;o.addClass("drop-in").find(".board.drop-in").not(a).removeClass("drop-in"),i.insertBefore(e),a.toggleClass("drop-in-empty",e.hasClass("board-item-empty"))}},drop:function(t){if(t.isNew){var a;"function"==typeof i.drop&&(a=i.drop(t)),a!==!1&&t.element.insertBefore(t.target)}},finish:function(){o.removeClass("dragging").removeClass("drop-in").find(".board.drop-in").removeClass("drop-in")}},i.droppable))},t.fn.boards=function(i){return this.each(function(){var e=t(this),n=e.data(a),r="object"==typeof i&&i;n||e.data(a,n=new o(this,r)),"string"==typeof i&&n[i]()})},t.fn.boards.Constructor=o}(jQuery);
\ No newline at end of file
/*!
* ZUI: 日历 - v1.10.0 - 2021-11-04
* ZUI: 日历 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.calendar {
......@@ -37,7 +37,7 @@
}
.calendar .weekends-empty .table > thead > tr > th.weekend-head,
.calendar .weekends-empty .table > tbody > tr > td.weekend-day {
width: 60px;
width: 84px;
min-width: 40px;
}
.calendar .day {
......
/*!
* ZUI: 日历 - v1.10.0 - 2021-11-04
* ZUI: 日历 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 日历 - v1.10.0 - 2021-11-04
* ZUI: 日历 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
*/.calendar{margin-bottom:20px}.calendar>header{margin-bottom:10px}.calendar>header .btn-toolbar>.btn-group{margin-right:10px}.calendar>header .calendar-caption{line-height:30px}.calendar .table{margin-bottom:0;table-layout:fixed}.calendar .table>tbody>tr>td,.calendar .table>thead>tr>th{width:14.28571429%;padding:0}.calendar .table>thead>tr>th{color:grey;text-align:center;background-color:#fff}.calendar .weekends-empty .table>tbody>tr>td,.calendar .weekends-empty .table>thead>tr>th{width:20%}.calendar .weekends-empty .table>tbody>tr>td.weekend-day,.calendar .weekends-empty .table>thead>tr>th.weekend-head{width:60px;min-width:40px}.calendar .day{opacity:.7}.calendar .day>.heading{padding:2px 5px;text-align:right}.calendar .day>.heading>.month{padding:1px 2px;color:#fff;white-space:nowrap;background-color:#b3b3b3;border-radius:3px}.calendar .day>.content{height:100%;min-height:70px}.calendar .cell-day{background-color:#f1f1f1}.calendar .cell-day.past>.day>.content{opacity:.7}.calendar .cell-day.current-month{background:0 0}.calendar .cell-day.current-month>.day{opacity:1}.calendar .cell-day.current{background-color:#fff0d5;-webkit-box-shadow:inset 1px 1px 0 grey,inset -1px -1px 0 grey;box-shadow:inset 1px 1px 0 grey,inset -1px -1px 0 grey}.calendar .cell-day.current>.day>.content{padding:0}.calendar .cell-day.current>.day>.heading{background-color:rgba(0,0,0,.1)}.calendar .cell-day.drop-to{background-color:#fff0d5;opacity:1}.calendar .event{padding:1px 5px;margin:0 1px 1px;color:#fff;cursor:pointer;background-color:#3280fc;opacity:.95;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}a.calendar .event:hover{background-color:#0462f7}.calendar .event:hover{opacity:1}.calendar .event.drag-shadow{cursor:move}.calendar .event.drag-from{opacity:.25}.calendar .event.color-red{color:#fff;background-color:#ea644a}a.calendar .event.color-red:hover{background-color:#e53d1c}.calendar .event.color-green{color:#fff;background-color:#38b03f}a.calendar .event.color-green:hover{background-color:#2c8931}.calendar .event.color-yellow{color:#fff;background-color:#f1a325}a.calendar .event.color-yellow:hover{background-color:#d5890e}.calendar .event.color-blue{color:#fff;background-color:#03b8cf}a.calendar .event.color-blue:hover{background-color:#028b9d}.calendar .event.color-brown{color:#fff;background-color:#bd7b46}a.calendar .event.color-brown:hover{background-color:#996337}.calendar .event.color-purple{color:#fff;background-color:#8666b8}a.calendar .event.color-purple:hover{background-color:#6c4aa1}.calendar.limit-event-title .event{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
\ No newline at end of file
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.calendar{margin-bottom:20px}.calendar>header{margin-bottom:10px}.calendar>header .btn-toolbar>.btn-group{margin-right:10px}.calendar>header .calendar-caption{line-height:30px}.calendar .table{margin-bottom:0;table-layout:fixed}.calendar .table>tbody>tr>td,.calendar .table>thead>tr>th{width:14.28571429%;padding:0}.calendar .table>thead>tr>th{color:grey;text-align:center;background-color:#fff}.calendar .weekends-empty .table>tbody>tr>td,.calendar .weekends-empty .table>thead>tr>th{width:20%}.calendar .weekends-empty .table>tbody>tr>td.weekend-day,.calendar .weekends-empty .table>thead>tr>th.weekend-head{width:84px;min-width:40px}.calendar .day{opacity:.7}.calendar .day>.heading{padding:2px 5px;text-align:right}.calendar .day>.heading>.month{padding:1px 2px;color:#fff;white-space:nowrap;background-color:#b3b3b3;border-radius:3px}.calendar .day>.content{height:100%;min-height:70px}.calendar .cell-day{background-color:#f1f1f1}.calendar .cell-day.past>.day>.content{opacity:.7}.calendar .cell-day.current-month{background:0 0}.calendar .cell-day.current-month>.day{opacity:1}.calendar .cell-day.current{background-color:#fff0d5;-webkit-box-shadow:inset 1px 1px 0 grey,inset -1px -1px 0 grey;box-shadow:inset 1px 1px 0 grey,inset -1px -1px 0 grey}.calendar .cell-day.current>.day>.content{padding:0}.calendar .cell-day.current>.day>.heading{background-color:rgba(0,0,0,.1)}.calendar .cell-day.drop-to{background-color:#fff0d5;opacity:1}.calendar .event{padding:1px 5px;margin:0 1px 1px;color:#fff;cursor:pointer;background-color:#3280fc;opacity:.95;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}a.calendar .event:hover{background-color:#0462f7}.calendar .event:hover{opacity:1}.calendar .event.drag-shadow{cursor:move}.calendar .event.drag-from{opacity:.25}.calendar .event.color-red{color:#fff;background-color:#ea644a}a.calendar .event.color-red:hover{background-color:#e53d1c}.calendar .event.color-green{color:#fff;background-color:#38b03f}a.calendar .event.color-green:hover{background-color:#2c8931}.calendar .event.color-yellow{color:#fff;background-color:#f1a325}a.calendar .event.color-yellow:hover{background-color:#d5890e}.calendar .event.color-blue{color:#fff;background-color:#03b8cf}a.calendar .event.color-blue:hover{background-color:#028b9d}.calendar .event.color-brown{color:#fff;background-color:#bd7b46}a.calendar .event.color-brown:hover{background-color:#996337}.calendar .event.color-purple{color:#fff;background-color:#8666b8}a.calendar .event.color-purple:hover{background-color:#6c4aa1}.calendar.limit-event-title .event{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
\ No newline at end of file
/*!
* ZUI: 日历 - v1.10.0 - 2021-11-04
* ZUI: 日历 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(t,e){"use strict";var a="zui.calendar",n="number",s="string",o="undefined",i={primary:1,green:2,red:3,blue:4,yellow:5,brown:6,purple:7},r=function(t,e){e=e||1;for(var a=t.clone();a.getDay()!=e;)a.addDays(-1);return a.clearTime(),a},d=function(t){var e=t.clone();return e.setDate(1),e},l=function(t,e){var a=t.clone().clearTime(),n=e.clone().clearTime();return Math.round((n.getTime()-a.getTime())/Date.ONEDAY_TICKS)+1},c=function(t,e,a){for(var n=t.clone(),s=0;n<=e;)a(n.clone(),s++),n.addDays(1)},h=function(e,n){if(this.name=a,this.$=t(e),this.id=this.$.attr("id")||a+t.zui.uuid(),this.$.attr("id",this.id),this.storeName=a+"."+this.id,n=this.getOptions(n),this.getLang(),this.resetData(n.data),this.storeData=t.zui.store.pageGet(this.storeName,{date:"today",view:"month"}),this.date=n.startDate||"today",this.view=n.startView||"month",this.$.toggleClass("limit-event-title",n.limitEventTitle),n.withHeader){var s=this.$.children(".calender-header");s.length||(s=t('<header class="calender-header"><div class="btn-toolbar"><div class="btn-group"><button type="button" class="btn btn-today">{today}</button></div><div class="btn-group"><button type="button" class="btn btn-prev"><i class="icon-chevron-left"></i></button><button type="button" class="btn btn-next"><i class="icon-chevron-right"></i></button></div><div class="btn-group"><span class="calendar-caption"></span></div></div></header>'.format(this.lang)),this.$.append(s)),this.$caption=s.find(".calendar-caption"),this.$todayBtn=s.find(".btn-today"),this.$header=s}var o=this.$.children(".calendar-views");o.length||(o=t('<div class="calendar-views"></div>'),this.$.append(o)),this.$views=o,this.display(),this.bindEvents()};h.DEFAULTS={langs:{zh_cn:{weekNames:["周一","周二","周三","周四","周五","周六","周日"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",year:"{0}年",month:"{0}月",yearMonth:"{0}年{1}月"},zh_tw:{weekNames:["週一","週二","週三","週四","週五","週六","週日"],monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",year:"{0}年",month:"{0}月",yearMonth:"{0}年{1}月"},en:{weekNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],monthNames:["Jan","Feb","Mar","Apr","May","June","July","Aug","Sep","Oct","Nov","Dec"],today:"Today",year:"{0}",month:"{0}",yearMonth:"{2}, {0}"}},data:{calendars:{defaultCal:{color:"#229F24"}},events:[]},limitEventTitle:!0,storage:!0,withHeader:!0,dragThenDrop:!0},h.prototype.resetData=function(t){var e=this;e.data=t=t||e.data,t.calendars&&(this.calendars={},e.addCalendars(t.calendars,!0)),t.events&&(this.events=[],e.addEvents(t.events,!0)),e.sortEvents()},h.prototype.sortEvents=function(){var t=this,e=t.events;Array.isArray(e)||(e=[]),e.sort(t.options.eventSorter||function(t,e){if(t.allDay)return 1;if(e.allDay)return-1;var a=t.start>e.start?1:t.start<e.start?-1:0;return 0===a&&(a=t.id<e.id?-1:1),a}),t.events=e},h.prototype.bindEvents=function(){var e=this.$,a=this;e.on("click",".btn-today",function(){a.date=new Date,a.display(),e.callComEvent(a,"clickTodayBtn")}).on("click",".btn-next",function(){"month"===a.view&&a.date.addMonths(1),a.display(),e.callComEvent(a,"clickNextBtn")}).on("click",".btn-prev",function(){"month"===a.view&&a.date.addMonths(-1),a.display(),e.callComEvent(a,"clickPrevBtn")}).on("click",".event",function(n){n.stopPropagation(),t(n.target).closest(".event-btn").length||e.callComEvent(a,"clickEvent",{element:this,event:t(this).data("event"),events:a.events},n)}).on("click",".cell-day",function(n){e.callComEvent(a,"clickCell",{element:this,view:a.view,date:new Date(t(this).children(".day").attr("data-date")),events:a.events},n)})},h.prototype.addCalendars=function(e,a){var n=this;n.calendars||(n.calendars={}),t.isPlainObject(e)&&(e=[e]),t.each(e,function(e,s){if(a||!1!==n.$.callComEvent(this,"beforeAddCalendars",{newCalendar:s,data:n.data})){if(s.color||(s.color="primary"),i[s.color.toLowerCase()])s.presetColor=!0;else{var o=new t.zui.Color(s.color);s.textColor=o.contrast().hexStr()}n.calendars[s.name]=s}}),a||(n.display(),n.$.callComEvent(n,"addCalendars",{newCalendars:e,data:n.data}))},h.prototype.addEvents=function(e,a){var i=this;i.events||(i.events=[]),t.isPlainObject(e)&&(e=[e]),t.each(e,function(e,r){if(a||!1!==i.$.callComEvent(i,"beforeAddEvent",{newEvent:r,data:i.data})){var d=typeof r.start,c=typeof r.end;d!==n&&d!==s||(r.start=new Date(r.start)),c!==n&&c!==s||(r.end=new Date(r.end)),typeof r.id===o&&(r.id=t.zui.uuid()),r.allDay&&(r.start.clearTime(),r.end||(r.end=r.start.clone()),r.end.clearTime().addDays(1).addMilliseconds(-1)),r.days=l(r.start,r.end),i.events.push(r)}}),a||(i.sortEvents(),i.display(),i.$.callComEvent(i,"addEvents",{newEvents:e,data:i.data}))},h.prototype.getEvent=function(t){for(var e=this.events,a=0;a<e.length;a++)if(e[a].id==t)return e[a];return null},h.prototype.updateEvents=function(e){var a={data:this.data,changes:[]},n=this;t.isPlainObject(e)&&(e=[e]);var o,i,r;t.each(e,function(e,d){o=d.event,i=d.changes,r={event:o,changes:[]},typeof o===s&&(o=n.getEvent(o)),o&&(t.isPlainObject(i)&&(i=[i]),t.each(d,function(e,a){!1!==n.$.callComEvent(n,"beforeChange",{event:o,change:a.change,to:a.to,from:o[a.change]})&&(r.changes.push(t.extend(!0,{},a,{from:o[a.change]})),o[a.change]=a.to)})),a.changes.push(r)}),n.sortEvents(),n.display(),n.$.callComEvent(n,"change",a)},h.prototype.removeEvents=function(e){Array.isArray(e)||(e=[e]);var a,n,s,o=this.events,i=this,r=[];t.each(e,function(e,d){a=t.isPlainObject(d)?d.id:d,s=-1;for(var l=0;l<o.length;l++)if(o[l].id==a){s=l,n=o[l];break}s>=0&&fasle!==i.$.callComEvent(i,"beforeRemoveEvent",{event:n,eventId:a,data:i.data})&&(o.splice(s,1),r.push(n))}),i.sortEvents(),i.display(),i.$.callComEvent(i,"removeEvents",{removedEvents:r,data:i.data})},h.prototype.getOptions=function(e){return this.options=t.extend(!0,{},h.DEFAULTS,this.$.data(),e,!0),this.options},h.prototype.getLang=function(){this.langName=this.options.lang||t.zui.clientLang(),this.lang=t.zui.getLangData(a,this.langName,this.options.langs)},h.prototype.display=function(e,a){var n=this,i=typeof e,r=typeof a;i===o?e=n.view:n.view=e,r===o?a=n.date:n.date=a,"today"===a&&(a=new Date,n.date=a),typeof a===s&&(a=new Date(a),n.date=a),n.options.storage&&t.zui.store.pageSet(n.storeName,{date:a,view:e});var d={view:e,date:a},l=function(){switch(e){case"month":n.displayMonth(a)}n.$.callComEvent(n,"display",d)},c=n.$.callComEvent(n,"beforeDisplay",[d,l]);c!==!1&&l()},h.prototype.displayMonth=function(e){var a=this;e=e||a.date;var n,s=a.options,o=a.lang,i=a.$views,l=(a.$,a.$monthView);if(!l||!l.length){l=t('<div class="calendar-view month"><table class="table table-bordered"><thead><tr class="week-head"></tr></thead><tbody class="month-days"></tbody></table></div>');var c,h=l.find(".week-head"),v=l.find(".month-days");for(n=0;n<7;n++)t("<th>"+o.weekNames[n]+"</th>").toggleClass("weekend-head",n>=5).appendTo(h);for(n=0;n<6;n++){c=t('<tr class="week-days"></tr>');for(var p=0;p<7;p++)t('<td class="cell-day"><div class="day"><div class="heading"><span class="month"></span> <span class="number"></span></div><div class="content"><div class="events"></div></div></div></td>').toggleClass("weekend-day",p>=5).appendTo(c);v.append(c)}i.append(l),a.$monthView=l}var g,u,y,f,m,b,w,C,E,D,$,k=l.find(".week-days"),T=d(e),M=new Date,x=r(T),N=e.getFullYear(),P=e.getMonth(),S=M.getMonth(),z=M.getFullYear(),A=M.getDate(),F=x.clone().addDays(42).addMilliseconds(-1),O=x.clone().addDays(1).addMilliseconds(-1),j=a.getEvents(x,F),L=a.calendars,B=!0;if(k.each(function(e){g=t(this),g.find(".day").each(function(i){C=0===i,u=t(this),y=u.closest(".cell-day"),f=O.getFullYear(),m=O.getDate(),b=O.getMonth(),w=O.toDateString(),u.attr("data-date",w).data("date",O.clone()),u.find(".heading > .number").text(m).toggle(!s.hideFirstDayNumber||1!==m),u.find(".heading > .month").toggle(0===e&&0===i||1===m).text((0===b&&1===m?o.year.format(f)+" ":"")+o.monthNames[b]),y.toggleClass("current-month",b===P),y.toggleClass("current",m===A&&b===S&&f===z),y.toggleClass("past",O<M),y.toggleClass("first-day",1===m),y.toggleClass("future",O>M),$=u.find(".events").empty();var r=j[w];if(r){var d,l=r.events,c=0;for(n=0;n<=r.maxPos;++n)d=l[n],!d||d.placeholder&&!C?c++:(B&&i>=5&&(B=!1),s.eventCreator?E=s.eventCreator(d,y,a):(E=t('<div data-id="'+d.id+'" class="event" title="'+d.desc+'"><span class="time">'+d.start.format("hh:mm")+'</span> <span class="title">'+d.title+"</span></div>"),E.find(".time").toggle(!d.allDay),E.data("event",d),E.attr("data-days",d.days)),E.toggleClass("event-all-day",!!d.allDay).data("event",d).attr("data-days",d.days),d.calendar&&(D=L[d.calendar],D&&(D.presetColor?E.addClass("color-"+D.color):E.css({"background-color":D.color,color:D.textColor}))),d.days&&(d.placeholder?C&&E.css("width",Math.min(7,d.days-d.holderPos)+"00%"):E.css("width",Math.min(7-i,d.days)+"00%")),c>0&&(E.css("margin-top",22*c),c=0),$.append(E))}y.toggleClass("empty",!u.find(".events").length),s.dayFormater&&s.dayFormater(y,O,r,a),O.addDays(1)})}),s.hideEmptyWeekends&&l.toggleClass("weekends-empty",B),s.withHeader&&(a.$caption.text(o.yearMonth.format(N,P+1,o.monthNames[P])),a.$todayBtn.toggleClass("disabled",P===S&&N===z)),s.dragThenDrop){if(!t.fn.droppable)return console.error("Calendar dragThenDrop option requires droppable.js");l.data("zui.droppable")||l.droppable(t.extend({target:".cell-day",selector:".event",flex:!0,start:function(){a.$.addClass("event-dragging")},drop:function(t){var e=t.element.data("event"),n=t.target.children(".day").attr("data-date");if(e&&n){var s=e.start.clone();if(s.toDateString()!=n&&(n=new Date(n),n.setHours(s.getHours()),n.setMinutes(s.getMinutes()),n.setSeconds(s.getSeconds()),!1!==a.$.callComEvent(a,"beforeChange",{event:e,change:"start",to:n}))){var o=e.end.clone();e.end.addMilliseconds(e.end.getTime()-s.getTime()),e.start=n,a.display(),a.$.callComEvent(a,"change",{data:a.data,changes:[{event:e,changes:[{change:"start",from:s,to:e.start},{change:"end",from:o,to:e.end}]}]})}}},finish:function(){a.$.removeClass("event-dragging")}},t.isPlainObject(s.dragThenDrop)?s.dragThenDrop:null))}},h.prototype.getEvents=function(e,a){var n={},s=(this.calendars,function(t,e,a){var s=t.toDateString(),o=n[s];if(o||(o={maxPos:-1,events:{}}),"undefined"==typeof a)for(var i=0;i<100;++i)if(!o.events[i]){a=i;break}return o.maxPos=Math.max(a,o.maxPos),o.events[a]=e,n[s]=o,a});return t.each(this.events,function(n,o){if(o.start>=e&&o.start<=a){var i=s(o.start,o);if(o.days>1){var r=t.extend({placeholder:!0},o);c(o.start.clone().addDays(1),o.end,function(e,a){s(e.clone(),t.extend({holderPos:a},r),i)})}}}),n},t.fn.calendar=function(e){return this.each(function(){var n=t(this),o=n.data(a),i="object"==typeof e&&e;o||n.data(a,o=new h(this,i)),typeof e==s&&o[e]()})},t.fn.calendar.Constructor=h}(jQuery,window);
\ No newline at end of file
/*!
* ZUI: Chart.js - v1.10.0 - 2021-11-04
* ZUI: Chart.js - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: Chart.js - v1.10.0 - 2021-11-04
* ZUI: Chart.js - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*!
* Chart.js 1.0.2
......
......@@ -529,6 +529,7 @@ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
if(!(this.results_showing || this.is_disabled)) {
return this.results_show();
}
this.search_field.focus();
};
AbstractChosen.prototype.keyup_checker = function(evt) {
......@@ -998,8 +999,8 @@ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
return false;
}
that.results_showing = true;
that.search_field.focus();
that.search_field.val(that.search_field.val());
that.search_field.focus();
that.container.addClass("chosen-with-drop");
......
此差异已折叠。
/*!
* ZUI: 图标选择器 - v1.10.0 - 2021-11-04
* ZUI: 图标选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.chosen-container.chosen-icons .chosen-results {
......
/*!
* ZUI: 图标选择器 - v1.10.0 - 2021-11-04
* ZUI: 图标选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 图标选择器 - v1.10.0 - 2021-11-04
* ZUI: 图标选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.chosen-container.chosen-icons .chosen-results{padding:5px}.chosen-container.chosen-icons .chosen-results li{border-radius:4px}.chosen-container.chosen-icons .chosen-results li.group-result{padding:5px 0;font-size:12px;color:#666;border-radius:0}.chosen-container.chosen-icons .chosen-results li.group-option{display:inline-block!important;width:30px;padding:8px;font-size:14px;line-height:14px;text-align:center}
\ No newline at end of file
/*!
* ZUI: 图标选择器 - v1.10.0 - 2021-11-04
* ZUI: 图标选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
+function(o){"use strict";var e="zui.chosenIcons",t=function(e,n){this.$=o(e),this.options=this.getOptions(n),this.lang=t.LANGS[this.options.lang]||t.LANGS.en,this.id="chosen-icons-"+o.zui.uuid(),this.init()};t.DEFAULTS={optional:!0,lang:"zh_cn",icons:{common:["heart","user","group","list-ul","th","th-large","star","star-empty","search","envelope","dashboard","sitemap","umbrella","lightbulb","envelope-alt","cog","ok","remove","home","time","flag","flag-alt","flag-checkered","qrcode","tag","tags","book","bookmark","bookmark-empty","print","camera","picture","globe","map-marker","edit","edit-sign","play","stop","plus-sign","minus-sign","remove-sign","ok-sign","check-sign","question-sign","info-sign","exclamation-sign","plus","plus-sign","minus","minus-sign","asterisk","calendar","calendar-empty","comment","comment-alt","comments","comments-alt","folder-close","folder-open","folder-close-alt","folder-open-alt","thumbs-up","thumbs-down","pushpin","building","phone","rss","rss-sign","bullhorn","bell","bell-alt","certificate","wrench","tasks","cloud","beaker","magic","smile","frown","meh","code","location-arrow"],web:["share","pencil","trash","file-alt","file","file-text","download-alt","upload-alt","inbox","repeat","refresh","lock","check","check-empty","eye-open","eye-close","key","signin","signout","external-link","external-link-sign","link","reorder","quote-left","quote-right","spinner","reply","question","info","archive","collapse","collapse-top"],editor:["table","copy","save","list-ol","paste","keyboard","paper-clip","crop","unlink","sort-by-alphabet","sort-by-alphabet-alt","sort-by-attributes","sort-by-attributes-alt","sort-by-order","sort-by-order-alt"],directional:["chevron-left","chevron-right","chevron-down","chevron-up","arrow-left","arrow-right","arrow-down","arrow-up","hand-right","hand-left","hand-up","hand-down","circle-arrow-left","circle-arrow-right","circle-arrow-up","circle-arrow-down","double-angle-left","double-angle-right","double-angle-down","double-angle-up","angle-left","angle-right","angle-down","angle-up","long-arrow-left","long-arrow-right","long-arrow-down","long-arrow-up","caret-left","caret-right","caret-down","caret-up"],other:["desktop","laptop","tablet","mobile","building","firefox","ie","opera","qq","lemon","sign-blank","circle","circle-blank","terminal","html5","android","apple","windows","weibo","wechat","renren","bug","moon","sun"]}},t.LANGS={},t.LANGS.zh_cn={emptyIcon:"[没有图标]",commonIcons:"常用图标",webIcons:"Web 图标",editorIcons:"编辑器图标",directionalIcons:"箭头总汇",otherIcons:"其他图标"},t.LANGS.en={emptyIcon:"[No Icon]",commonIcons:"Common Icons",webIcons:"Web Icons",editorIcons:"Editor Icons",directionalIcons:"Directional Icons",otherIcons:"Other Icons"},t.LANGS.zh_tw={emptyIcon:"[沒有圖標]",commonIcons:"常用圖標",webIcons:"Web 圖標",editorIcons:"編輯器圖標",directionalIcons:"箭頭總匯",otherIcons:"其他圖標"},t.prototype.getOptions=function(e){return e=o.extend(!0,{placeholder_text:" ",disable_search:!0,width:"100%",inherit_select_classes:!0},t.DEFAULTS,this.$.data(),e)},t.prototype.init=function(){var e=this,t=this.$.addClass("chosen-icons").addClass(this.id).removeClass("form-control");t.empty(),this.options.optional&&t.append(this.getOptionHtml());var n=this.lang,i=[];o.each(this.options.icons,function(o,t){i.push(e.getgroupHtml(o,t))}),t.append(i.join("")),t.chosen(this.options);var s=".chosen-container."+this.id;t.on("chosen:showing_dropdown",function(){o(s+" .chosen-results .group-option").each(function(){var e=o(this).addClass("icon"),t=o(this).text();e.html('<i class="icon-'+t+'" title="'+t+'"></i>')})}).change(function(){var e=o(s+" .chosen-single > span"),t=o(this).val();t&&t.length>0?e.html('<i class="'+t+'"></i> &nbsp; <span class="text-muted">'+t.substr(5).replace(/-/g," ")+"</span>"):e.html('<span class="text-muted">'+n.emptyIcon+"</span>")});var r=t.data("value");r&&t.val(r).change()},t.prototype.getgroupHtml=function(e,t){t=t||this.options.icons[e];var n=[],i=this;return o.each(t,function(o,e){n.push(i.getOptionHtml(e))}),'<optgroup label="'+this.lang[e+"Icons"]+'">'+n.join("")+"</optgroup>"},t.prototype.getOptionHtml=function(o){var e=o;return o&&o.length>0?o="icon-"+o:(o="",e=this.lang.emptyIcon),'<option value="'+o+'">'+e+"</option>"},o.fn.chosenIcons=function(n){return this.each(function(){var i=o(this),s=i.data(e),r="object"==typeof n&&n;s||i.data(e,s=new t(this,r)),"string"==typeof n&&s[n]()})},o.fn.chosenIcons.Constructor=t}(jQuery);
\ No newline at end of file
/*!
* ZUI: 颜色选择器 - v1.10.0 - 2021-11-04
* ZUI: 颜色选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.colorpicker .dropdown-menu {
......
/*!
* ZUI: 颜色选择器 - v1.10.0 - 2021-11-04
* ZUI: 颜色选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 颜色选择器 - v1.10.0 - 2021-11-04
* ZUI: 颜色选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.colorpicker .dropdown-menu{min-width:0;padding:2px}.colorpicker .dropdown-menu>li{display:block;float:left;padding:2px}.colorpicker .dropdown-menu>li>a{position:relative;display:block;width:100%;height:100%;padding:0;font-family:ZenIcon;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:4px;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.colorpicker .dropdown-menu>li>a:before{position:absolute;top:50%;display:block;width:100%;height:20px;margin-top:-8px}.colorpicker .dropdown-menu>li>a:hover{border-color:#333;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.25);box-shadow:0 1px 4px rgba(0,0,0,.25)}.colorpicker .dropdown-menu>li>a.active:before{content:'\e60d'}.colorpicker .dropdown-menu>li>a.empty{color:#666;background:#f2f2f2}.colorpicker .dropdown-menu>li>a.empty:before{content:'\d7'}.colorpicker .btn{text-shadow:none}.colorpicker .btn .cp-title{display:inline-block;margin-right:5px}.colorpicker.btn-wrapper{position:relative;display:inline-block}
\ No newline at end of file
/*!
* ZUI: 颜色选择器 - v1.10.0 - 2021-11-04
* ZUI: 颜色选择器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(t){"use strict";var o="zui.colorPicker",i='<div class="colorpicker"><button type="button" class="btn dropdown-toggle" data-toggle="dropdown"><span class="cp-title"></span><i class="ic"></i></button><ul class="dropdown-menu clearfix"></ul></div>',e={zh_cn:{errorTip:"不是有效的颜色值"},zh_tw:{errorTip:"不是有效的顏色值"},en:{errorTip:"Not a valid color value"}},r=function(i,e){this.name=o,this.$=t(i),this.getOptions(e),this.init()};r.prototype.init=function(){var o=this,e=o.options,r=o.$,a=r.parent(),n=!1;a.hasClass("colorpicker")?o.$picker=a:(o.$picker=t(e.template||i),n=!0),o.$picker.addClass(e.wrapper).find(".cp-title").toggle(void 0!==e.title).text(e.title),o.$menu=o.$picker.find(".dropdown-menu").toggleClass("pull-right",e.pullMenuRight),o.$btn=o.$picker.find(".btn.dropdown-toggle"),o.$btn.find(".ic").addClass("icon-"+e.icon),e.btnTip&&o.$picker.attr("data-toggle","tooltip").tooltip({title:e.btnTip,placement:e.tooltip,container:"body"}),r.attr("data-provide",null),n&&r.after(o.$picker),o.colors={},t.each(e.colors,function(i,e){if(t.zui.Color.isColor(e)){var r=new t.zui.Color(e);o.colors[r.toCssStr()]=r}}),o.updateColors(),o.$picker.on("click",".cp-tile",function(){o.setValue(t(this).data("color"))});var l=function(){var i=r.val(),a=t.zui.Color.isColor(i);r.parent().toggleClass("has-error",!(a||e.optional&&""===i)),a?o.setValue(i,!0):e.optional&&""===i?r.tooltip("hide"):r.is(":focus")||r.tooltip("show",e.errorTip)};r.is("input:not([type=hidden])")?(e.tooltip&&r.attr("data-toggle","tooltip").tooltip({trigger:"manual",placement:e.tooltip,tipClass:"tooltip-danger",container:"body"}),r.on("keyup paste input change",l)):r.appendTo(o.$picker),l()},r.prototype.addColor=function(o){o instanceof t.zui.Color||(o=new t.zui.Color(o));var i=o.toCssStr(),e=this.options;this.colors[i]||(this.colors[i]=o);var r=t('<a href="###" class="cp-tile"></a>',{titile:o}).data("color",o).css({color:o.contrast().toCssStr(),background:i,"border-color":o.luma()>.43?"#ccc":"transparent"}).attr("data-color",i);this.$menu.append(t("<li/>").css({width:e.tileSize,height:e.tileSize}).append(r)),e.optional&&this.$menu.find(".cp-tile.empty").parent().detach().appendTo(this.$menu)},r.prototype.updateColors=function(o){var i=this.$menu,e=this.options,o=o||this.colors,r=this,a=0;if(i.children("li:not(.heading)").remove(),t.each(o,function(t,o){r.addColor(o),a++}),e.optional){var n=t('<li><a class="cp-tile empty" href="###"></a></li>').css({width:e.tileSize,height:e.tileSize});this.$menu.append(n),a++}i.css("width",Math.min(a,e.lineCount)*e.tileSize+6)},r.prototype.setValue=function(o,i){var e=this,r=e.options,a=e.$btn,n="";e.$menu.find(".cp-tile.active").removeClass("active");var l=r.updateBtn;if("auto"===l){var c=a.find(".color-bar");l=!c.length||function(t){c.css("background",t||"")}}if(o){var p=new t.zui.Color(o);n=p.toCssStr().toLowerCase(),l&&("function"==typeof l?l(n,a,e):a.css({background:n,color:p.contrast().toCssStr(),borderColor:p.luma()>.43?"#ccc":n})),e.colors[n]||e.addColor(p),i||e.$.val().toLowerCase()===n||e.$.val(n).trigger("change"),e.$menu.find('.cp-tile[data-color="'+n+'"]').addClass("active"),e.$.tooltip("hide"),e.$.trigger("colorchange",p)}else l&&("function"==typeof l?l(null,a,e):a.attr("style",null)),i||""===e.$.val()||e.$.val(n).trigger("change"),r.optional&&e.$.tooltip("hide"),e.$menu.find(".cp-tile.empty").addClass("active"),e.$.trigger("colorchange",null);r.updateBorder&&t(r.updateBorder).css("border-color",n),r.updateBackground&&t(r.updateBackground).css("background-color",n),r.updateColor&&t(r.updateColor).css("color",n),r.updateText&&t(r.updateText).text(n)},r.prototype.getOptions=function(i){var a=t.extend({},r.DEFAULTS,this.$.data(),i);"string"==typeof a.colors&&(a.colors=a.colors.split(","));var n=a.lang||t.zui.clientLang(),l=this.lang=t.zui.getLangData?t.zui.getLangData(o,n,e):e[n]||e.en;a.errorTip||(a.errorTip=l.errorTip),t.fn.tooltip||(a.btnTip=!1),this.options=a},r.DEFAULTS={colors:["#00BCD4","#388E3C","#3280fc","#3F51B5","#9C27B0","#795548","#F57C00","#F44336","#E91E63"],pullMenuRight:!0,wrapper:"btn-wrapper",tileSize:30,lineCount:5,optional:!0,tooltip:"top",icon:"caret-down",updateBtn:"auto"},r.LANG=e,t.fn.colorPicker=function(o){return this.each(function(){var i=t(this),e=i.data(name),a="object"==typeof o&&o;e||i.data(name,e=new r(this,a)),"string"==typeof o&&e[o]()})},t.fn.colorPicker.Constructor=r,t(function(){t('[data-provide="colorpicker"]').colorPicker()})}(jQuery);
\ No newline at end of file
/*!
* ZUI: JS配色表 - v1.10.0 - 2021-11-04
* ZUI: JS配色表 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*!
* ZUI: Generated from less code - v1.10.0 - 2021-11-04
* ZUI: Generated from less code - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
(function($) {
......
/*!
* ZUI: JS配色表 - v1.10.0 - 2021-11-04
* ZUI: JS配色表 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*!
* ZUI: Generated from less code - v1.10.0 - 2021-11-04
* ZUI: Generated from less code - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(e){"use strict";var f=0,r=["primary","red","yellow","green","blue","purple","brown","dark"],a={primary:"#3280fc",secondary:"#145ccd",pale:"#ebf2f9",fore:"#353535",back:"#fff",grayDarker:"#222222",grayDark:"#333333",gray:"#808080",grayLight:"#dddddd",grayLighter:"#e5e5e5",grayPale:"#f1f1f1",white:"#fff",black:"#000",red:"#ea644a",yellow:"#f1a325",green:"#38b03f",blue:"#03b8cf",purple:"#8666b8",brown:"#bd7b46",greenPale:"#ddf4df",yellowPale:"#fff0d5",redPale:"#ffe5e0",bluePale:"#ddf3f5",brownPale:"#f7ebe1",purplePale:"#f5eeff",light:"#fff",dark:"#353535",success:"#38b03f",warning:"#f1a325",danger:"#ea644a",info:"#03b8cf",important:"#bd7b46",special:"#8666b8",successPale:"#ddf4df",warningPale:"#fff0d5",dangerPale:"#ffe5e0",infoPale:"#ddf3f5",importantPale:"#f7ebe1",specialPale:"#f5eeff"};a.get=function(l){"undefined"!=typeof l&&"random"!==l||(l=r[f++%r.length]);var d=a[l]?a[l]:l;return e.zui.Color?new e.zui.Color(d):d},e.zui({colorset:a}),e.zui.Color&&e.extend(e.zui.Color,a)}(jQuery);
\ No newline at end of file
/*!
* ZUI: 右键菜单 - v1.10.0 - 2021-11-04
* ZUI: 右键菜单 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......@@ -33,7 +33,7 @@
menuTemplate: '<ul class="dropdown-menu"></ul>',
toggleTrigger: false,
duration: 200,
limitInsideWindow: true
// maxMenuHeight: null,
};
var isShowingMenu = false;
......@@ -47,7 +47,8 @@
});
return ContextMenu;
};
var createMenuItem = function(item, index) {
function createMenuItem(item, index) {
if (typeof item === 'string') {
if (item === 'seperator' || item === 'divider' || item === '-' || item === '|') {
item = {type: 'seperator'};
......@@ -78,8 +79,39 @@
if (item.onClick) {
$a.on('click', item.onClick);
}
return $('<li />').toggleClass('disabled', item.disabled === true).append($a);
};
var $item = $('<li />')
.toggleClass('disabled', item.disabled === true)
.append($a);
if (item.items) {
$item.data('item', item).addClass('dropdown-submenu');
}
return $item;
}
/**
* Create context menu item list
* @param {Object[]} items Context menu item
* @param {JQuery} $list Context menu item list element
* @param {{itemCreator: function(Object, number, Object)}} options Context menu options
* @returns {boolean} Return true if successfully
*/
function createMenuItems(items, $list, options) {
var itemCreator = options.itemCreator || createMenuItem;
var itemsType = typeof items;
if (itemsType === 'string') {
items = items.split(',');
} else if (itemsType === 'function') {
items = items(options);
}
if (!items) {
return false;
}
$.each(items, function(index, item) {
$list.append(itemCreator(item, index, options));
});
return true;
}
var isContextMenuShow = function(id) {
var $target = $('#' + targetId);
......@@ -136,13 +168,45 @@
if (!$target.length) {
$target = $('<div style="position: fixed; z-index: 2000;" class="contextmenu" id="' + targetId + '"><div class="contextmenu-menu"></div></div>').appendTo('body');
}
var $menu = $target.find('.contextmenu-menu').off('click.' + NAME).on('click.' + NAME, 'a,.contextmenu-item', function(e) {
var $menu = $target.find('.contextmenu-menu').empty();
$menu.off('click.' + NAME).on('click.' + NAME, 'a,.contextmenu-item', function(e) {
var $item = $(this);
var clickResult = options.onClickItem && options.onClickItem($item.data('item'), $item, e, options);
if (clickResult !== false) {
hideContextMenu();
}
}).empty();
}).off('mouseenter.' + NAME).on('mouseenter.' + NAME, '.dropdown-submenu', function(e) {
var $item = $(this);
var item = $item.data('item');
var $subMenu = $item.children('.dropdown-menu');
if(item) {
if (item.items) {
if(!$subMenu.length) {
$subMenu = $(options.menuTemplate).appendTo($item);
}
createMenuItems(item.items, $subMenu, options);
}
$item.removeData('item');
}
if (!$subMenu.length) {
return;
}
// Adjust submenu position
$subMenu.removeClass('pull-left').css('top', 0);
var itemBounding = $item[0].getBoundingClientRect();
var menuBounding = $subMenu[0].getBoundingClientRect();
var winWidth = window.innerWidth;
var winHeight = window.innerHeight;
if (menuBounding.bottom > winHeight) {
var subMenuTop = Math.max(-menuBounding.top, winHeight - menuBounding.bottom);
$subMenu.css('top', subMenuTop);
}
if (menuBounding.right > winWidth) {
$subMenu.addClass('pull-left');
}
});
$menu.attr('class', 'contextmenu-menu' + (options.className ? (' ' + options.className) : ''))
$target.attr('class', 'contextmenu contextmenu-show');
......@@ -153,19 +217,8 @@
} else {
$menu.append(options.menuTemplate);
var $menuList = $menu.children().first();
var itemCreator = options.itemCreator || createMenuItem;
var itemsType = typeof items;
if (itemsType === 'string') {
items = items.split(',');
} else if (itemsType === 'function') {
items = items(options);
}
if (!items) {
return false;
}
$.each(items, function(index, item) {
$menuList.append(itemCreator(item, index, options));
});
var result = createMenuItems(items, $menuList, options);
if (result === false) return result;
}
// Show menu
......@@ -197,21 +250,24 @@
if (x === undefined) x = mouseX;
if (y === undefined) y = (options.event || options).clientY;
if (y === undefined) y = mouseY;
var winHeight = window.innerHeight;
var winWidth = window.innerWidth;
// var maxMenuHeight = options.maxMenuHeight;
// if (typeof maxMenuHeight !== 'number') maxMenuHeight = winHeight;
// else winHeight = Math.min(winHeight, maxMenuHeight);
var $menuList = $menu.children().first();
// $menuList.css({maxHeight: maxMenuHeight, overflowY: 'auto', margin: 0});
var menuWidth = $menuList.outerWidth();
var menuHeight = $menuList.outerHeight();
if (options.position) {
var newPos = options.position({x: x, y: y, width: menuWidth, height: menuHeight}, options, $menu);
var newPos = options.position({x: x, y: y, width: menuWidth, height: menuHeight, winHeight: winHeight, winWidth: winWidth}, options, $menu);
if (newPos) {
x = newPos.x;
y = newPos.y;
}
}
if (options.limitInsideWindow) {
var $w = $(window);
x = Math.max(0, Math.min(x, $w.width() - menuWidth));
y = Math.max(0, Math.min(y, $w.height() - menuHeight));
}
x = Math.max(0, Math.min(x, winWidth - menuWidth));
y = Math.max(0, Math.min(y, winHeight - menuHeight));
$target.css({
left: x,
......@@ -222,12 +278,10 @@
if (animation) {
$menu.addClass(animation);
animationTimer = setTimeout(function() {
// $menu.show();
afterShow();
isShowingMenu = false;
}, 10);
} else {
// $menu.show();
afterShow();
isShowingMenu = false;
}
......
/*!
* ZUI: 右键菜单 - v1.10.0 - 2021-11-04
* ZUI: 右键菜单 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(t,e){"use strict";var n="zui.contextmenu",o={animation:"fade",menuTemplate:'<ul class="dropdown-menu"></ul>',toggleTrigger:!1,duration:200,limitInsideWindow:!0},i=!1,r={},a="zui-contextmenu-"+t.zui.uuid(),s=0,u=0,l=function(){return t(document).off("mousemove."+n).on("mousemove."+n,function(t){s=t.clientX,u=t.clientY}),r},d=function(e,n){if("string"==typeof e&&(e="seperator"===e||"divider"===e||"-"===e||"|"===e?{type:"seperator"}:{label:e,id:n}),"seperator"===e.type||"divider"===e.type)return t('<li class="divider"></li>');var o=t("<a/>").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);return e.html?e.html===!0?o.html(e.label||e.text):o=t(e.html):o.text(e.label||e.text),e.icon&&o.prepend('<i class="icon icon-'+e.icon+'"></i>'),e.onClick&&o.on("click",e.onClick),t("<li />").toggleClass("disabled",e.disabled===!0).append(o)},c=function(e){var n=t("#"+a);return n.length&&n.hasClass("contextmenu-show")&&(!e||(n.data("options")||{}).id===e)},h=null,m=function(e,n){"function"==typeof e&&(n=e,e=null),h&&(clearTimeout(h),h=null);var o=t("#"+a);if(o.length){var i=o.removeClass("contextmenu-show").data("options");if(!e||i.id===e){var s=function(){o.find(".contextmenu-menu").removeClass("open"),i.onHidden&&i.onHidden(),n&&n()};i.onHide&&i.onHide();var u=i.animation;o.find(".contextmenu-menu").removeClass("in"),u?h=setTimeout(s,i.duration):s()}}return r},f=function(l,c,f){t.isPlainObject(l)&&(f=c,c=l,l=c.items),i=!0,c=t.extend({},o,c);var p=t("#"+a);p.length||(p=t('<div style="position: fixed; z-index: 2000;" class="contextmenu" id="'+a+'"><div class="contextmenu-menu"></div></div>').appendTo("body"));var g=p.find(".contextmenu-menu").off("click."+n).on("click."+n,"a,.contextmenu-item",function(e){var n=t(this),o=c.onClickItem&&c.onClickItem(n.data("item"),n,e,c);o!==!1&&m()}).empty();g.attr("class","contextmenu-menu"+(c.className?" "+c.className:"")),p.attr("class","contextmenu contextmenu-show");var v=c.menuCreator;if(v)g.append(v(l,c));else{g.append(c.menuTemplate);var x=g.children().first(),w=c.itemCreator||d,y=typeof l;if("string"===y?l=l.split(","):"function"===y&&(l=l(c)),!l)return!1;t.each(l,function(t,e){x.append(w(e,t,c))})}var C=c.animation,b=c.duration;C===!0&&(c.animation=C="fade"),h&&(clearTimeout(h),h=null);var T=function(){g.addClass("in"),c.onShown&&c.onShown(),f&&f()};c.onShow&&c.onShow(),p.data("options",{animation:C,onHide:c.onHide,onHidden:c.onHidden,id:c.id,duration:b});var M=c.x,k=c.y;M===e&&(M=(c.event||c).clientX),M===e&&(M=s),k===e&&(k=(c.event||c).clientY),k===e&&(k=u);var x=g.children().first(),$=x.outerWidth(),H=x.outerHeight();if(c.position){var S=c.position({x:M,y:k,width:$,height:H},c,g);S&&(M=S.x,k=S.y)}if(c.limitInsideWindow){var z=t(window);M=Math.max(0,Math.min(M,z.width()-$)),k=Math.max(0,Math.min(k,z.height()-H))}return p.css({left:M,top:k}).show(),g.addClass("open"),C?(g.addClass(C),h=setTimeout(function(){T(),i=!1},10)):(T(),i=!1),r};t.extend(r,{NAME:n,DEFAULTS:o,show:f,hide:m,listenMouse:l,isShow:c}),t.zui({ContextMenu:r});var p=function(e,o){var i=this;i.name=n,i.$=t(e),i.id=t.zui.uuid(),o=i.options=t.extend({trigger:"contextmenu"},r.DEFAULTS,this.$.data(),o);var a=function(t){if("mousedown"!==t.type||2===t.button){if(o.toggleTrigger&&i.isShow())i.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(i.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},s=o.trigger,u=s+"."+n;o.selector?i.$.on(u,o.selector,a):i.$.on(u,a),o.show&&i.show("object"==typeof o.show?o.show:null)};p.prototype.destory=function(){that.$.off("."+n)},p.prototype.hide=function(t){return r.hide(this.id,t)},p.prototype.show=function(e,n){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),r.show(e,n)},p.prototype.isShow=function(){return c(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var o=t(this),i=o.data(n),r="object"==typeof e&&e;i||o.data(n,i=new p(this,r)),"string"==typeof e&&i[e]()})},t.fn.contextmenu.Constructor=p,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,n){var o=n.$toggle,i=o.attr("data-target");i||(i=o.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var r=i?t(i):o.next(".dropdown-menu"),a=n.transferEvent;if(a!==!1){var s="data-contextmenu-index";r.find("a,.contextmenu-item").each(function(e){t(this).attr(s,e)});var u=r.clone();return u.on("string"==typeof a?a:"click","a,.contextmenu-item",function(e){var n=r.find("["+s+'="'+t(this).attr(s)+'"]'),o=n[0];if(o)return o[e.type]?o[e.type]():n.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),u}return r.clone()},position:function(t,e,n){var o=e.placement,i=e.$toggle;if(!o){var r=n.find(".dropdown-menu"),a=r.hasClass("pull-right"),s=i.parent().hasClass("dropup");o=a?s?"top-right":"bottom-right":s?"top-left":"bottom-left",a&&r.removeClass("pull-right")}var u=i[0].getBoundingClientRect();switch(o){case"top-left":return{x:u.left,y:Math.floor(u.top-t.height)};case"top-right":return{x:Math.floor(u.right-t.width),y:Math.floor(u.top-t.height)};case"bottom-left":return{x:u.left,y:u.bottom};case"bottom-right":return{x:Math.floor(u.right-t.width),y:u.bottom}}return t}},e))},t(document).on("click",function(e){var o=t(e.target),r=o.closest('[data-toggle="context-dropdown"]');if(r.length){var a=r.data(n);a||r.contextDropdown({show:!0})}else i||o.closest(".contextmenu").length||m()})}(jQuery,void 0);
\ No newline at end of file
!function(t,e){"use strict";function n(e,n){if("string"==typeof e&&(e="seperator"===e||"divider"===e||"-"===e||"|"===e?{type:"seperator"}:{label:e,id:n}),"seperator"===e.type||"divider"===e.type)return t('<li class="divider"></li>');var o=t("<a/>").attr(t.extend({href:e.url||"###","class":e.className,style:e.style},e.attrs)).data("item",e);e.html?e.html===!0?o.html(e.label||e.text):o=t(e.html):o.text(e.label||e.text),e.icon&&o.prepend('<i class="icon icon-'+e.icon+'"></i>'),e.onClick&&o.on("click",e.onClick);var i=t("<li />").toggleClass("disabled",e.disabled===!0).append(o);return e.items&&i.data("item",e).addClass("dropdown-submenu"),i}function o(e,o,i){var r=i.itemCreator||n,a=typeof e;return"string"===a?e=e.split(","):"function"===a&&(e=e(i)),!!e&&(t.each(e,function(t,e){o.append(r(e,t,i))}),!0)}var i="zui.contextmenu",r={animation:"fade",menuTemplate:'<ul class="dropdown-menu"></ul>',toggleTrigger:!1,duration:200},a=!1,s={},u="zui-contextmenu-"+t.zui.uuid(),d=0,l=0,c=function(){return t(document).off("mousemove."+i).on("mousemove."+i,function(t){d=t.clientX,l=t.clientY}),s},m=function(e){var n=t("#"+u);return n.length&&n.hasClass("contextmenu-show")&&(!e||(n.data("options")||{}).id===e)},h=null,f=function(e,n){"function"==typeof e&&(n=e,e=null),h&&(clearTimeout(h),h=null);var o=t("#"+u);if(o.length){var i=o.removeClass("contextmenu-show").data("options");if(!e||i.id===e){var r=function(){o.find(".contextmenu-menu").removeClass("open"),i.onHidden&&i.onHidden(),n&&n()};i.onHide&&i.onHide();var a=i.animation;o.find(".contextmenu-menu").removeClass("in"),a?h=setTimeout(r,i.duration):r()}}return s},p=function(n,c,m){t.isPlainObject(n)&&(m=c,c=n,n=c.items),a=!0,c=t.extend({},r,c);var p=t("#"+u);p.length||(p=t('<div style="position: fixed; z-index: 2000;" class="contextmenu" id="'+u+'"><div class="contextmenu-menu"></div></div>').appendTo("body"));var g=p.find(".contextmenu-menu").empty();g.off("click."+i).on("click."+i,"a,.contextmenu-item",function(e){var n=t(this),o=c.onClickItem&&c.onClickItem(n.data("item"),n,e,c);o!==!1&&f()}).off("mouseenter."+i).on("mouseenter."+i,".dropdown-submenu",function(e){var n=t(this),i=n.data("item"),r=n.children(".dropdown-menu");if(i&&(i.items&&(r.length||(r=t(c.menuTemplate).appendTo(n)),o(i.items,r,c)),n.removeData("item")),r.length){r.removeClass("pull-left").css("top",0);var a=(n[0].getBoundingClientRect(),r[0].getBoundingClientRect()),s=window.innerWidth,u=window.innerHeight;if(a.bottom>u){var d=Math.max(-a.top,u-a.bottom);r.css("top",d)}a.right>s&&r.addClass("pull-left")}}),g.attr("class","contextmenu-menu"+(c.className?" "+c.className:"")),p.attr("class","contextmenu contextmenu-show");var v=c.menuCreator;if(v)g.append(v(n,c));else{g.append(c.menuTemplate);var x=g.children().first(),w=o(n,x,c);if(w===!1)return w}var y=c.animation,C=c.duration;y===!0&&(c.animation=y="fade"),h&&(clearTimeout(h),h=null);var b=function(){g.addClass("in"),c.onShown&&c.onShown(),m&&m()};c.onShow&&c.onShow(),p.data("options",{animation:y,onHide:c.onHide,onHidden:c.onHidden,id:c.id,duration:C});var T=c.x,H=c.y;T===e&&(T=(c.event||c).clientX),T===e&&(T=d),H===e&&(H=(c.event||c).clientY),H===e&&(H=l);var M=window.innerHeight,k=window.innerWidth,x=g.children().first(),$=x.outerWidth(),S=x.outerHeight();if(c.position){var D=c.position({x:T,y:H,width:$,height:S,winHeight:M,winWidth:k},c,g);D&&(T=D.x,H=D.y)}return T=Math.max(0,Math.min(T,k-$)),H=Math.max(0,Math.min(H,M-S)),p.css({left:T,top:H}).show(),g.addClass("open"),y?(g.addClass(y),h=setTimeout(function(){b(),a=!1},10)):(b(),a=!1),s};t.extend(s,{NAME:i,DEFAULTS:r,show:p,hide:f,listenMouse:c,isShow:m}),t.zui({ContextMenu:s});var g=function(e,n){var o=this;o.name=i,o.$=t(e),o.id=t.zui.uuid(),n=o.options=t.extend({trigger:"contextmenu"},s.DEFAULTS,this.$.data(),n);var r=function(t){if("mousedown"!==t.type||2===t.button){if(n.toggleTrigger&&o.isShow())o.hide();else{var e={x:t.clientX,y:t.clientY,event:t};if(o.show(e)===!1)return}return t.preventDefault(),t.returnValue=!1,!1}},a=n.trigger,u=a+"."+i;n.selector?o.$.on(u,n.selector,r):o.$.on(u,r),n.show&&o.show("object"==typeof n.show?n.show:null)};g.prototype.destory=function(){that.$.off("."+i)},g.prototype.hide=function(t){return s.hide(this.id,t)},g.prototype.show=function(e,n){return e=t.extend({id:this.id,$toggle:this.$},this.options,e),s.show(e,n)},g.prototype.isShow=function(){return m(this.id)},t.fn.contextmenu=function(e){return this.each(function(){var n=t(this),o=n.data(i),r="object"==typeof e&&e;o||n.data(i,o=new g(this,r)),"string"==typeof e&&o[e]()})},t.fn.contextmenu.Constructor=g,t.fn.contextDropdown=function(e){t(this).contextmenu(t.extend({trigger:"click",animation:"fade",toggleTrigger:!0,menuCreator:function(e,n){var o=n.$toggle,i=o.attr("data-target");i||(i=o.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var r=i?t(i):o.next(".dropdown-menu"),a=n.transferEvent;if(a!==!1){var s="data-contextmenu-index";r.find("a,.contextmenu-item").each(function(e){t(this).attr(s,e)});var u=r.clone();return u.on("string"==typeof a?a:"click","a,.contextmenu-item",function(e){var n=r.find("["+s+'="'+t(this).attr(s)+'"]'),o=n[0];if(o)return o[e.type]?o[e.type]():n.trigger(e.type),e.preventDefault(),e.stopPropagation(),!1}),u}return r.clone()},position:function(t,e,n){var o=e.placement,i=e.$toggle;if(!o){var r=n.find(".dropdown-menu"),a=r.hasClass("pull-right"),s=i.parent().hasClass("dropup");o=a?s?"top-right":"bottom-right":s?"top-left":"bottom-left",a&&r.removeClass("pull-right")}var u=i[0].getBoundingClientRect();switch(o){case"top-left":return{x:u.left,y:Math.floor(u.top-t.height)};case"top-right":return{x:Math.floor(u.right-t.width),y:Math.floor(u.top-t.height)};case"bottom-left":return{x:u.left,y:u.bottom};case"bottom-right":return{x:Math.floor(u.right-t.width),y:u.bottom}}return t}},e))},t(document).on("click",function(e){var n=t(e.target),o=n.closest('[data-toggle="context-dropdown"]');if(o.length){var r=o.data(i);r||o.contextDropdown({show:!0})}else a||n.closest(".contextmenu").length||f()})}(jQuery,void 0);
\ No newline at end of file
/*!
* ZUI: 仪表盘 - v1.10.0 - 2021-11-04
* ZUI: 仪表盘 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.dashboard {
......
/*!
* ZUI: 仪表盘 - v1.10.0 - 2021-11-04
* ZUI: 仪表盘 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 仪表盘 - v1.10.0 - 2021-11-04
* ZUI: 仪表盘 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.dashboard{position:relative}.dashboard .panel{position:relative}.dashboard .panel-actions{position:absolute;top:0;right:0}.dashboard .panel-actions .dropdown-menu{min-width:80px}.dashboard .panel-actions .dropdown-menu>li>a{padding:3px 10px}.dashboard .panel-actions>.dropdown>a,.dashboard .panel-actions>a{color:grey;text-decoration:none!important}.dashboard .panel-actions>.btn,.dashboard .panel-actions>.dropdown,.dashboard .panel-actions>a{display:block;float:left}.dashboard .panel-actions>.btn,.dashboard .panel-actions>.dropdown>.btn,.dashboard .panel-actions>.dropdown>a,.dashboard .panel-actions>a{display:block;min-width:28px;height:31px;padding:0 3px;line-height:30px;text-align:center;filter:alpha(opacity=70);border:none;border-radius:0;opacity:.7}.dashboard .panel-actions>.dropdown>a:hover,.dashboard .panel-actions>a:hover{background-color:rgba(0,0,0,.1)}.dashboard .panel-heading{height:32px;padding:6px 60px 6px 6px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.dashboard .panel-heading>.icon{filter:alpha(opacity=70);opacity:.7}.dashboard .panel-heading:hover>.panel-actions>.btn,.dashboard .panel-heading:hover>.panel-actions>.dropdown>.btn,.dashboard .panel-heading:hover>.panel-actions>.dropdown>a,.dashboard .panel-heading:hover>.panel-actions>a{filter:alpha(opacity=100);opacity:1}.dashboard .panel-body{position:absolute;top:32px;right:0;bottom:0;left:0;padding:10px;overflow:auto}.dashboard .panel-body.no-padding{padding:0}.dashboard .panel-body>:last-child{margin:0}.dashboard .panel-body>.list-group .list-group-item{border-right:none;border-left:none;border-radius:0}.dashboard .panel-body>.list-group .list-group-item:first-child{border-top:none}.dashboard.dashboard-draggable .panel-heading{cursor:move}.dashboard .panel-dragging{color:#fff;background:rgba(0,0,0,.1);border:1px solid #fff;-webkit-box-shadow:none!important;box-shadow:none!important}.dashboard .panel-dragging>*{filter:alpha(opacity=10);opacity:.1}.dashboard .panel-dragging-shadow{position:absolute;cursor:move;background:rgba(255,255,255,.5);border:2px solid rgba(255,255,255,.9);-webkit-box-shadow:1px 5px 15px rgba(0,0,0,.5)!important;box-shadow:1px 5px 15px rgba(0,0,0,.5)!important}.dashboard .panel-dragging-shadow>*{filter:alpha(opacity=70);opacity:.7}.dashboard .panel-dragging-shadow.circle{overflow:hidden;border-radius:50%;-webkit-transition:width .2s,height .2s;-o-transition:width .2s,height .2s;transition:width .2s,height .2s}.dashboard .panel-dragging-shadow.circle .panel-actions{display:none}.dashboard .dragging-col-holder{display:none}.dashboard.dashboard-holding .dragging-col-holder{display:block}.dashboard.dashboard-holding .dragging-col{display:none}.dashboard .resize-handle{position:absolute;top:0;right:4px;bottom:20px;width:12px;cursor:e-resize;filter:alpha(opacity=0);border-radius:4px;opacity:0;-webkit-transition:opacity .4s cubic-bezier(.175,.885,.32,1);-o-transition:opacity .4s cubic-bezier(.175,.885,.32,1);transition:opacity .4s cubic-bezier(.175,.885,.32,1)}.dashboard .resize-handle>.icon{position:absolute;top:50%;left:0;display:block;width:20px;height:20px;margin-top:-10px;line-height:20px;color:#3280fc;text-align:center;background-color:rgba(50,128,252,.2);-webkit-transition:left .4s cubic-bezier(.175,.885,.32,1),top .4s cubic-bezier(.175,.885,.32,1);-o-transition:left .4s cubic-bezier(.175,.885,.32,1),top .4s cubic-bezier(.175,.885,.32,1);transition:left .4s cubic-bezier(.175,.885,.32,1),top .4s cubic-bezier(.175,.885,.32,1)}.dashboard .resize-handle:hover{background-color:rgba(50,128,252,.12);filter:alpha(opacity=100);opacity:1}.dashboard .resize-handle:hover>.icon{left:-4px}.dashboard .resize-handle.resize-vertical{top:auto;right:10px;bottom:14px;left:10px;width:auto;height:12px;cursor:n-resize}.dashboard .resize-handle.resize-vertical>.icon{top:0;left:50%;margin-top:0;margin-left:-10px}.dashboard .resize-handle.resize-vertical:hover{background-color:rgba(50,128,252,.12);filter:alpha(opacity=100);opacity:1}.dashboard .resize-handle.resize-vertical:hover>.icon{top:-4px}.dashboard .resizing{-webkit-transition:width .2s cubic-bezier(.175,.885,.32,1);-o-transition:width .2s cubic-bezier(.175,.885,.32,1);transition:width .2s cubic-bezier(.175,.885,.32,1)}.dashboard .resizing-v .resize-vertical{opacity:1}.dashboard .resizing-v .resize-vertical>.icon{top:-4px}.dashboard .resizing-h .resize-horizontal{opacity:1}.dashboard .resizing-h .resize-horizontal>.icon{left:-4px}.dashboard .resizing .resize-handle{background-color:rgba(50,128,252,.12)}.dashboard .panel-body:after,.dashboard .panel-body:before{display:block;visibility:hidden;content:' ';opacity:0;-webkit-transition:visibility .2s,opacity .2s;-o-transition:visibility .2s,opacity .2s;transition:visibility .2s,opacity .2s}.dashboard .panel-body:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#fff}.dashboard .panel-body:after{position:absolute;top:50%;left:50%;width:40px;height:40px;margin-top:-20px;margin-left:-20px;font-family:ZenIcon;font-size:14px;font-size:28px;font-style:normal;font-weight:400;font-variant:normal;line-height:1;line-height:40px;text-align:center;text-transform:none;content:'\e97c';-webkit-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.dashboard .panel-loading>.panel-body{overflow:hidden}.dashboard .panel-loading>.panel-body:after,.dashboard .panel-loading>.panel-body:before{visibility:visible;opacity:.5}.dashboard-inverse{background-color:#3280fc}.dashboard-inverse .panel{-webkit-box-shadow:0 1px 5px rgba(0,0,0,.15);box-shadow:0 1px 5px rgba(0,0,0,.15)}.dashboard-inverse .panel-dragging{background:rgba(0,0,0,.3)}.dashboard-inverse .panel-dragging-shadow{-webkit-box-shadow:1px 2px 15px rgba(0,0,0,.5)!important;box-shadow:1px 2px 15px rgba(0,0,0,.5)!important}
\ No newline at end of file
/*!
* ZUI: 仪表盘 - v1.10.0 - 2021-11-04
* ZUI: 仪表盘 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(e,a,t){"use strict";function i(e,t,i,n){return a.abs((i-e)*(n-t))}function n(e,a,t,i,n,o){return e>=t&&e<=n&&a>=i&&a<=o}function o(e,t,o,r,s,d,l,h){var g=a.max(e,s),p=a.max(t,d),c=a.min(o,l),f=a.min(r,h);return n(g,p,e,t,o,r)&&n(c,f,e,t,o,r)&&n(g,p,s,d,l,h)&&n(c,f,s,d,l,h)?i(g,p,c,f):0}var r=e.zui.Messager?new e.zui.Messager({placement:"top",time:1500,close:0,scale:!1,fade:!1}):0,s=function(a,t){this.$=e(a),this.options=this.getOptions(t),this.draggable=this.$.hasClass("dashboard-draggable")||this.options.draggable,this.init()};s.DEFAULTS={minHeight:100,height:360,shadowType:"normal",sensitive:!1,circleShadowSize:100,onlyRefreshBody:!0,resizable:!0,resizeMessage:!1},s.prototype.getOptions=function(a){return a=e.extend({},s.DEFAULTS,this.$.data(),a)},s.prototype.handleRemoveEvent=function(){var a=this.options.afterPanelRemoved,i=this.options.panelRemovingTip;this.$.on("click",".remove-panel",function(){var n=e(this).closest(".panel"),o=n.data("name")||n.find(".panel-heading").text().replace("\n","").replace(/(^\s*)|(\s*$)/g,""),r=n.attr("data-id");(i===t||i===!1||confirm(i.format(o)))&&(n.parent().remove(),a&&"function"==typeof a&&a(r))})},s.prototype.handleRefreshEvent=function(){var a=this,t=this.options.onlyRefreshBody;this.$.on("click",".refresh-panel",function(){var i=e(this).closest(".panel");a.refresh(i,t)})},s.prototype.handleDraggable=function(){var t=this.$,n=this.options,r="circle"===n.shadowType,s=n.circleShadowSize,d=s/2,l=n.afterOrdered;this.$.addClass("dashboard-draggable"),this.$.on("mousedown",".panel-actions, .drag-disabled",function(e){e.stopPropagation()});var h;this.$.on("mousedown",".panel-heading, .panel-drag-handler",function(g){function p(t){var r=x.data("mouseOffset");u=t.pageX-r.x,v=t.pageY-r.y,m=u+A,y=v+E,x.css({left:u,top:v}),R.find(".dragging-in").removeClass("dragging-in"),w=!1,C=null;var s,d=0;R.children(":not(.dragging-col)").each(function(){var r=e(this);if(r.hasClass("dragging-col-holder"))return w=!n.sensitive||d<100,!0;var l=r.children(".panel"),h=l.offset(),g=l.width(),p=l.height(),c=h.left,f=h.top;if(n.sensitive)c-=H.left,f-=H.top,s=o(u,v,m,y,c,f,c+g,f+p),s>100&&s>d&&s>a.min(i(u,v,m,y),i(c,f,c+g,f+p))/3&&(d=s,C=r);else{var z=t.pageX,b=t.pageY;if(z>c&&b>f&&z<c+g&&b<f+p)return C=r,!1}}),C&&(z&&clearTimeout(z),b=C,z=setTimeout(c,50)),t.preventDefault()}function c(){b&&(b.addClass("dragging-in"),w?D.insertAfter(b):D.insertBefore(b),t.addClass("dashboard-holding"),z=null,b=null)}function f(a){z&&clearTimeout(z);var i=$.data("order");$.parent().insertAfter(D);var n=0,o={};R.children(":not(.dragging-col-holder)").each(function(){var a=e(this).children(".panel");a.data("order",++n),o[a.data("id")||a.attr("id")]=n,a.parent().attr("data-order",n)}),i!=o[$.data("id")||$.attr("id")]&&(R.data("orders",o),l&&"function"==typeof l&&l(o)),x.remove(),D.remove(),t.removeClass("dashboard-holding"),t.find(".dragging-col").removeClass("dragging-col"),t.find(".panel-dragging").removeClass("panel-dragging"),R.find(".dragging-in").removeClass("dragging-in"),t.removeClass("dashboard-dragging"),e(document).off("mousemove",p).off("mouseup",f),a.preventDefault()}var u,v,m,y,z,C,w,b,$=e(this).closest(".panel"),P=$.parent(),R=$.closest(".row"),x=$.clone().addClass("panel-dragging-shadow"),T=$.offset(),H=t.offset(),D=R.find(".dragging-col-holder"),A=$.width(),E=$.height();D.length||(D=e('<div class="dragging-col-holder"><div class="panel"></div></div>').removeClass("dragging-col").appendTo(R)),h&&D.removeClass(h),D.addClass(h=P.attr("class")),D.insertBefore(P).find(".panel").replaceWith($.clone().addClass("panel-dragging panel-dragging-holder")),t.addClass("dashboard-dragging"),$.addClass("panel-dragging").parent().addClass("dragging-col"),x.css({left:T.left-H.left,top:T.top-H.top,width:A,height:E}).appendTo(t).data("mouseOffset",{x:g.pageX-T.left+H.left,y:g.pageY-T.top+H.top}),r&&(x.addClass("circle"),setTimeout(function(){x.css({left:g.pageX-H.left-d,top:g.pageY-H.top-d,width:s,height:s}).data("mouseOffset",{x:H.left+d,y:H.top+d})},100)),e(document).on("mousemove",p).on("mouseup",f),g.preventDefault()})},s.prototype.handlePanelPadding=function(){this.$.find(".panel-body > table, .panel-body > .list-group").parent().addClass("no-padding")},s.prototype.updatePanelHeight=function(){var t=this,i=t.options.height,n=t.options.minHeight,o={};return t.id&&e.zui.store&&(o=e.zui.store.pageGet("zui.dashboard."+t.id+".sizeConfig",o)),this.$.children(".row").each(function(){var t=e(this),r=t.width(),s=[],d=[],l=0;t.children(":not(.dragging-col-holder)").each(function(){var a=e(this),t=a.width();l+t>r?(d.length&&s.push(d),d=[a],l=t):(l+=t,d.push(a))}),d.length&&s.push(d),s.length&&e.each(s,function(t){d=s[t];var r=0,l=[],h=!1;e.each(d,function(e){var i=d[e].data("row-id",t),s=i.children(".panel:first");if(l.push(s),!h){var g=s.data("newHeight");if(g)s.data("newHeight",null).data("height",g),r=a.max(n,g),h=!0;else{var p=s.data("height")||o[s.data("id")];p&&(r=a.max(r,p))}}}),r||(r=i),e.each(l,function(e){var a=l[e].css("height",r);o[a.data("id")]=a.data("height")})})}),t.id&&e.zui.store&&e.zui.store.pageSet("zui.dashboard."+t.id+".sizeConfig",o),o},s.prototype.handleResizeEvent=function(){var t=this,i=t.options,n=i.resizable,o=i.onResize,s=i.minHeight,d=i.resizeMessage,l=d&&r;t.$.on("mousedown",".resize-handle",function(i){var n=e(this),d=n.hasClass("resize-vertical"),h=n.parent().addClass("resizing").toggleClass("resizing-v",d).toggleClass("resizing-h",!d),g=h.closest(".row"),p=h.children(".panel"),c=i.pageX,f=i.pageY,u=h.width(),v=p.height(),m=g.width(),y=a.round(12*u/m),z=y;d||h.attr("data-grid",y);var C=function(e){if(d)p.css("height",a.max(s,v+(e.pageY-f)));else{var t=e.pageX,i=a.max(1,a.min(12,a.round(12*(u+(t-c))/m)));z!=i&&(h.attr("data-grid",i).css("width",100*i/12+"%"),l&&r[r.isShow?"update":"show"](a.round(100*i/12)+"% ("+i+"/12)"),z=i)}e.preventDefault(),e.stopPropagation()},w=function(i){if(h.removeClass("resizing resizing-v resizing-h"),d){var n=a.max(s,v+(i.pageY-f));if(n!==v){if("function"==typeof o){var g=function(){p.css("height",v).data("height",v),t.updatePanelHeight()},c=o({type:"vertical",id:p.data("id"),element:h,old:v,height:n,revert:g});c===!1&&g()}p.css("height",n).data("newHeight",n)}}else{var u=h.attr("data-grid");if(y!=u&&"function"==typeof o){var g=function(){h.attr("data-grid",y).css("width",null),t.updatePanelHeight()},c=o({type:"horizontal",id:p.data("id"),element:h,old:y,grid:u,revert:g});c===!1?g():c!==!0&&l&&r.show(a.round(100*u/12)+"% ("+u+"/12)")}}t.updatePanelHeight(),e("body").off("mousemove.resize",C).off("mouseup.resize",w),i.preventDefault(),i.stopPropagation()};e("body").on("mousemove.resize",C).on("mouseup.resize",w),i.preventDefault(),i.stopPropagation()});var h=t.$.children(".row").children(":not(.dragging-col-holder)");n!==!0&&"horizontal"!==n||h.append('<div class="resize-handle resize-horizontal"><i class="icon icon-resize-h"></i></div>'),n!==!0&&"vertical"!==n||h.append('<div class="resize-handle resize-vertical"><i class="icon icon-resize-v"></i></div>')},s.prototype.refresh=function(a,i){i===t&&(i=this.options.onlyRefreshBody);var n=this.options.afterRefresh;a=e(a);var o=a.data("url");o&&(a.addClass("panel-loading").find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").addClass("icon-spin"),e.ajax({url:o,dataType:"html"}).done(function(t){var o=e(t);o.hasClass("panel")?a.empty().append(o.children()):i?a.find(".panel-body").empty().html(t):a.html(t),"function"==typeof n&&n.call(this,{result:!0,data:t,$panel:a})}).fail(function(){a.addClass("panel-error"),"function"==typeof n&&n.call(this,{result:!1,$panel:a})}).always(function(){a.removeClass("panel-loading"),a.find(".panel-heading .icon-refresh,.panel-heading .icon-repeat").removeClass("icon-spin")}))},s.prototype.init=function(){var a=this.options,i=this;if(i.id=a.id?a.id:i.$.attr("id"),a.data){var n=e('<div class="row"/>');e.each(a.data,function(a,i){var o=e('<div class="col-sm-'+(i.colWidth||4)+'"/>');i.colAttrs&&o.attr(i.colAttrs);var r=e('<div class="panel" data-id="'+(i.id||e.zui.uuid())+'"/>');if(i.panelAttrs&&r.attr(i.panelAttrs),i.height!==t&&r.data("height",i.height),i.content!==t)if("function"==typeof i.content){var s=i.content(r);s!==!0&&r.html(s)}else r.html(i.content);n.append(o.append(r.data("url",i.url)))}),i.$.append(n)}i.updatePanelHeight(),i.handlePanelPadding(),i.handleRemoveEvent(),i.handleRefreshEvent(),a.resizable&&i.handleResizeEvent(),i.draggable&&i.handleDraggable();var o=0;i.$.find(".panel").each(function(){var t=e(this);t.data("order",++o),t.attr("id")||t.attr("id","panel"+o),t.attr("data-id")||t.attr("data-id",o),i.refresh(t,a.onlyRefreshBody)}),i.$.find('[data-toggle="tooltip"]').tooltip({container:"body"})},e.fn.dashboard=function(a){return this.each(function(){var t=e(this),i=t.data("zui.dashboard"),n="object"==typeof a&&a;i||t.data("zui.dashboard",i=new s(this,n)),"string"==typeof a&&i[a]()})},e.fn.dashboard.Constructor=s}(jQuery,Math,void 0);
\ No newline at end of file
/*!
* ZUI: 数据表格② - v1.10.0 - 2021-11-04
* ZUI: 数据表格② - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.datagrid-container {
......
/*!
* ZUI: 数据表格② - v1.10.0 - 2021-11-04
* ZUI: 数据表格② - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/*!
......@@ -442,6 +442,16 @@
that.setScrollbarOffset(null, offset);
}
};
var mousePositionTimer = 0;
var mousePositionHandler = function(event) {
if (mousePositionTimer) {
($.zui.clearAsap || clearTimeout)(mousePositionTimer);
}
mousePositionTimer = ($.zui.asap || setTimeout)(function() {
mousePositionTimer = 0;
handleMousePosition(event);
}, 0);
};
$scrollbar.on('mousedown', function(e) {
e.preventDefault();
isMouseDown = true;
......@@ -454,14 +464,14 @@
if (isClickBar) {
startPageOffset += startScrollOffset;
}
handleMousePosition(e);
mousePositionHandler(e);
$scrollbar.addClass('scrolling');
$document.on('mouseup' + eventSuffix, function(e) {
isMouseDown = false;
handleMousePosition(e);
mousePositionHandler(e);
$document.off(eventSuffix);
$scrollbar.removeClass('scrolling');
}).on('mousemove' + eventSuffix, handleMousePosition);
}).on('mousemove' + eventSuffix, mousePositionHandler);
});
that['$' + direction + 'Scroll'] = $scrollbar;
that['$' + direction + 'Scrollbar'] = $scrollbar.find('.bar');
......@@ -470,12 +480,15 @@
createScrollbar('v');
var mouseWheelFactor = options.mouseWheelFactor;
var isWindows = window.navigator.userAgent.match(/Win/i);
if (isWindows) mouseWheelFactor *= 20;
$container.on('mousewheel', function(event) {
// check whether need scroll
var supportWheelEvent = 'onwheel' in document.createElement('div');
if (isWindows && !supportWheelEvent) mouseWheelFactor *= 20;
if (supportWheelEvent) mouseWheelFactor *= -1;
$container.on(supportWheelEvent ? 'wheel' : 'mousewheel', function(event) {
var deltaX = supportWheelEvent ? event.originalEvent.deltaX : event.deltaX;
var deltaY = supportWheelEvent ? event.originalEvent.deltaY : event.deltaY;
var layout = that.layout;
var scrollLeft = layout.scrollLeft - Math.round(event.deltaX * mouseWheelFactor);
var scrollTop = layout.scrollTop - Math.round(event.deltaY * mouseWheelFactor);
var scrollLeft = layout.scrollLeft - Math.round(deltaX * mouseWheelFactor);
var scrollTop = layout.scrollTop - Math.round(deltaY * mouseWheelFactor);
scrollLeft = Math.max(0, Math.min(scrollLeft, layout.width - layout.containerWidth));
scrollTop = Math.max(0, Math.min(scrollTop, layout.height - layout.containerHeight));
if (scrollLeft !== layout.scrollLeft || scrollTop !== layout.scrollTop) {
......@@ -763,20 +776,21 @@
if (result.length) {
var sortBy = filter.sortBy || (hasSearchScore ? '_SCORE' : false);
if (sortBy) {
var order = sortBy === '_SCORE' ? 'DESC' : filter.order;
var colConfig = that.getColConfigByName(sortBy);
var isDESC = order === 'desc';
var sortFunc = (colConfig && colConfig.sortFunc) || that.options.sortFunc || DEFAULT_SORT_FUNC;
result.sort(function(item1, item2) {
var sortResult = sortFunc(item1[sortBy], item2[sortBy], item1, item2, sortBy, that);
return isDESC ? ((-1) * sortResult) : sortResult;
});
var order = sortBy === '_SCORE' ? 'DESC' : filter.order;
if(!sortBy) {
sortBy = 'index';
order = 'ASC';
}
var colConfig = that.getColConfigByName(sortBy);
var isDESC = order === 'desc';
var sortFunc = (colConfig && colConfig.sortFunc) || that.options.sortFunc || DEFAULT_SORT_FUNC;
result.sort(function(item1, item2) {
var sortResult = sortFunc(item1[sortBy], item2[sortBy], item1, item2, sortBy, that);
return isDESC ? ((-1) * sortResult) : sortResult;
});
var pager = that.pager;
if (pager.page) {
var start = pager.page > 1 ? (pager.page * pager.recPerPage) : 0;
result = result.slice(pager.skip, pager.end);
}
}
......@@ -1140,6 +1154,7 @@
DataGrid.prototype.getCell = function(rowIndex, colIndex) {
var that = this;
var optioins = that.options;
var config = that.getCellConfig(rowIndex, colIndex);
var col = colIndex > 0 ? that.dataSource.cols[colIndex - 1] : null;
var type, value;
......@@ -1151,17 +1166,20 @@
};
if (colIndex === 0) {
type = 'index';
var colLabel = rowIndex > 0 ? (that.pager.skip + rowIndex) : '';
value = config.label !== undefined ? config.label : colLabel;
if(!optioins.dataItemIsArray && config.data && config.data.index !== undefined) {
value = config.data.index;
} else {
value = config.label !== undefined ? config.label : (rowIndex > 0 ? (that.pager.skip + rowIndex) : '');
}
} else if (rowIndex === 0) {
type = 'head';
value = config.label !== undefined ? config.label : (config.name !== undefined ? config.name : colIndex);
} else {
type = 'cell';
value = config.data && config.data[that.options.dataItemIsArray ? colIndex : col.name];
value = config.data && config.data[optioins.dataItemIsArray ? colIndex : col.name];
}
if (rowIndex > 0) {
var optionsValueOperator = that.options.valueOperator;
var optionsValueOperator = optioins.valueOperator;
var valueType = config.valueType;
var valueOperator = config.valueOperator || (optionsValueOperator && valueType ? optionsValueOperator[valueType] : null);
if (valueOperator && valueOperator.getter) {
......@@ -1234,7 +1252,7 @@
// sortFunc
valueType: 'string'
},
colIndex > 0 ? that.dataSource.cols[colIndex - 1] : null,
colIndex > 0 ? that.dataSource.cols[colIndex - 1] : {name: 'index'},
that.layout.cols ? that.layout.cols[colIndex] : null,
that.isFuncConfigs ? that.configs(colId) : that.configs[colId],
that.userConfigs[colId]
......@@ -1406,7 +1424,7 @@
}
}
if (colIndex > 0 && rowIndex === 0 && options.sortable && config.sort !== false) {
if ((colIndex > 0 || !options.dataItemIsArray) && rowIndex === 0 && options.sortable && config.sort !== false) {
var sorted = false;
if (config.name === that.states.sortBy) {
sorted = that.states.order === 'desc' ? 'down' : 'up';
......
/*!
* ZUI: 数据表格 - v1.10.0 - 2021-11-04
* ZUI: 数据表格 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.datatable-head,
......
/*!
* ZUI: 数据表格 - v1.10.0 - 2021-11-04
* ZUI: 数据表格 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 图片裁剪工具 - v1.10.0 - 2021-11-04
* ZUI: 图片裁剪工具 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.img-cutter {
......
/*!
* ZUI: 图片裁剪工具 - v1.10.0 - 2021-11-04
* ZUI: 图片裁剪工具 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 图片裁剪工具 - v1.10.0 - 2021-11-04
* ZUI: 图片裁剪工具 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/.img-cutter{padding:10px;margin-bottom:20px;background:#e5e5e5;border:1px solid #ddd}.img-cutter>.canvas{position:relative;min-width:50px;max-width:100%;margin:0 auto}.img-cutter>.canvas>.cover{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>img{-webkit-transition:all .4s cubic-bezier(.175,.885,.32,1);-o-transition:all .4s cubic-bezier(.175,.885,.32,1);transition:all .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>.controller{position:absolute;top:5%;left:5%;z-index:5;width:100px;height:100px;cursor:move;background:0 0;border:1px dashed #fff;border-color:rgba(255,255,255,.7);-webkit-transition:opacity .4s cubic-bezier(.175,.885,.32,1);-o-transition:opacity .4s cubic-bezier(.175,.885,.32,1);transition:opacity .4s cubic-bezier(.175,.885,.32,1)}.img-cutter>.canvas>.controller>.control{position:absolute;width:6px;height:6px;background:#000;background:rgba(0,0,0,.6);border:1px solid #fff;border-color:rgba(255,255,255,.6)}.img-cutter>.canvas>.controller>.control[data-direction=left]{top:50%;left:-4px;margin-top:-3px;cursor:w-resize}.img-cutter>.canvas>.controller>.control[data-direction=top]{top:-4px;left:50%;margin-left:-3px;cursor:n-resize}.img-cutter>.canvas>.controller>.control[data-direction=right]{top:50%;right:-4px;margin-top:-3px;cursor:e-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom]{bottom:-4px;left:50%;margin-left:-3px;cursor:s-resize}.img-cutter>.canvas>.controller>.control[data-direction=top-left]{top:-4px;left:-4px;cursor:nw-resize}.img-cutter>.canvas>.controller>.control[data-direction=top-right]{top:-4px;right:-4px;cursor:ne-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom-left]{bottom:-4px;left:-4px;cursor:sw-resize}.img-cutter>.canvas>.controller>.control[data-direction=bottom-right]{right:-4px;bottom:-4px;cursor:se-resize}.img-cutter>.canvas>.cliper{position:absolute;top:0;left:0;z-index:2;width:100%;height:100%;clip:rect(0,50px,50px,0)}.img-cutter.hover>.canvas>.controller>.cover,.img-cutter.hover>.canvas>img{filter:alpha(opacity=0);opacity:0}.img-cutter.hover>.canvas>.controller{display:none}
\ No newline at end of file
此差异已折叠。
/*!
* ZUI: Markdown 文档生成器 - v1.10.0 - 2021-11-04
* ZUI: Markdown 文档生成器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/**
......
此差异已折叠。
/*!
* ZUI: 1.2升级到1.3兼容插件 - v1.10.0 - 2021-11-04
* ZUI: 1.2升级到1.3兼容插件 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
/*!
* ZUI: 1.2升级到1.3兼容插件 - v1.10.0 - 2021-11-04
* ZUI: 1.2升级到1.3兼容插件 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
!function(e,r){function o(r,s){if(Array.isArray(r))return void e.each(r,function(e,r){o(r,s)});var i={};i[r]=a[r],s?e.extend(s,i):e.extend(i)}var a=e.zui;a&&(o(["uuid","callEvent","clientLang","browser","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"]),o(["Color","imgReady","messager","Messager","showMessager","closeModal","ajustModalPosition","ModalTrigger","modalTrigger","store"],r))}(jQuery,window);
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
/*!
* ZUI: 标签页管理器 - v1.10.0 - 2021-11-04
* ZUI: 标签页管理器 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.tabs {
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
/*!
* ZUI: 树形图 - v1.10.0 - 2021-11-04
* ZUI: 树形图 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
.treemap-data {
......
/*!
* ZUI: 树形图 - v1.10.0 - 2021-11-04
* ZUI: 树形图 - v1.10.0 - 2022-05-20
* http://openzui.com
* GitHub: https://github.com/easysoft/zui.git
* Copyright (c) 2021 cnezsoft.com; Licensed MIT
* Copyright (c) 2022 cnezsoft.com; Licensed MIT
*/
/* ========================================================================
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -24,7 +24,7 @@ filter: rili rl
按周或查看某一天的日程视图将在后续版本中到来。
<div class="example">
<div class="calendar" id="calendarExample"></div>
<div class="calendar" id="calendarExample" data-hide-empty-weekends="true"></div>
</div>
```html
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -218,6 +218,7 @@
if($shadow === null) {
$ele.removeClass('drag-from');
that.trigger('always', {
target: $target,
event: event,
cancel: true
});
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册