jQWidgets jqxKanban主题属性攻略
jQWidgets
是一个基于 jQuery
的 UI 组件库,提供了丰富的 UI 组件和工具,可于创建现代化 Web 应用程序。 jqxKanban
是看板组件,用于可视化管理任务和流程。攻略将详细介绍 jqxKanban
的主题属性,该属性用于自定义看板的外观。
主题属性
jqxKanban
组件的主题属性用于自定义看板的外观。主题属性是一个对象,包含多个属性,用于定义看板的颜色、字体、边框等样式。
以下是 jqxKanban
的主题属性的默认值:
{
background: '#FFFFFF',
color: '#333333',
border: 'none',
borderRadius: '0px',
itemHeaderBackground: '#FFFFFF',
itemHeaderColor: '#333333',
itemHeaderBorder: 'none',
itemHeaderBorderRadius: '0px',
itemContentBackground: '#FFFFFF',
itemContentColor: '#333333',
itemContentBorder: 'none',
itemContentBorderRadius: '0px',
itemFooterBackground: '#FFFFFF',
itemFooterColor: '#333333',
itemFooterBorder: 'none',
itemFooterBorderRadius: '0px',
columnHeaderBackground: '#FFFFFF',
columnHeaderColor: '#333333',
columnHeaderBorder: 'none',
columnHeaderBorderRadius: '0px',
columnHeaderHeight: '30px',
columnItemPadding: '5px',
columnItemMargin: '5px',
columnItemBorder: 'none',
columnItemBorderRadius: '0px',
columnItemBackground: '#FFFFFF',
columnItemColor: '#333333',
columnItemOpacity: 1,
columnItemOpacityDrag: 0.5,
columnItemOpacityDrop: 0.5,
columnItemBorderDrag: 'none',
columnItemBorderDrop: 'none',
columnItemBorderRadiusDrag: '0px',
columnItemBorderRadiusDrop: '0px',
columnItemBackgroundDrag: '#FFFFFF',
columnItemBackgroundDrop: '#FFFFFF',
columnItemColorDrag: '#333333',
columnItemColorDrop: '#333333',
columnItemZIndex: 100,
columnItemZIndexDrag: 100,
columnItemZIndexDrop: 100,
columnItemTransition: 'none',
columnItemTransitionDuration: '0s',
columnItemTransitionTimingFunction: 'ease',
columnItemTransitionDelay: '0s',
columnItemCursor: 'default',
columnItemCursorDrag: 'default',
columnItemCursorDrop: 'default',
columnItemOpacityTransition: 'none',
columnItemOpacityTransitionDuration: '0s',
columnItemOpacityTransitionTimingFunction: 'ease',
columnItemOpacityTransitionDelay: '0s',
columnItemTransformTransition: 'none',
columnItemTransformTransitionDuration: '0s',
columnItemTransformTransitionTimingFunction: 'ease',
columnItemTransformTransitionDelay: '0s',
columnItemTransform: 'none',
columnItemTransformOrigin: '50% 50%',
columnItemTransformRotate: '0deg',
columnItemTransformScale: '1',
columnItemTransformSkew: '0deg',
columnItemTransformTranslateX: '0px',
columnItemTransformTranslateY: '0px',
columnItemTransformTranslateZ: '0px',
columnItemTransformPerspective: '0px',
columnItemTransformOriginDrag: '50% 50%',
columnItemTransformRotateDrag: '0deg',
columnItemTransformScaleDrag: '1',
columnItemTransformSkewDrag: '0deg',
columnItemTransformTranslateXDrag: '0px',
columnItemTransformTranslateYDrag: '0px',
columnItemTransformTranslateZDrag: '0px',
columnItemTransformPerspectiveDrag: '0px',
columnItemTransformOriginDrop: '50% 50%',
columnItemTransformRotateDrop: '0deg',
columnItemTransformScaleDrop: '1',
columnItemTransformSkewDrop: '0deg',
columnItemTransformTranslateXDrop: '0px',
columnItemTransformTranslateYDrop: '0px',
columnItemTransformTranslateZDrop: '0px',
columnItemTransformPerspectiveDrop: '0px',
columnItemOpacityDragTransition: 'none',
columnItemOpacityDragTransitionDuration: '0s',
columnItemOpacityDragTransitionTimingFunction: 'ease',
columnItemOpacityDragTransitionDelay: '0s',
columnItemOpacityDropTransition: 'none',
columnItemOpacityDropTransitionDuration: '0s',
columnItemOpacityDropTransitionTimingFunction: 'ease',
columnItemOpacityDropTransitionDelay: '0s',
columnItemTransformDragTransition: 'none',
columnItemTransformDragTransitionDuration: '0s',
columnItemTransformDragTransitionTimingFunction: 'ease',
columnItemTransformDragTransitionDelay: '0s',
columnItemTransformDropTransition: 'none',
columnItemTransformDropTransitionDuration: '0s',
columnItemTransformDropTransitionTimingFunction: 'ease',
columnItemTransformDropTransitionDelay: '0s',
columnHeaderHeight: '30px',
columnHeaderPadding: '5px',
columnHeaderMargin: '5px',
columnHeaderBorderDrag: 'none',
columnHeaderBorderDrop: 'none',
columnHeaderBorderRadiusDrag: '0px',
columnHeaderBorderRadiusDrop: '0px',
columnHeaderBackgroundDrag: '#FFFFFF',
columnHeaderBackgroundDrop: '#FFFFFF',
columnHeaderColorDrag: '#333333',
columnHeaderColorDrop: '#333333',
columnHeaderZIndex: 100,
columnHeaderZIndexDrag: 100,
columnHeaderZIndexDrop: 100,
columnHeaderTransition: 'none',
columnHeaderTransitionDuration: '0s',
columnHeaderTransitionTimingFunction: 'ease',
columnHeaderTransitionDelay: '0s',
columnHeaderCursor: 'default',
columnHeaderCursorDrag: 'default',
columnHeaderCursorDrop: 'default',
columnHeaderOpacityTransition: 'none',
columnHeaderOpacityTransitionDuration: '0s',
columnHeaderOpacityTransitionTimingFunction: 'ease',
columnHeaderOpacityTransitionDelay: '0s',
columnHeaderTransformTransition: 'none',
columnHeaderTransformTransitionDuration: '0s',
columnHeaderTransformTransitionTimingFunction: 'ease',
columnHeaderTransformTransitionDelay: '0s',
columnHeaderTransform: 'none',
columnHeaderTransformOrigin: '50% 50%',
columnHeaderTransformRotate: '0deg',
columnHeaderTransformScale: '1',
columnHeaderTransformSkew: '0deg',
columnHeaderTransformTranslateX: '0px',
columnHeaderTransformTranslateY: '0px',
columnHeaderTransformTranslateZ: '0px',
columnHeaderTransformPerspective: '0px',
columnHeaderTransformOriginDrag: '50% 50%',
columnHeaderTransformRotateDrag: '0deg',
columnHeaderTransformScaleDrag: '1',
columnHeaderTransformSkewDrag: '0deg',
columnHeaderTransformTranslateXDrag: '0px',
columnHeaderTransformTranslateYDrag: '0px',
columnHeaderTransformTranslateZDrag: '0px',
columnHeaderTransformPerspectiveDrag: '0px',
columnHeaderTransformOriginDrop: '50% 50%',
columnHeaderTransformRotateDrop: '0deg',
columnHeaderTransformScaleDrop: '1',
columnHeaderTransformSkewDrop: '0deg',
columnHeaderTransformTranslateXDrop: '0px',
columnHeaderTransformTranslateYDrop: '0px',
columnHeaderTransformTranslateZDrop: '0px',
columnHeaderTransformPerspectiveDrop: '0px',
columnHeaderOpacityDragTransition: 'none',
columnHeaderOpacityDragTransitionDuration: '0s',
columnHeaderOpacityDragTransitionTimingFunction: 'ease',
columnHeaderOpacityDragTransitionDelay: '0s',
columnHeaderOpacityDropTransition: 'none',
columnHeaderOpacityDropTransitionDuration: '0s',
columnHeaderOpacityDropTransitionTimingFunction: 'ease',
columnHeaderOpacityDropTransitionDelay: '0s',
columnHeaderTransformDragTransition: 'none',
columnHeaderTransformDragTransitionDuration: '0s',
columnHeaderTransformDragTransitionTimingFunction: 'ease',
columnHeaderTransformDragTransitionDelay: '0s',
columnHeaderTransformDropTransition: 'none',
columnHeaderTransformDropTransitionDuration: '0s',
columnHeaderTransformDropTransitionTimingFunction: 'ease',
columnHeaderTransformDropTransitionDelay: '0s'
}
示例1:自定义看板的主题属性
以下是一个示例,演示如何使用 jqxKanban
的主题属性自定义看板的外观:
<!DOCTYPE html>
<html>
<head>
<title>jqxKanban</title>
<link rel="stylesheet" href="jq/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href="jq/styles/jqx.energyblue.css" type="text/css" />
<script type="text/javascript" src="jqwidgets/jqxcore.js"></script>
<script type="text/javascript" src="jqwidgets/jqxdata.js"></script>
<script type="text/javascript" src="jqwidgets/jqxbuttons.js"></script>
<script type="text/javascript" src="jqwidgets/jqxscrollbar.js"></script>
<script type="text/javascript" src="jqwidgets/jqxkanban.js"></script>
</head>
<body>
<div id="jqxKanban"></div>
<script>
var source = {
localData: [
{ text: '任务1', state: 'new' },
{ text: '任务2', state: 'new' },
{ text: '任务3', state: 'done' }
],
dataType: 'array',
dataFields: [
{ name: 'text', type: 'string' },
{ name: 'state', type: 'string' }
]
};
var dataAdapter = new $.jqx.dataAdapter(source);
$('#jqxKanban').jqxKanban({
source: dataAdapter,
columns: [
{ text: '新任务', dataField: 'state', maxItems: 3 },
{ text: '已完成任务', dataField: 'state', maxItems: 3 }
],
template: '#template',
theme: {
background: '#F5F5F5',
color: '#333333',
border: '1px solid #CCCCCC',
borderRadius: '5px',
itemHeaderBackground: '#FFFFFF',
itemHeaderColor: '#333333',
itemHeaderBorder: 'none',
itemHeaderBorderRadius: '0px',
itemContentBackground: '#FFFFFF',
itemContentColor: '#333333',
itemContentBorder: 'none',
itemContentBorderRadius: '0px',
itemFooterBackground: '#FFFFFF',
itemFooterColor: '#333333',
itemFooterBorder: 'none',
itemFooterBorderRadius: '0px',
columnHeaderBackground: '#F5F5F5',
columnHeaderColor: '#333333',
columnHeaderBorder: 'none',
columnHeaderBorderRadius: '0px',
columnHeaderHeight: '30px',
columnItemPadding: '5px',
columnItemMargin: '5px',
columnItemBorder: 'none',
columnItemBorderRadius: '0px',
columnItemBackground: '#FFFFFF',
columnItemColor: '#333333',
columnItemOpacity: 1,
columnItemOpacityDrag: 0.5,
columnItemOpacityDrop: 0.5,
columnItemBorderDrag: 'none',
columnItemBorderDrop: 'none',
columnItemBorderRadiusDrag: '0px',
columnItemBorderRadiusDrop: '0px',
columnItemBackgroundDrag: '#FFFFFF',
columnItemBackgroundDrop: '#FFFFFF',
columnItemColorDrag: '#333333',
columnItemColorDrop: '#333333',
columnItemZIndex: 100,
columnItemZIndexDrag: 100,
columnItemZIndexDrop: 100,
columnItemTransition: 'none',
columnItemTransitionDuration: '0s',
columnItemTransitionTimingFunction: 'ease',
columnItemTransitionDelay: '0s',
columnItemCursor: 'default',
columnItemCursorDrag: 'default',
columnItemCursorDrop: 'default',
columnItemOpacityTransition: 'none',
columnItemOpacityTransitionDuration: '0s',
columnItemOpacityTransitionTimingFunction: 'ease',
columnItemOpacityTransitionDelay: '0s',
columnItemTransformTransition: 'none',
columnItemTransformTransitionDuration: '0s',
columnItemTransformTransitionTimingFunction: 'ease',
columnItemTransformTransitionDelay: '0s',
columnItemTransform: 'none',
columnItemTransformOrigin: '50% 50%',
columnItemTransformRotate: '0deg',
columnItemTransformScale: '1',
columnItemTransformSkew: '0deg',
columnItemTransformTranslateX: '0px',
columnItemTransformTranslateY: '0px',
columnItemTransformTranslateZ: '0px',
columnItemTransformPerspective: '0px',
columnItemTransformOriginDrag: '50% 50%',
columnItemTransformRotateDrag: '0deg',
columnItemTransformScaleDrag: '1',
columnItemTransformSkewDrag: '0deg',
columnItemTransformTranslateXDrag: '0px',
columnItemTransformTranslateYDrag: '0px',
columnItemTransformTranslateZDrag: '0px',
columnItemTransformPerspectiveDrag: '0px',
columnItemTransformOriginDrop: '50% 50%',
columnItemTransformRotateDrop: '0deg',
columnItemTransformScaleDrop: '1',
columnItemTransformSkewDrop: '0deg',
columnItemTransformTranslateXDrop: '0px',
columnItemTransformTranslateYDrop: '0px',
columnItemTransformTranslateZDrop: '0px',
columnItemTransformPerspectiveDrop: '0px',
columnItemOpacityDragTransition: 'none',
columnItemOpacityDragTransitionDuration: '0s',
columnItemOpacityDragTransitionTimingFunction: 'ease',
columnItemOpacityDragTransitionDelay: '0s',
columnItemOpacityDropTransition: 'none',
columnItemOpacityDropTransitionDuration: '0s',
columnItemOpacityDropTransitionTimingFunction: 'ease',
columnItemOpacityDropTransitionDelay: '0s',
columnItemTransformDragTransition: 'none',
columnItemTransformDragTransitionDuration: '0s',
columnItemTransformDragTransitionTimingFunction: 'ease',
columnItemTransformDragTransitionDelay: '0s',
columnItemTransformDropTransition: 'none',
columnItemTransformDropTransitionDuration: '0s',
columnItemTransformDropTransitionTimingFunction: 'ease',
columnItemTransformDropTransitionDelay: '0s',
columnHeaderHeight: '30px',
columnHeaderPadding: '5px',
columnHeaderMargin: '5px',
columnHeaderBorderDrag: 'none',
columnHeaderBorderDrop: 'none',
columnHeaderBorderRadiusDrag: '0px',
columnHeaderBorderRadiusDrop: '0px',
columnHeaderBackgroundDrag: '#F5F5F5',
columnHeaderBackgroundDrop: '#F5F5F5',
columnHeaderColorDrag: '#333333',
columnHeaderColorDrop: '#333333',
columnHeaderZIndex: 100,
columnHeaderZIndexDrag: 100,
columnHeaderZIndexDrop: 100,
columnHeaderTransition: 'none',
columnHeaderTransitionDuration: '0s',
columnHeaderTransitionTimingFunction: 'ease',
columnHeaderTransitionDelay: '0s',
columnHeaderCursor: 'default',
columnHeaderCursorDrag: 'default',
columnHeaderCursorDrop: 'default',
columnHeaderOpacityTransition: 'none',
columnHeaderOpacityTransitionDuration: '0s',
columnHeaderOpacityTransitionTimingFunction: 'ease',
columnHeaderOpacityTransitionDelay: '0s',
columnHeaderTransformTransition: 'none',
columnHeaderTransformTransitionDuration: '0s',
columnHeaderTransformTransitionTimingFunction: 'ease',
columnHeaderTransformTransitionDelay: '0s',
columnHeaderTransform: 'none',
columnHeaderTransformOrigin: '50% 50%',
columnHeaderTransformRotate: '0deg',
columnHeaderTransformScale: '1',
columnHeaderTransformSkew: '0deg',
columnHeaderTransformTranslateX: '0px',
columnHeaderTransformTranslateY: '0px',
columnHeaderTransformTranslateZ: '0px',
columnHeaderTransformPerspective: '0px',
columnHeaderTransformOriginDrag: '50% 50%',
columnHeaderTransformRotateDrag: '0deg',
columnHeaderTransformScaleDrag: '1',
columnHeaderTransformSkewDrag: '0deg',
columnHeaderTransformTranslateXDrag: '0px',
columnHeaderTransformTranslateYDrag: '0px',
columnHeaderTransformTranslateZDrag: '0px',
columnHeaderTransformPerspectiveDrag: '0px',
columnHeaderTransformOriginDrop: '50% 50%',
columnHeaderTransformRotateDrop: '0deg',
columnHeaderTransformScaleDrop: '1',
columnHeaderTransformSkewDrop: '0deg',
columnHeaderTransformTranslateXDrop: '0px',
columnHeaderTransformTranslateYDrop: '0px',
columnHeaderTransformTranslateZDrop: '0px',
columnHeaderTransformPerspectiveDrop: '0px',
columnHeaderOpacityDragTransition: 'none',
columnHeaderOpacityDragTransitionDuration: '0s',
columnHeaderOpacityDragTransitionTimingFunction: 'ease',
columnHeaderOpacityDragTransitionDelay: '0s',
columnHeaderOpacityDropTransition: 'none',
columnHeaderOpacityDropTransitionDuration: '0s',
columnHeaderOpacityDropTransitionTimingFunction: 'ease',
columnHeaderOpacityDropTransitionDelay: '0s',
columnHeaderTransformDragTransition: 'none',
columnHeaderTransformDragTransitionDuration: '0s',
columnHeaderTransformDragTransitionTimingFunction: 'ease',
columnHeaderTransformDragTransitionDelay: '0s',
columnHeaderTransformDropTransition: 'none',
columnHeaderTransformDropTransitionDuration: '0s',
columnHeaderTransformDropTransitionTimingFunction: 'ease',
columnHeaderTransformDropTransitionDelay: '0s'
}
});
</script>
<script id="template" type="text/x-jquery-tmpl">
<div class="jqx-kanban-item">
<div class="jqx-kanban-item-color-status"></div>
<div class="jqx-kanban-item-text">${text}</div>
<div class="jqx-kanban-item-footer">
<div class="jqx-kanban-item-state">${state}</div>
</div>
</div>
</script>
</body>
</html>
在此示例中,我们创建了一个 jqxKanban
组件,并
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:jQWidgets jqxKanban主题属性 - Python技术站