浏览代码

U table ajax special filters view

Piotr Labudda 6 年之前
父节点
当前提交
e73ffe31d6
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      SE/se-lib/TableAjax.php.TableAjax.js

+ 7 - 2
SE/se-lib/TableAjax.php.TableAjax.js

@@ -129,6 +129,7 @@ global['P5UI__TableAjaxSpecialFilter'] = createReactClass({
 				DBG && console.warn('DBG:renderButton click', { value });
 				this.handleSetFilter(value);
 			}.bind(this),
+			style: (this.state.selected) ? { borderTopColor: "#46b8da", borderBottomColor: "#46b8da" } : {},
 		}, option);
 	},
 	render: function () {
@@ -139,6 +140,7 @@ global['P5UI__TableAjaxSpecialFilter'] = createReactClass({
 				h('button', {
 					className: "btn btn-xs btn-default",
 					title: label,
+					style: (this.state.selected) ? { backgroundColor: "#d9edf7", borderColor: "#46b8da" } : {},
 				}, [
 					h('i', { className: this.props.icon })
 				])
@@ -151,7 +153,10 @@ global['P5UI__TableAjaxSpecialFilter'] = createReactClass({
 						title: "Kasuj filtr",
 						disabled: !this.state.selected,
 						onClick: this.handleRemoveFilter,
-						style: { color: !this.state.selected ? '#bbb' : '#f00' }
+						style: Object.assign(
+							{ color: !this.state.selected ? '#bbb' : '#f00' },
+							(this.state.selected) ? { backgroundColor: "#d9edf7", borderColor: "#46b8da" } : {}
+						),
 					}, [
 						h('i', { className: "glyphicon glyphicon-remove" })
 					])
@@ -1101,7 +1106,7 @@ var TableAjax = function() {
 
 	priv.initialRender = function() {
 		/**
-			 <topWrap /> <!-- @selected | filters -->
+			 <topWrap /> <!-- _uiNodeSelectedInfo | _uiNodeSpecialFilters -->
 			 <afterTopWrap /> <!-- for clear:both, border and padding -->
 			 <_uiMainContainerNode>
 				<_uiNode$Table>