﻿<?xml version="1.0" encoding="utf-8"?>
<Page xmlns="Craba.UI" Title="面板配置" ActiveControl="null" SubTitle="可自定义组件的显示位置、显示宽度、显示列数、隐藏到面板" AllowResize="true" MinWidth="900" MinHeight="600" OnClose="doSaveConfig" CssClass='pd0' ActionType="Craba.Web.UI.PanelConfigAction, _Sys/UI/PanelConfig.js">

  <Button Icon="aicon-question-circle" CssClass="helpIcon" Flat="true" ID="helpBtn" Visible="false" />

  <FlexBlock CssClass="GridConfigPage plr20 pt10">
    <FlexBlock Caption="显示到主面板的控件">
      <Grid ID="grid0" AllowResize="false" DefaultShowEditor="false" ReadOnly="false" LazyPageSize="0" AllowPopup="false" ModifyOnly="true" AllowConfig="false" AllowFilter="false" SaveConfig="false" UseEvenRowColor='false' OnCellRendering='doCellRender' DefaultRowCount="1" AllowCopy="false" AllowDrag="true" OnDrop="doDrop" OnRowDblClick="doShowMore" OnRowClick="doRowClick" OnSelectionChanged="doRowClick">
        <TextColumn Caption="控件文本" DataField="text" AllowStretch='true' HeaderAlign="Center" AllowHTML="true" ReadOnly="true" />
        <CheckBoxColumn Caption="表头/表尾" DataField='headfooter' Visible="${headVisible}" />
        <NumberColumn Caption="显示宽度" DataField="width" Visible="${widthVisible}" TextAlign="Left" Width='80' MaxValue="1000" NumberType="PositiveInt" ShowCalculator="false" OnChange="doWidthChange" />
        <NumberColumn Caption="显示列数" DataField="colSpan" Visible="${colVisible || itemVisible}" TextAlign="Left" MinValue="1" Width='80' MaxValue="10" NumberType="PositiveInt" ShowCalculator="false" OnChange="doColChange" />
      </Grid>
    </FlexBlock>

    <FlexBlock Caption="隐藏到更多面板的控件" Width='300'>
      <Grid ID="grid1" AllowResize="false" DisplaySelectedStyle="false" LazyPageSize="0" AllowPopup="false" AllowConfig="false" AllowFilter="false" ModifyOnly="true" OnCellRendering='doCellRender' SaveConfig="false" UseEvenRowColor='false' DefaultRowCount="1" AllowCopy="false" AllowDrag="true" OnDrop="doDrop" OnRowDblClick="doShowMain" ReadOnly="false">
        <TextColumn Caption="控件文本" DataField="text" AllowStretch='true' HeaderAlign="Center" ReadOnly="true" AllowHTML="true" />
        <NumberColumn Caption="显示宽度" DataField="width" Visible="${widthVisible}" TextAlign="Left" Width='80' MaxValue="1000" NumberType="PositiveInt" ShowCalculator="false" OnChange="doWidthChange" />
        <NumberColumn Caption="显示列数" DataField="colSpan" Visible='false' TextAlign="Left" Width='80' MinValue="1" MaxValue="10" NumberType="PositiveInt" ShowCalculator="false" OnChange="doColChange" />
        <MultiSelectColumn Caption="换行" DataField="chk" Width="70" HeaderAlign="Center" OnChange="doGroupChange" DisplayNull="false" />
      </Grid>
    </FlexBlock>
  </FlexBlock>

  <FlowPanel ItemWidth="200" LayoutDirection="Vert" CssClass="plr20">
    <NumberEdit ShowCalculator="false" Label="每列的宽度:" DataField="itemWidth" Visible="${itemVisible}" NumberType="PositiveInt" MaxValue="1000" OnChange="doWidthChange2" />

    <NumberEdit ShowCalculator="false" Label="显示列数:" DataField="colSpan" Visible="${colVisible}" NumberType="PositiveInt" MinValue="2" MaxValue="10" OnChange="doColChange2" />
  </FlowPanel>

  <HBlock CssClass='BottomBlock' CssStyle="margin-top:10px;">
    <Block CssClass='Flex1' ID="flex1" />
    <Button ID="btnReset" Text="还原配置" CssClass='SpecialButton' OnClick="doReset" />
    <Button Text="关闭" OnClick="doSave" />
  </HBlock>

  <Style>
    .Grid .GridBodyRow:hover>td{background-color: #fdf7df;}
    .tdp {background: linear-gradient(to right, #eee, #eee);background-size: 0 100%;background-repeat: no-repeat;}
  </Style>
</Page>