为Yahoo! UI Extensions Grid增加内置的可编辑器
原文地址文章日期:2006/9/10
对YUI-EXT GIRD功能需求最强烈的是内置可编辑的支持。市场上大多数收费的JAVASCRIPT GIRD,我看过的那些可编辑支持,并没有给我留下太深的印象。它给你一个基本的TEXT FIELD,一些CHECKBOXS或者是Select fields,这导致了你一边单击某个字段在编辑,另一边厢插入一个FORM到这个单元格之中,不知不觉地,会出现越来越多编辑过的“脚印footprint",尤其是IE,在很多行的情况下。 所以我决定不采用这种方法,而采用类似于Windows或JavaSwing的方式,设计yui-ext Gird的编辑器。为了这一起成为可能,你的反馈必不可少,尤其是你觉得缺少了某些功能,不妨反馈给我。
可编辑GIRD的例子
这是个正在ALPHA测试中的可编辑GIRD。单击某个单元格可编辑。试试这些:输入一个错误的日期;输入大于10的price;输入早于01/01/06的日期;空白CommonName字段;测试数字字段蒙板;双击每列之间的分隔符,可自动调整每列宽度,鼠标滚轮滚动Data picker。
/*
* yui-ext
* Copyright(c) 2006, Jack Slocum.
*/
EditorExample = function(){
var dataModel;
var grid;
var colModel;
var formatMoney = function(value){
value -= 0;
value = (Math.round(value*100))/100;
value = (value == Math.floor(value)) ? value + '.00' : ( (value*10 == Math.floor(value*10)) ? value + '0' : value);
return "$" + value;
};
var formatBoolean = function(value){
return value ? 'Yes' : 'No';
};
var formatDate = function(value){
return value.dateFormat('M d, Y');
};
var parseDate = function(value){
return new Date(Date.parse(value));
};
return {
init : function(){
var yg = YAHOO.ext.grid;
var cols = [{
header: "Common Name",
width: 130,
editor: new yg.TextEditor({allowBlank: false})
},{
header: "Light",
width: 130,
editor: new yg.SelectEditor('light')
},{
header: "Price",
width: 70,
renderer: formatMoney,
editor: new yg.NumberEditor({allowBlank: false, allowNegative: false, maxValue: 10})
},{
header: "Available",
width: 95,
renderer: formatDate,
editor: new yg.DateEditor({format: 'm/d/y', minValue: '01/01/06', disabledDays: [0, 6],
disabledDaysText: 'Plants are not available on the weekends',
disabledDates : ['^07', '04/15', '12/02/06'],
disabledDatesText : 'The plants are pollinating on %0, choose a different date.'})
},{
header: "Indoor?",
width: 55,
renderer: formatBoolean,
editor: new yg.CheckboxEditor()
}];
colModel = new YAHOO.ext.grid.DefaultColumnModel(cols);
colModel.defaultSortable = true;
var schema = {
tagName: 'plant',
id: 'use-index',
fields: ['common', 'light', 'price', 'availability', 'indoor']
};
dataModel = new YAHOO.ext.grid.XMLDataModel(schema);
dataModel.addPreprocessor(2, parseFloat);
dataModel.addPreprocessor(3, parseDate);
dataModel.addPreprocessor(4, Boolean);
dataModel.setDefaultSort(colModel, 0, "ASC");
grid = new YAHOO.ext.grid.EditorGrid('editor-grid', dataModel, colModel);
// to use double click to edit:
//grid.getSelectionModel().clicksToActivateCell = 2;
grid.render();
dataModel.load('demos/plants.xml');
},
// filtering support, regex, function or text match
filter : function(e){
var mfilter = function(value){
return (value == 'Shade');
}
dataModel.filter({0: /^B.*/i, 1: mfilter});
},
// hide columns
hide : function(e){
colModel.setHidden(1, true);
}
};
}();
YAHOO.ext.EventManager.onDocumentReady(EditorExample.init, EditorExample, true);
Q:unknown {
content: ''
}
Q:unknown {
content: ''
}
.ygrid-cell-text {
PADDING-RIGHT: 5px; DISPLAY: block; PADDING-LEFT: 5px; PADDING-BOTTOM: 3px; FONT: 8pt arial; OVERFLOW: hidden; PADDING-TOP: 3px; WHITE-SPACE: nowrap
}
.ygrid-col {
DISPLAY: block; OVERFLOW: hidden; BORDER-LEFT: #f1efe2 1px solid; CURSOR: default; POSITION: absolute; HEIGHT: 21px! important; box-sizing: border-box; moz-box-sizing: border-box; moz-outline: none; moz-user-focus: normal
}
.yeditgrid .ygrid-col {
moz-outline: normal
}
.ygrid-col {
FONT: 8pt arial; TEXT-OVERFLOW: ellipsis; o-text-overflow: ellipsis
}
.ygrid-hd {
FONT: 8pt arial; TEXT-OVERFLOW: ellipsis; o-text-overflow: ellipsis
}
.ygrid-col-0 {
BORDER-LEFT-WIDTH: 0px; LEFT: 0px; WIDTH: 130px
}
.ygrid-col-last {
BORDER-RIGHT: #f1efe2 1px solid
}
.ygrid-editor {
BORDER-RIGHT: #afbdc9 1px solid; BORDER-TOP: #afbdc9 1px solid; Z-INDEX: 10; VISIBILITY: hidden; FONT: 8pt arial; BORDER-LEFT: #afbdc9 1px solid; BORDER-BOTTOM: #afbdc9 1px solid; POSITION: absolute; box-sizing: border-box; moz-box-sizing: border-box
}
.ygrid-editor INPUT {
BORDER-TOP-WIDTH: 0px; PADDING-LEFT: 3px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; FONT: 8pt arial; PADDING-TOP: 2px; BORDER-RIGHT-WIDTH: 0px
}
.ygrid-editor-container {
DISPLAY: block; OVERFLOW: hidden; BACKGROUND-COLOR: white
}
.ygrid-editor .pick-button {
DISPLAY: block; Z-INDEX: 2; RIGHT: 0px; BACKGROUND-IMAGE: url(../images/grid/pick-button.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 0px; HEIGHT: 20px
}
.ygrid-editor-invalid {
BORDER-RIGHT: #afbdc9 1px solid; BACKGROUND-POSITION: 50% bottom; BORDER-TOP: #afbdc9 1px solid; BACKGROUND-IMAGE: url(../images/grid/invalid_line.gif); BORDER-LEFT: #afbdc9 1px solid; BORDER-BOTTOM: #afbdc9 1px solid; BACKGROUND-REPEAT: repeat-x
}
.ygrid-checkbox-editor {
DISPLAY: block; OVERFLOW: hidden; BACKGROUND-COLOR: white; TEXT-ALIGN: center
}
.ygrid-checkbox-editor INPUT {
MARGIN-TOP: 3px; WIDTH: 13px; HEIGHT: 13px
}
SELECT.ygrid-editor {
BORDER-RIGHT: #afbdc9 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: #afbdc9 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; BORDER-LEFT: #afbdc9 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: #afbdc9 1px solid; moz-outline: none
}
.ygrid-num-editor {
PADDING-LEFT: 3px; PADDING-TOP: 2px; TEXT-ALIGN: right
}
.ygrid-text-editor {
PADDING-LEFT: 3px; PADDING-TOP: 2px
}
.ygrid-hd {
DISPLAY: block; OVERFLOW: hidden; BORDER-BOTTOM: #cbc7b8 1px solid; POSITION: absolute; BACKGROUND-COLOR: #ebeadb; box-sizing: border-box; moz-box-sizing: border-box
}
.ygrid-column-sizer {
BORDER-RIGHT: #6593cf 1px dashed; BACKGROUND: none transparent scroll repeat 0% 0%; WIDTH: 1px; CURSOR: col-resize
}
.ygrid-drag-proxy {
BORDER-RIGHT: #002266 1px solid; BORDER-TOP: #002266 1px solid; Z-INDEX: 10000; VISIBILITY: hidden; BORDER-LEFT: #002266 1px solid; WIDTH: 150px; BORDER-BOTTOM: #002266 1px solid; POSITION: absolute; HEIGHT: 24px; BACKGROUND-COLOR: #3366cc
}
.ygrid-drag-text {
PADDING-RIGHT: 3px; DISPLAY: block; PADDING-LEFT: 3px; LEFT: 26px; PADDING-BOTTOM: 3px; FONT: 8pt arial; COLOR: white; PADDING-TOP: 3px; POSITION: absolute; TOP: 0px
}
.ygrid-drop-icon {
BACKGROUND-POSITION: center 50%; DISPLAY: block; LEFT: 0px; WIDTH: 24px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 0px; HEIGHT: 100%
}
.ygrid-drop-nodrop {
BACKGROUND-IMAGE: url(../images/grid/drop-no.gif)
}
.ygrid-drop-ok {
BACKGROUND-IMAGE: url(../images/grid/drop-yes.gif)
}
.ygrid-hd .sort-asc {
BACKGROUND-POSITION: right 50%; DISPLAY: none; BACKGROUND-IMAGE: url(../images/grid/sort_asc.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 14px
}
.ygrid-hd .sort-desc {
BACKGROUND-POSITION: right 50%; DISPLAY: none; BACKGROUND-IMAGE: url(../images/grid/sort_desc.gif); WIDTH: 16px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 14px
}
.ygrid-hd-body {
PADDING-RIGHT: 5px; DISPLAY: block; PADDING-LEFT: 5px; LEFT: 0px; PADDING-BOTTOM: 3px; FONT: 8pt arial; OVERFLOW: hidden; CURSOR: default; PADDING-TOP: 3px; BORDER-BOTTOM: #d6d2c2 2px solid; WHITE-SPACE: nowrap; POSITION: relative; TOP: 0px
}
.ygrid-hd-body SPAN {
FONT: 8pt arial; WHITE-SPACE: nowrap
}
.ygrid-hd-over {
BORDER-BOTTOM: #fcc247 2px solid
}
.ygrid-hd-over .ygrid-hd-body {
BORDER-BOTTOM: #f9a900 1px solid; BACKGROUND-COLOR: #faf9f4
}
.ygrid-hd-split {
BACKGROUND-POSITION: center 50%; DISPLAY: block; FONT-SIZE: 1px; Z-INDEX: 3; BACKGROUND-IMAGE: url(../images/grid/grid-split.gif); OVERFLOW: hidden; WIDTH: 6px; CURSOR: e-resize; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 2px; HEIGHT: 16px
}
.ygrid-hrow {
DISPLAY: block; Z-INDEX: 2; LEFT: 0px; OVERFLOW: hidden; WIDTH: 10000px; POSITION: relative; TOP: 0px; HEIGHT: 22px; BACKGROUND-COLOR: #ebeadb
}
.ygrid-hrow-frame {
DISPLAY: block; Z-INDEX: 1; LEFT: 0px; WIDTH: 10000px; POSITION: absolute; TOP: 0px; HEIGHT: 22px
}
.ygrid-footer .ytoolbar {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ygrid-page-number {
WIDTH: 24px; HEIGHT: 14px
}
.ygrid-page-first {
BACKGROUND-IMAGE: url(../images/grid/page-first.gif)
}
.ygrid-loading {
BACKGROUND-IMAGE: url(../images/grid/done.gif)
}
.ygrid-page-last {
BACKGROUND-IMAGE: url(../images/grid/page-last.gif)
}
.ygrid-page-next {
BACKGROUND-IMAGE: url(../images/grid/page-next.gif)
}
.ygrid-page-prev {
BACKGROUND-IMAGE: url(../images/grid/page-prev.gif)
}
.ytb-button-disabled .ygrid-loading {
BACKGROUND-IMAGE: url(../images/grid/loading.gif)
}
.ytb-button-disabled .ygrid-page-first {
BACKGROUND-IMAGE: url(../images/grid/page-first-disabled.gif)
}
.ytb-button-disabled .ygrid-page-last {
BACKGROUND-IMAGE: url(../images/grid/page-last-disabled.gif)
}
.ytb-button-disabled .ygrid-page-next {
BACKGROUND-IMAGE: url(../images/grid/page-next-disabled.gif)
}
.ytb-button-disabled .ygrid-page-prev {
BACKGROUND-IMAGE: url(../images/grid/page-prev-disabled.gif)
}
.ygrid-mso {
}
.ygrid-mso .ygrid-hd {
BACKGROUND: none transparent scroll repeat 0% 0%; BORDER-BOTTOM-WIDTH: 0px
}
.ygrid-mso .ygrid-footer {
BORDER-TOP: #6593cf 1px solid
}
.ygrid-mso .ygrid-footer .ygrid-fbutton {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ygrid-mso .ygrid-hd-body {
BORDER-BOTTOM-WIDTH: 0px
}
.ygrid-mso .ygrid-hd-over {
BORDER-BOTTOM-WIDTH: 0px
}
.ygrid-mso .ygrid-hd-over .ygrid-hd-body {
BACKGROUND-COLOR: transparent
}
.ygrid-mso .ygrid-hd-split {
BACKGROUND-IMAGE: url(../images/grid/grid-blue-split.gif)
}
.ygrid-mso .ytoolbar .ytb-sep {
BACKGROUND-IMAGE: url(../images/grid/grid-blue-split.gif)
}
.ygrid-mso .ygrid-hrow {
BACKGROUND: url(../images/grid/mso-hd.gif); BORDER-BOTTOM: #6593cf 1px solid; HEIGHT: 21px
}
.ygrid-mso .ygrid-row {
COLOR: black; BORDER-BOTTOM: #ddecfe 1px solid
}
.ygrid-mso .ygrid-row-alt {
BACKGROUND-COLOR: #f5f5f5
}
.ygrid-mso .ygrid-row-selected {
COLOR: black; BACKGROUND-COLOR: #b3c8e8! important
}
.ygrid-mso .ygrid-row-selected SPAN {
COLOR: black! important
}
.yprops-grid .ygrid-col-1 {
BACKGROUND-COLOR: #f1efe2
}
.yprops-grid .ygrid-col-1 .ygrid-cell-text {
BACKGROUND-COLOR: white
}
.yprops-grid .ygrid-col-0 {
BACKGROUND-COLOR: #f1efe2
}
.yprops-grid .ygrid-col-0 .ygrid-cell-text {
MARGIN-LEFT: 10px; BACKGROUND-COLOR: white
}
.yprops-grid .ygrid-prop-edting .ygrid-col-0 .ygrid-cell-text {
COLOR: white; BACKGROUND-COLOR: #316ac5
}
.yprops-grid .ygrid-prop-edting .ygrid-col-0 {
COLOR: white
}
.yprops-grid .ygrid-num-editor {
TEXT-ALIGN: left
}
.ygrid-row {
DISPLAY: block; OVERFLOW: visible; WIDTH: 10000px; BORDER-BOTTOM: #f1efe2 1px solid; WHITE-SPACE: nowrap; POSITION: absolute; HEIGHT: 21px; box-sizing: border-box; moz-box-sizing: border-box
}
.ygrid-row-alt {
BACKGROUND-COLOR: #fcfaf6
}
.ygrid-row-over {
COLOR: black; BACKGROUND-COLOR: #f1f1f1
}
.ygrid-row-selected {
COLOR: white; BACKGROUND-COLOR: #316ac5! important
}
.ygrid-row-selected SPAN {
COLOR: white! important
}
.ygrid-vista {
BORDER-RIGHT: #535353 1px solid; BORDER-TOP: #535353 1px solid; BORDER-LEFT: #535353 1px solid; BORDER-BOTTOM: #535353 1px solid
}
.ygrid-vista .ygrid-hd {
BORDER-BOTTOM-WIDTH: 0px
}
.ygrid-vista .ygrid-hd-body {
BORDER-BOTTOM: #b3bcc0 1px solid
}
.ygrid-vista .ygrid-hd-over {
BORDER-BOTTOM-WIDTH: 0px
}
.ygrid-vista .ygrid-hd-over .ygrid-hd-body {
BORDER-BOTTOM-WIDTH: 0px; BACKGROUND-COLOR: transparent
}
.ygrid-vista .ygrid-hd-split {
BACKGROUND-IMAGE: url(../images/grid/grid-split.gif)
}
.ygrid-vista .ygrid-hrow {
BACKGROUND: url(../images/grid/grid-vista-hd.gif); HEIGHT: 21px
}
.ygrid-vista .ygrid-row-alt {
BACKGROUND-COLOR: #f5f5f5
}
.ygrid-vista .ygrid-row-selected {
COLOR: white; BACKGROUND-COLOR: #535353! important
}
.ygrid-vista .ygrid-row-selected SPAN {
COLOR: white! important
}
.ygrid-vista .ygrid-wrap-body {
}
.ygrid-wrap {
LEFT: 0px; OVERFLOW: auto; WIDTH: 100%; POSITION: relative; TOP: 22px; HEIGHT: 100%
}
.ygrid-footer {
PADDING-RIGHT: 0px; BORDER-TOP: #cbc7b8 1px solid; DISPLAY: block; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
.ygrid-wrap-footer {
DISPLAY: block; OVERFLOW: hidden; WIDTH: 100%; BOTTOM: 0px; POSITION: absolute; HEIGHT: 25px; BACKGROUND-COLOR: #ebeadb; box-sizing: border-box; moz-box-sizing: border-box
}
.ygrid-wrap-body {
DISPLAY: block; LEFT: 0px; OVERFLOW: hidden; POSITION: absolute; TOP: 0px
}
.ygrid-wrap-headers {
Z-INDEX: 12; LEFT: 0px; OVERFLOW: hidden; POSITION: absolute; TOP: 0px
}
.ygrid-col-0 {
}
.ygrid-col-1 {
LEFT: 130px; WIDTH: 130px
}
.ygrid-col-10 {
}
.ygrid-col-11 {
}
.ygrid-col-12 {
}
.ygrid-col-13 {
}
.ygrid-col-14 {
}
.ygrid-col-15 {
}
.ygrid-col-16 {
}
.ygrid-col-17 {
}
.ygrid-col-18 {
}
.ygrid-col-19 {
}
.ygrid-col-2 {
}
.ygrid-col-20 {
}
.ygrid-col-3 {
LEFT: 330px; WIDTH: 95px
}
.ygrid-col-4 {
LEFT: 425px; WIDTH: 55px
}
.ygrid-col-5 {
}
.ygrid-col-6 {
}
.ygrid-col-7 {
}
.ygrid-col-8 {
}
.ygrid-col-9 {
}
.ygrid-header-0 {
}
.ygrid-header-1 {
}
.ygrid-header-10 {
}
.ygrid-header-11 {
}
.ygrid-header-12 {
}
.ygrid-header-13 {
}
.ygrid-header-14 {
}
.ygrid-header-15 {
}
.ygrid-header-16 {
}
.ygrid-header-17 {
}
.ygrid-header-18 {
}
.ygrid-header-19 {
}
.ygrid-header-2 {
}
.ygrid-header-20 {
}
.ygrid-header-3 {
}
.ygrid-header-4 {
}
.ygrid-header-5 {
}
.ygrid-header-6 {
}
.ygrid-header-7 {
}
.ygrid-header-8 {
}
.ygrid-header-9 {
}
#grid-example {
BORDER-RIGHT: #cbc7b8 1px solid; BORDER-TOP: #cbc7b8 1px solid; LEFT: 0px; BORDER-LEFT: #cbc7b8 1px solid; BORDER-BOTTOM: #cbc7b8 1px solid; POSITION: relative; TOP: 0px
}
#grid-example .ygrid-col-0 {
}
#grid-example .ygrid-col-1 {
TEXT-ALIGN: right
}
#grid-example .ygrid-col-2 {
TEXT-ALIGN: right
}
#grid-example .ygrid-col-3 {
TEXT-ALIGN: right
}
#grid-example .ygrid-col-4 {
TEXT-ALIGN: right
}
.ygrid-mso#grid-example {
BORDER-RIGHT: #6593cf 1px solid; BORDER-TOP: #6593cf 1px solid; BORDER-LEFT: #6593cf 1px solid; BORDER-BOTTOM: #6593cf 1px solid
}
.ygrid-vista#grid-example {
BORDER-RIGHT: #b3bcc0 1px solid; BORDER-TOP: #b3bcc0 1px solid; BORDER-LEFT: #b3bcc0 1px solid; BORDER-BOTTOM: #b3bcc0 1px solid
}
#xml-grid-example {
BORDER-RIGHT: #cbc7b8 1px solid; BORDER-TOP: #cbc7b8 1px solid; LEFT: 0px; BORDER-LEFT: #cbc7b8 1px solid; BORDER-BOTTOM: #cbc7b8 1px solid; POSITION: relative; TOP: 0px
}
#xml-grid-example .ygrid-col-0 {
}
#xml-grid-example .ygrid-col-1 {
}
#xml-grid-example .ygrid-col-2 {
}
#xml-grid-example .ygrid-col-3 {
}
.ygrid-mso#xml-grid-example {
BORDER-RIGHT: #6593cf 1px solid; BORDER-TOP: #6593cf 1px solid; BORDER-LEFT: #6593cf 1px solid; BORDER-BOTTOM: #6593cf 1px solid
}
.ygrid-vista#xml-grid-example {
BORDER-RIGHT: #b3bcc0 1px solid; BORDER-TOP: #b3bcc0 1px solid; BORDER-LEFT: #b3bcc0 1px solid; BORDER-BOTTOM: #b3bcc0 1px solid
}
#editor-grid .ygrid-col-2 {
LEFT: 260px; WIDTH: 70px; TEXT-ALIGN: right
}
.ypopcal {
BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 2px; BACKGROUND: white; PADDING-BOTTOM: 2px; BORDER-LEFT: gray 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: gray 1px solid
}
.ypopcal-shadow {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #dddddd; FILTER: progid:DXImageTransform.Microsoft.Blur(MakeShadow=true,pixelradius=1) Alpha(opacity=35,style=1,startX=0,finishX=200,FinishOpacity=35); PADDING-BOTTOM: 0px; PADDING-TOP: 0px; POSITION: absolute
}
.ypopcal-head {
BACKGROUND: #93b5e4; WIDTH: 150px
}
.ypopcal-head TD {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px
}
.ypopcal-month {
FONT: bold 7pt verdana; COLOR: white; TEXT-ALIGN: center; TEXT-DECORATION: none
}
.ypopcal-head .ypopcal-arrow {
WIDTH: 16px; CURSOR: pointer; TEXT-ALIGN: center; moz-user-select: none
}
.ypopcal-head .next-month {
BACKGROUND-POSITION: center 50%; BACKGROUND-IMAGE: url(../images/grid/arrow-right-white.gif); WIDTH: 16px; CURSOR: pointer; BACKGROUND-REPEAT: no-repeat
}
.ypopcal-head .prev-month {
BACKGROUND-POSITION: center 50%; BACKGROUND-IMAGE: url(../images/grid/arrow-left-white.gif); WIDTH: 16px; CURSOR: pointer; BACKGROUND-REPEAT: no-repeat
}
.ypopcal-table {
BACKGROUND: white; BORDER-BOTTOM: #cccccc 1px solid
}
.ypopcal-table TR {
}
.ypopcal-table TD {
BORDER-RIGHT: white 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: white 1px solid; PADDING-LEFT: 2px; BACKGROUND: white; PADDING-BOTTOM: 1px; FONT: 8pt arial; BORDER-LEFT: white 1px solid; WIDTH: 12px; CURSOR: pointer; COLOR: #aaaaaa; PADDING-TOP: 1px; BORDER-BOTTOM: white 1px solid; HEIGHT: 12px; TEXT-ALIGN: right; box-sizing: border-box; moz-box-sizing: border-box
}
.ypopcal-table TD.today {
BORDER-RIGHT: darkred 1px solid; BORDER-TOP: darkred 1px solid; BORDER-LEFT: darkred 1px solid; BORDER-BOTTOM: darkred 1px solid
}
.ypopcal-table .ypopcal-daynames TD {
BORDER-TOP-WIDTH: 0px; FONT-WEIGHT: normal; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 8pt; CURSOR: default; COLOR: black; BORDER-BOTTOM: #cccccc 1px solid; TEXT-ALIGN: right; BORDER-RIGHT-WIDTH: 0px
}
.ypopcal-table TD.active {
CURSOR: pointer; COLOR: black
}
.ypopcal-table TD.ypopcal-disabled {
BORDER-RIGHT: #eeeeee 1px solid; BORDER-TOP: #eeeeee 1px solid; BACKGROUND: #eeeeee; BORDER-LEFT: #eeeeee 1px solid; CURSOR: default; COLOR: #bbbbbb; BORDER-BOTTOM: #eeeeee 1px solid
}
.ypopcal-table TD.selected {
BORDER-RIGHT: #c3daf9 1px solid; BORDER-TOP: #c3daf9 1px solid; BACKGROUND: #ddecfe; BORDER-LEFT: #c3daf9 1px solid; BORDER-BOTTOM: #c3daf9 1px solid
}
.ypopcal-today {
MARGIN-TOP: 0px; DISPLAY: inline-block; FONT: 8pt arial; MARGIN-LEFT: 2px; CURSOR: hand; COLOR: black; TEXT-DECORATION: none
}
.ygrid-simple-view .ygrid-col {
DISPLAY: inline-block; POSITION: static; HEIGHT: 100%! important
}
.ygrid-simple-view .ygrid-row {
POSITION: static
}
.yresizable-handle {
FONT-SIZE: 1px; Z-INDEX: 100; BACKGROUND: white; FILTER: alpha(opacity=0); OVERFLOW: hidden; LINE-HEIGHT: 1px; POSITION: absolute; opacity: 0
}
.yresizable-handle-east {
RIGHT: 0px; WIDTH: 5px; CURSOR: e-resize; TOP: 0px; HEIGHT: 100%
}
.yresizable-handle-south {
LEFT: 0px; WIDTH: 100%; CURSOR: s-resize; BOTTOM: 0px; HEIGHT: 5px
}
.yresizable-handle-west {
LEFT: 0px; WIDTH: 5px; CURSOR: w-resize; TOP: 0px; HEIGHT: 100%
}
.yresizable-handle-north {
LEFT: 0px; WIDTH: 100%; CURSOR: n-resize; TOP: 0px; HEIGHT: 5px
}
.yresizable-handle-southeast {
Z-INDEX: 101; RIGHT: 0px; WIDTH: 6px; CURSOR: se-resize; BOTTOM: 0px; HEIGHT: 6px
}
.yresizable-over .yresizable-handle {
FILTER: alpha(opacity=100); opacity: 1
}
.yresizable-pinned .yresizable-handle {
FILTER: alpha(opacity=100); opacity: 1
}
.yresizable-over .yresizable-handle-east {
BACKGROUND: url(../images/sizer/e-handle.gif) left 50%; BORDER-LEFT: #98c0f4 1px solid
}
.yresizable-pinned .yresizable-handle-east {
BACKGROUND: url(../images/sizer/e-handle.gif) left 50%; BORDER-LEFT: #98c0f4 1px solid
}
.yresizable-over .yresizable-handle-east {
BORDER-RIGHT: #98c0f4 1px solid; BACKGROUND: url(../images/sizer/e-handle.gif) left 50%
}
.yresizable-pinned .yresizable-handle-west {
BORDER-RIGHT: #98c0f4 1px solid; BACKGROUND: url(../images/sizer/e-handle.gif) left 50%
}
.yresizable-over .yresizable-handle-south {
BORDER-TOP: #98c0f4 1px solid; BACKGROUND: url(../images/sizer/s-handle.gif) 50% top
}
.yresizable-pinned .yresizable-handle-south {
BORDER-TOP: #98c0f4 1px solid; BACKGROUND: url(../images/sizer/s-handle.gif) 50% top
}
.yresizable-over .yresizable-handle-south {
BACKGROUND: url(../images/sizer/s-handle.gif) 50% top; BORDER-BOTTOM: #98c0f4 1px solid
}
.yresizable-pinned .yresizable-handle-north {
BACKGROUND: url(../images/sizer/s-handle.gif) 50% top; BORDER-BOTTOM: #98c0f4 1px solid
}
.yresizable-over .yresizable-handle-southeast {
BACKGROUND: url(../images/sizer/se-handle.gif)
}
.yresizable-pinned .yresizable-handle-southeast {
BACKGROUND: url(../images/sizer/se-handle.gif)
}
.yresizable-proxy {
BORDER-RIGHT: #6593cf 1px dashed; BORDER-TOP: #6593cf 1px dashed; Z-INDEX: 1001; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-LEFT: #6593cf 1px dashed; BORDER-BOTTOM: #6593cf 1px dashed; POSITION: absolute
}
.ytheme-gray .yresizable-over .yresizable-handle-east {
BACKGROUND: url(../images/sizer/gray/e-handle.gif) left 50%; BORDER-LEFT: #615e55 1px solid
}
.ytheme-gray .yresizable-pinned .yresizable-handle-east {
BACKGROUND: url(../images/sizer/gray/e-handle.gif) left 50%; BORDER-LEFT: #615e55 1px solid
}
.ytheme-gray .yresizable-over .yresizable-handle-east {
BORDER-RIGHT: #615e55 1px solid; BACKGROUND: url(../images/sizer/gray/e-handle.gif) left 50%
}
.ytheme-gray .yresizable-pinned .yresizable-handle-west {
BORDER-RIGHT: #615e55 1px solid; BACKGROUND: url(../images/sizer/gray/e-handle.gif) left 50%
}
.ytheme-gray .yresizable-over .yresizable-handle-south {
BORDER-TOP: #615e55 1px solid; BACKGROUND: url(../images/sizer/gray/s-handle.gif) 50% top
}
.ytheme-gray .yresizable-pinned .yresizable-handle-south {
BORDER-TOP: #615e55 1px solid; BACKGROUND: url(../images/sizer/gray/s-handle.gif) 50% top
}
.ytheme-gray .yresizable-over .yresizable-handle-south {
BACKGROUND: url(../images/sizer/gray/s-handle.gif) 50% top; BORDER-BOTTOM: #615e55 1px solid
}
.ytheme-gray .yresizable-pinned .yresizable-handle-north {
BACKGROUND: url(../images/sizer/gray/s-handle.gif) 50% top; BORDER-BOTTOM: #615e55 1px solid
}
.ytheme-gray .yresizable-over .yresizable-handle-southeast {
BACKGROUND: url(../images/sizer/gray/se-handle.gif)
}
.ytheme-gray .yresizable-pinned .yresizable-handle-southeast {
BACKGROUND: url(../images/sizer/gray/se-handle.gif)
}
.ytheme-gray .yresizable-proxy {
BORDER-RIGHT: #615e55 1px dashed; BORDER-TOP: #615e55 1px dashed; BORDER-LEFT: #615e55 1px dashed; BORDER-BOTTOM: #615e55 1px dashed
}
.ytoolbar {
BORDER-RIGHT: #cbc7b8 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: #cbc7b8 1px solid; DISPLAY: block; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; BORDER-LEFT: #cbc7b8 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #cbc7b8 1px solid; BACKGROUND-COLOR: #ebeadb
}
.mso .ytoolbar {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND: url(../images/grid/mso-hd.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ygrid-mso .ytoolbar {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND: url(../images/grid/mso-hd.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytoolbar TD {
FONT: 8pt arial,helvetica
}
.ytoolbar SPAN {
FONT: 8pt arial,helvetica
}
.ytoolbar INPUT {
FONT: 8pt arial,helvetica
}
.ytoolbar DIV {
FONT: 8pt arial,helvetica
}
.ytoolbar .ytb-button-disabled .ytb-button-inner {
CURSOR: default; COLOR: gray
}
.ytoolbar .ytb-button-inner {
BACKGROUND-POSITION: center 50%; DISPLAY: block; WIDTH: 16px; CURSOR: pointer; BACKGROUND-REPEAT: no-repeat; WHITE-SPACE: nowrap; HEIGHT: 16px
}
.ytoolbar .ytb-text {
PADDING-RIGHT: 2px; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px
}
.ytoolbar .ytb-button {
PADDING-RIGHT: 2px; DISPLAY: block; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px
}
.ytoolbar .ytb-button-over {
BORDER-RIGHT: #316ac5 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: #316ac5 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #316ac5 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #316ac5 1px solid; BACKGROUND-COLOR: #c3d3ed
}
.ytoolbar .ytb-sep {
BORDER-TOP-WIDTH: 0px; BACKGROUND-POSITION: center 50%; DISPLAY: block; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 1px; BACKGROUND-IMAGE: url(../images/grid/grid-split.gif); BORDER-BOTTOM-WIDTH: 0px; MARGIN: 0px 2px; OVERFLOW: hidden; WIDTH: 4px; CURSOR: default; BACKGROUND-REPEAT: no-repeat; HEIGHT: 16px; BORDER-RIGHT-WIDTH: 0px
}
.mso .ytoolbar .ytb-sep {
BACKGROUND-IMAGE: url(../images/grid/grid-blue-split.gif)
}
.ygrid-mso .ytoolbar .ytb-sep {
BACKGROUND-IMAGE: url(../images/grid/grid-blue-split.gif)
}
.ytab-wrap {
PADDING-TOP: 2px; BORDER-BOTTOM: #6593cf 1px solid
}
.ytab-wrap TABLE {
LEFT: 0px; POSITION: relative; TOP: 0px
}
.ytab-strip TD {
PADDING-LEFT: 2px
}
.ytab-strip A {
DISPLAY: block
}
.ytab-strip SPAN {
DISPLAY: block
}
.ytab-strip EM {
DISPLAY: block
}
.ytab-strip A {
CURSOR: pointer; TEXT-DECORATION: none! important; outline: none; moz-outline: none
}
.ytab-strip .ytab-text {
FONT: bold 11px tahoma,arial,helvetica; OVERFLOW: hidden; CURSOR: pointer; COLOR: #666; WHITE-SPACE: nowrap; TEXT-OVERFLOW: ellipsis
}
.ytab-strip .on .ytab-text {
CURSOR: default; COLOR: #083772
}
.ytab-strip .disabled .ytab-text {
CURSOR: default; COLOR: #aaaaaa
}
.ytab-strip .ytab-inner {
PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px
}
.ytab-strip .on .ytab-right {
BACKGROUND: url(../images/tabs/tab-sprite.gif) no-repeat right 0px
}
.ytab-strip .on .ytab-left {
BACKGROUND: url(../images/tabs/tab-sprite.gif) no-repeat 0px -100px
}
.ytab-strip .ytab-right {
BACKGROUND: url(../images/tabs/tab-sprite.gif) no-repeat right -50px
}
.ytab-strip .ytab-left {
BACKGROUND: url(../images/tabs/tab-sprite.gif) no-repeat 0px -150px
}
.ytab-strip A {
LEFT: 0px; POSITION: relative; TOP: 1px
}
.ytab-strip .on A {
}
.ytab-strip .on .ytab-inner {
PADDING-BOTTOM: 5px
}
.ytab-strip .ytab-closable .ytab-inner {
PADDING-RIGHT: 22px; POSITION: relative
}
.ytab-strip .ytab-closable .close-icon {
DISPLAY: block; FONT-SIZE: 1px; RIGHT: 5px; BACKGROUND-IMAGE: url(../images/layout/tab-close.gif); WIDTH: 11px; CURSOR: pointer; LINE-HEIGHT: 1px; POSITION: absolute; TOP: 4px; HEIGHT: 11px
}
.ytab-strip .on .close-icon {
BACKGROUND-IMAGE: url(../images/layout/tab-close-on.gif)
}
.ytab-strip .ytab-closable .close-over {
BACKGROUND-IMAGE: url(../images/layout/tab-close-on.gif)
}
.ytabs-bottom .ytab-wrap {
BORDER-TOP: #6593cf 1px solid; BORDER-BOTTOM-WIDTH: 0px; PADDING-BOTTOM: 2px; PADDING-TOP: 0px
}
.ytabs-bottom .ytab-strip .ytab-right {
BACKGROUND: url(../images/tabs/tab-btm-inactive-right-bg.gif) no-repeat left bottom
}
.ytabs-bottom .ytab-strip .ytab-left {
BACKGROUND: url(../images/tabs/tab-btm-inactive-left-bg.gif) no-repeat right bottom
}
.ytabs-bottom .ytab-strip .on .ytab-right {
BACKGROUND: url(../images/tabs/tab-btm-right-bg.gif) no-repeat left bottom
}
.ytabs-bottom .ytab-strip .on .ytab-left {
BACKGROUND: url(../images/tabs/tab-btm-left-bg.gif) no-repeat right bottom
}
.ytabs-bottom .ytab-strip A {
LEFT: 0px; POSITION: relative; TOP: 0px
}
.ytabs-bottom .ytab-strip .on A {
MARGIN-TOP: -1px
}
.ytabs-bottom .ytab-strip .on .ytab-inner {
PADDING-TOP: 5px
}
.ytheme-gray .ytab-wrap {
BORDER-BOTTOM: #aca899 1px solid
}
.ytheme-gray .ytab-strip .on .ytab-text {
CURSOR: default; COLOR: #333333
}
.ytheme-gray .ytabs-top .ytab-strip .on .ytab-right {
BACKGROUND: url(../images/tabs/gray/tab-sprite.gif) no-repeat right 0px
}
.ytheme-gray .ytabs-top .ytab-strip .on .ytab-left {
BACKGROUND: url(../images/tabs/gray/tab-sprite.gif) no-repeat 0px -100px
}
.ytheme-gray .ytabs-top .ytab-strip .ytab-right {
BACKGROUND: url(../images/tabs/gray/tab-sprite.gif) no-repeat right -50px
}
.ytheme-gray .ytabs-top .ytab-strip .ytab-left {
BACKGROUND: url(../images/tabs/gray/tab-sprite.gif) no-repeat 0px -150px
}
.ytheme-gray .ytab-strip .ytab-closable .close-icon {
BACKGROUND-IMAGE: url(../images/layout/gray/tab-close.gif)
}
.ytheme-gray .ytab-strip .on .close-icon {
BACKGROUND-IMAGE: url(../images/layout/gray/tab-close-on.gif)
}
.ytheme-gray .ytab-strip .ytab-closable .close-over {
BACKGROUND-IMAGE: url(../images/layout/gray/tab-close-on.gif)
}
.ytheme-gray .ytabs-bottom .ytab-wrap {
BORDER-TOP: #aca899 1px solid; BORDER-BOTTOM-WIDTH: 0px; PADDING-TOP: 0px
}
.ytheme-gray .ytabs-bottom .ytab-strip .ytab-right {
BACKGROUND: url(../images/tabs/gray/tab-btm-inactive-right-bg.gif) no-repeat left bottom
}
.ytheme-gray .ytabs-bottom .ytab-strip .ytab-left {
BACKGROUND: url(../images/tabs/gray/tab-btm-inactive-left-bg.gif) no-repeat right bottom
}
.ytheme-gray .ytabs-bottom .ytab-strip .on .ytab-right {
BACKGROUND: url(../images/tabs/gray/tab-btm-right-bg.gif) no-repeat left bottom
}
.ytheme-gray .ytabs-bottom .ytab-strip .on .ytab-left {
BACKGROUND: url(../images/tabs/gray/tab-btm-left-bg.gif) no-repeat right bottom
}
.ydlg-proxy {
BORDER-RIGHT: #6593cf 1px solid; BORDER-TOP: #6593cf 1px solid; Z-INDEX: 10001; LEFT: 0px; BACKGROUND-IMAGE: url(../images/gradient-bg.gif); OVERFLOW: hidden; BORDER-LEFT: #6593cf 1px solid; BORDER-BOTTOM: #6593cf 1px solid; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #c3daf9
}
.ydlg-shadow {
DISPLAY: none; BACKGROUND: #aaaaaa; POSITION: absolute
}
.ydlg-mask {
DISPLAY: none; Z-INDEX: 10000; FILTER: alpha(opacity=50); LEFT: 0px; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #ccc; opacity: .50; moz-opacity: 0.5
}
BODY.masked {
OVERFLOW: hidden
}
BODY.masked SELECT {
VISIBILITY: hidden
}
BODY.masked .ydlg SELECT {
VISIBILITY: visible
}
.ydlg {
Z-INDEX: 10001; OVERFLOW: hidden; POSITION: absolute; TOP: 0px
}
.yresizable-proxy {
Z-INDEX: 10002
}
.ydlg .ydlg-hd {
PADDING-RIGHT: 5px; PADDING-LEFT: 5px; BACKGROUND: url(../images/basic-dialog/hd-sprite.gif) navy repeat-x 0px -82px; PADDING-BOTTOM: 5px; FONT: bold 12px "sans serif", tahoma, verdana, helvetica; OVERFLOW: hidden; COLOR: #fff; PADDING-TOP: 5px
}
.ydlg .ydlg-hd-left {
PADDING-LEFT: 3px; BACKGROUND: url(../images/basic-dialog/hd-sprite.gif) no-repeat 0px -41px; MARGIN: 0px
}
.ydlg .ydlg-hd-right {
PADDING-RIGHT: 3px; BACKGROUND: url(../images/basic-dialog/hd-sprite.gif) no-repeat right 0px
}
.ydlg .ydlg-dlg-body {
BORDER-TOP-WIDTH: 0px; BORDER-RIGHT: #6593cf 1px solid; PADDING-RIGHT: 10px; PADDING-LEFT: 10px; BACKGROUND: url(../images/layout/gradient-bg.gif); PADDING-BOTTOM: 10px; BORDER-LEFT: #6593cf 1px solid; BORDER-TOP-COLOR: #6593cf; PADDING-TOP: 10px; BORDER-BOTTOM: #6593cf 1px solid
}
.ydlg .ydlg-bd {
OVERFLOW: hidden
}
.ydlg .ydlg-ft {
PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; PADDING-TOP: 5px
}
.ydlg .yui-ext-tabbody {
BACKGROUND: white; OVERFLOW: auto
}
.ydlg .ytabs-top .yui-ext-tabbody {
BORDER-TOP-WIDTH: 0px; BORDER-RIGHT: #6593cf 1px solid; BORDER-LEFT: #6593cf 1px solid; BORDER-TOP-COLOR: #6593cf; BORDER-BOTTOM: #6593cf 1px solid
}
.ydlg .ytabs-bottom .yui-ext-tabbody {
BORDER-RIGHT: #6593cf 1px solid; BORDER-TOP: #6593cf 1px solid; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #6593cf; BORDER-LEFT: #6593cf 1px solid
}
.ydlg .ylayout-container .yui-ext-tabbody {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ydlg .inner-tab {
MARGIN: 5px
}
.ydlg .ydlg-button {
CLEAR: none; FLOAT: right; FONT: 11px arial, tahoma, verdana, helvetica; CURSOR: pointer; MARGIN-RIGHT: 5px
}
.ydlg-button-left {
FONT-SIZE: 1px; LINE-HEIGHT: 1px
}
.ydlg-button-right {
FONT-SIZE: 1px; LINE-HEIGHT: 1px
}
.ydlg-button-left {
BACKGROUND: url(../images/basic-dialog/btn-sprite.gif) no-repeat 0px 0px; WIDTH: 3px; HEIGHT: 21px
}
.ydlg-button-right {
BACKGROUND: url(../images/basic-dialog/btn-sprite.gif) no-repeat 0px -21px; WIDTH: 3px; HEIGHT: 21px
}
.ydlg-button-focus {
TEXT-DECORATION: none! important
}
.ydlg-button-center {
PADDING-RIGHT: 5px; PADDING-LEFT: 5px; BACKGROUND: url(../images/basic-dialog/btn-sprite.gif) repeat-x 0px -42px; PADDING-BOTTOM: 0px; FONT: 11px "san serif",tahoma,verdana,helvetica; VERTICAL-ALIGN: middle; CURSOR: pointer; PADDING-TOP: 0px; WHITE-SPACE: nowrap; TEXT-ALIGN: center; moz-user-select: none; khtml-user-select: none
}
.ydlg-button-over .ydlg-button-left {
BACKGROUND-POSITION: 0px -63px
}
.ydlg-button-over .ydlg-button-right {
BACKGROUND-POSITION: 0px -84px
}
.ydlg-button-over .ydlg-button-center {
BACKGROUND-POSITION: 0px -105px
}
.ydlg-button-click .ydlg-button-center {
BACKGROUND-POSITION: 0px -126px
}
.ydlg-button-disabled {
CURSOR: default
}
.ydlg-button-disabled .ydlg-button-center {
CURSOR: default; COLOR: gray
}
.ydlg-draggable .ydlg-hd {
CURSOR: move
}
.ydlg-closable .ydlg-hd {
PADDING-RIGHT: 22px
}
.ydlg .ydlg-close {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 1px; Z-INDEX: 6; RIGHT: 4px; BACKGROUND-IMAGE: url(../images/basic-dialog/close.gif); VISIBILITY: inherit; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 15px; CURSOR: pointer; LINE-HEIGHT: 1px; PADDING-TOP: 0px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 4px; HEIGHT: 15px
}
.ydlg DIV.yresizable-handle-east {
BORDER-TOP-WIDTH: 0px; BACKGROUND-POSITION: right 50%; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/e-handle.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ydlg DIV.yresizable-handle-south {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/sizer/s-handle-dark.gif); BORDER-BOTTOM-WIDTH: 0px; HEIGHT: 6px; BORDER-RIGHT-WIDTH: 0px
}
.ydlg DIV.yresizable-handle-west {
BORDER-TOP-WIDTH: 0px; BACKGROUND-POSITION: 1px 50%; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/e-handle.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ydlg DIV.yresizable-handle-north {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/s.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ydlg DIV.yresizable-handle-southeast {
BORDER-TOP-WIDTH: 0px; BACKGROUND-POSITION: right bottom; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/se-handle.gif); BORDER-BOTTOM-WIDTH: 0px; WIDTH: 8px; HEIGHT: 8px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg-proxy {
BORDER-RIGHT: #b3b6b0 1px solid; BORDER-TOP: #b3b6b0 1px solid; BACKGROUND-IMAGE: url(../images/layout/gray/gradient-bg.gif); BORDER-LEFT: #b3b6b0 1px solid; BORDER-BOTTOM: #b3b6b0 1px solid; BACKGROUND-COLOR: #eae8d5
}
.ytheme-gray .ydlg-shadow {
BACKGROUND: #aaaaaa
}
.ytheme-gray .ydlg-proxy .tabset {
BACKGROUND: url(../images/layout/gray/gradient-bg.gif)
}
.ytheme-gray .ydlg .ydlg-hd {
BACKGROUND: url(../images/basic-dialog/gray/hd-sprite.gif) #333333 repeat-x 0px -82px
}
.ytheme-gray .ydlg .ydlg-hd-left {
BACKGROUND: url(../images/basic-dialog/gray/hd-sprite.gif) no-repeat 0px -41px
}
.ytheme-gray .ydlg .ydlg-hd-right {
BACKGROUND: url(../images/basic-dialog/gray/hd-sprite.gif) no-repeat right 0px
}
.ytheme-gray .ydlg .ydlg-dlg-body {
BORDER-TOP-WIDTH: 0px; BORDER-RIGHT: #b3b6b0 1px solid; BACKGROUND: #efefec; BORDER-LEFT: #b3b6b0 1px solid; BORDER-TOP-COLOR: #b3b6b0; BORDER-BOTTOM: #b3b6b0 1px solid
}
.ytheme-gray .ydlg .ytabs-top .yui-ext-tabbody {
BORDER-TOP-WIDTH: 0px; BORDER-RIGHT: #b3b6b0 1px solid; BORDER-LEFT: #b3b6b0 1px solid; BORDER-TOP-COLOR: #b3b6b0; BORDER-BOTTOM: #b3b6b0 1px solid
}
.ytheme-gray .ydlg .ytabs-bottom .yui-ext-tabbody {
BORDER-RIGHT: #b3b6b0 1px solid; BORDER-TOP: #b3b6b0 1px solid; BORDER-BOTTOM-WIDTH: 0px; BORDER-BOTTOM-COLOR: #b3b6b0; BORDER-LEFT: #b3b6b0 1px solid
}
.ytheme-gray .ydlg .ylayout-container .yui-ext-tabbody {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg .ydlg-close {
BACKGROUND-IMAGE: url(../images/basic-dialog/gray/close.gif)
}
.ytheme-gray .ydlg DIV.yresizable-handle-east {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/gray/e-handle.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg DIV.yresizable-handle-south {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/gray/s-handle.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg DIV.yresizable-handle-west {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/gray/e-handle.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg DIV.yresizable-handle-southeast {
BORDER-TOP-WIDTH: 0px; BACKGROUND-POSITION: right bottom; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/basic-dialog/gray/se-handle.gif); BORDER-BOTTOM-WIDTH: 0px; WIDTH: 8px; HEIGHT: 8px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ydlg DIV.yresizable-handle-north {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BACKGROUND-IMAGE: url(../images/s.gif); BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ylayout-container {
OVERFLOW: hidden; WIDTH: 100%; HEIGHT: 100%; BACKGROUND-COLOR: #c3daf9
}
.ylayout-collapsed {
BORDER-RIGHT: #98c0f4 1px solid; BORDER-TOP: #98c0f4 1px solid; Z-INDEX: 20; LEFT: -10000px; VISIBILITY: hidden; OVERFLOW: hidden; BORDER-LEFT: #98c0f4 1px solid; WIDTH: 20px; BORDER-BOTTOM: #98c0f4 1px solid; POSITION: absolute; TOP: -10000px; HEIGHT: 20px; BACKGROUND-COLOR: #c3daf9
}
.ylayout-collapsed-over {
CURSOR: pointer; BACKGROUND-COLOR: #d9e8fb
}
.ylayout-collapsed-west .ylayout-tools-button {
FLOAT: right
}
.ylayout-collapsed-east .ylayout-tools-button {
FLOAT: left
}
.ylayout-collapsed-north {
TEXT-ALIGN: right
}
.ylayout-collapsed-south {
TEXT-ALIGN: right
}
.ylayout-collapsed .ylayout-tools-button {
MARGIN: 2px; WIDTH: 12px; TEXT-ALIGN: center
}
.ylayout-inactive-content {
LEFT: -10000px; VISIBILITY: hidden; POSITION: absolute; TOP: -10000px
}
.ylayout-active-content {
VISIBILITY: visible
}
.ylayout-panel {
BORDER-RIGHT: #98c0f4 1px solid; BORDER-TOP: #98c0f4 1px solid; OVERFLOW: hidden; BORDER-LEFT: #98c0f4 1px solid; BORDER-BOTTOM: #98c0f4 1px solid; POSITION: absolute; BACKGROUND-COLOR: white
}
.ylayout-panel-east {
Z-INDEX: 10
}
.ylayout-panel-west {
Z-INDEX: 10
}
.ylayout-panel-north {
Z-INDEX: 11
}
.ylayout-panel-south {
Z-INDEX: 11
}
.ylayout-collapsed-north {
Z-INDEX: 12
}
.ylayout-collapsed-south {
Z-INDEX: 12
}
.ylayout-collapsed-east {
Z-INDEX: 12
}
.ylayout-collapsed-west {
Z-INDEX: 12
}
.ylayout-panel {
BORDER-RIGHT: #98c0f4 1px solid; BORDER-TOP: #98c0f4 1px solid; OVERFLOW: hidden; BORDER-LEFT: #98c0f4 1px solid; BORDER-BOTTOM: #98c0f4 1px solid; POSITION: absolute; BACKGROUND-COLOR: white
}
.ylayout-panel-body {
OVERFLOW: hidden
}
.ylayout-grid-wrapper {
}
.ylayout-split {
FONT-SIZE: 1px; Z-INDEX: 3; WIDTH: 5px; LINE-HEIGHT: 1px; POSITION: absolute; HEIGHT: 5px; BACKGROUND-COLOR: #c3daf9
}
.ylayout-panel-hd {
BACKGROUND-IMAGE: url(../images/layout/panel-title-light-bg.gif); COLOR: black; BORDER-BOTTOM: #98c0f4 1px solid; POSITION: relative
}
.ylayout-panel-hd-text {
PADDING-RIGHT: 4px; DISPLAY: block; PADDING-LEFT: 4px; PADDING-BOTTOM: 4px; FONT: 11px tahoma, verdana, helvetica; PADDING-TOP: 4px
}
.ylayout-panel-hd-tools {
PADDING-RIGHT: 2px; RIGHT: 0px; WIDTH: 40px; PADDING-TOP: 2px; POSITION: absolute; TOP: 0px; TEXT-ALIGN: right
}
.ylayout-tools-button {
PADDING-RIGHT: 2px; PADDING-LEFT: 2px; Z-INDEX: 6; FLOAT: right; PADDING-BOTTOM: 2px; CURSOR: pointer; PADDING-TOP: 2px
}
.ylayout-tools-button-over {
BORDER-RIGHT: #98c0f4 1px solid; PADDING-RIGHT: 1px; BORDER-TOP: #98c0f4 1px solid; PADDING-LEFT: 1px; PADDING-BOTTOM: 1px; BORDER-LEFT: #98c0f4 1px solid; PADDING-TOP: 1px; BORDER-BOTTOM: #98c0f4 1px solid; BACKGROUND-COLOR: white
}
.ylayout-tools-button-inner {
BACKGROUND-POSITION: center 50%; FONT-SIZE: 1px; WIDTH: 12px; LINE-HEIGHT: 1px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 12px
}
.ylayout-close {
BACKGROUND-IMAGE: url(../images/layout/panel-close.gif)
}
.ylayout-collapse-west {
BACKGROUND-IMAGE: url(../images/layout/collapse.gif)
}
.ylayout-expand-east {
BACKGROUND-IMAGE: url(../images/layout/collapse.gif)
}
.ylayout-expand-west {
BACKGROUND-IMAGE: url(../images/layout/expand.gif)
}
.ylayout-collapse-east {
BACKGROUND-IMAGE: url(../images/layout/expand.gif)
}
.ylayout-collapse-north {
BACKGROUND-IMAGE: url(../images/layout/ns-collapse.gif)
}
.ylayout-expand-south {
BACKGROUND-IMAGE: url(../images/layout/ns-collapse.gif)
}
.ylayout-expand-north {
BACKGROUND-IMAGE: url(../images/layout/ns-expand.gif)
}
.ylayout-collapse-south {
BACKGROUND-IMAGE: url(../images/layout/ns-expand.gif)
}
.ylayout-split-h {
BACKGROUND-POSITION: left 50%; BACKGROUND-IMAGE: url(../images/sizer/e-handle.gif)
}
.ylayout-split-v {
BACKGROUND-POSITION: 50% top; BACKGROUND-IMAGE: url(../images/sizer/s-handle.gif)
}
.ylayout-panel .ytab-wrap {
BACKGROUND: url(../images/layout/gradient-bg.gif)
}
.ylayout-panel .yui-ext-tabbody {
OVERFLOW: auto; HEIGHT: 100%; BACKGROUND-COLOR: white
}
.ylayout-component-panel {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; WIDTH: 200px; PADDING-TOP: 0px; POSITION: relative; HEIGHT: 200px
}
.ylayout-nested-layout {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; OVERFLOW: hidden; WIDTH: 200px; PADDING-TOP: 0px; POSITION: relative; HEIGHT: 200px
}
.ylayout-nested-layout .ylayout-panel {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ylayout-nested-layout .ylayout-panel-north {
BORDER-BOTTOM: #98c0f4 1px solid
}
.ylayout-nested-layout .ylayout-panel-south {
BORDER-TOP: #98c0f4 1px solid
}
.ylayout-nested-layout .ylayout-panel-east {
BORDER-LEFT: #98c0f4 1px solid
}
.ylayout-nested-layout .ylayout-panel-west {
BORDER-RIGHT: #98c0f4 1px solid
}
.yui-ext-repaint {
ZOOM: 1; BACKGROUND-COLOR: transparent
}
.ylayout-panel-dragover {
BORDER-RIGHT: #6593cf 2px solid; BORDER-TOP: #6593cf 2px solid; BORDER-LEFT: #6593cf 2px solid; BORDER-BOTTOM: #6593cf 2px solid
}
.ylayout-panel-proxy {
BORDER-RIGHT: #6593cf 1px dashed; BORDER-TOP: #6593cf 1px dashed; Z-INDEX: 10001; LEFT: 0px; BACKGROUND-IMAGE: url(../images/layout/gradient-bg.gif); OVERFLOW: hidden; BORDER-LEFT: #6593cf 1px dashed; BORDER-BOTTOM: #6593cf 1px dashed; POSITION: absolute; TOP: 0px; BACKGROUND-COLOR: #c3daf9
}
.ylayout-slider {
Z-INDEX: 15; OVERFLOW: hidden; POSITION: absolute
}
.ytheme-gray {
BACKGROUND-COLOR: #f3f2e7
}
DIV.ytheme-gray {
BACKGROUND-COLOR: #f3f2e7
}
.ytheme-gray .ylayout-container {
BACKGROUND-COLOR: #f3f2e7
}
.ytheme-gray {
BACKGROUND-COLOR: #f3f2e7
}
.ytheme-gray .ylayout-collapsed {
BORDER-RIGHT: #aca899 1px solid; BORDER-TOP: #aca899 1px solid; BORDER-LEFT: #aca899 1px solid; BORDER-BOTTOM: #aca899 1px solid; BACKGROUND-COLOR: #f3f2e7
}
.ytheme-gray .ylayout-collapsed-over {
BACKGROUND-COLOR: #fbfbef
}
.ytheme-gray .ylayout-panel {
BORDER-RIGHT: #aca899 1px solid; BORDER-TOP: #aca899 1px solid; BORDER-LEFT: #aca899 1px solid; BORDER-BOTTOM: #aca899 1px solid
}
.ytheme-gray .ylayout-nested-layout .ylayout-panel {
BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px
}
.ytheme-gray .ylayout-split {
BACKGROUND-COLOR: #f3f2e7
}
.ytheme-gray .ylayout-panel-hd {
BACKGROUND-IMAGE: url(../images/layout/gray/panel-title-light-bg.gif); BORDER-BOTTOM: #aca899 1px solid
}
.ytheme-gray .ylayout-tools-button-over {
BORDER-RIGHT: #aca899 1px solid; BORDER-TOP: #aca899 1px solid; BORDER-LEFT: #aca899 1px solid; BORDER-BOTTOM: #aca899 1px solid
}
.ytheme-gray .ylayout-close {
BACKGROUND-IMAGE: url(../images/layout/gray/panel-close.gif)
}
.ytheme-gray .ylayout-collapse-west {
BACKGROUND-IMAGE: url(../images/layout/gray/collapse.gif)
}
.ytheme-gray .ylayout-expand-east {
BACKGROUND-IMAGE: url(../images/layout/gray/collapse.gif)
}
.ytheme-gray .ylayout-expand-west {
BACKGROUND-IMAGE: url(../images/layout/gray/expand.gif)
}
.ytheme-gray .ylayout-collapse-east {
BACKGROUND-IMAGE: url(../images/layout/gray/expand.gif)
}
.ytheme-gray .ylayout-collapse-north {
BACKGROUND-IMAGE: url(../images/layout/gray/ns-collapse.gif)
}
.ytheme-gray .ylayout-expand-south {
BACKGROUND-IMAGE: url(../images/layout/gray/ns-collapse.gif)
}
.ytheme-gray .ylayout-expand-north {
BACKGROUND-IMAGE: url(../images/layout/gray/ns-expand.gif)
}
.ytheme-gray .ylayout-collapse-south {
BACKGROUND-IMAGE: url(../images/layout/gray/ns-expand.gif)
}
.ytheme-gray .ylayout-split-h {
BACKGROUND-IMAGE: url(../images/sizer/gray/e-handle-dark.gif)
}
.ytheme-gray .ylayout-split-v {
BACKGROUND-IMAGE: url(../images/sizer/gray/s-handle-dark.gif)
}
.ytheme-gray .ylayout-panel .ytab-wrap {
BACKGROUND: url(../images/layout/gray/gradient-bg.gif)
}
.ytheme-gray .ylayout-nested-layout .ylayout-panel-north {
BORDER-BOTTOM: #aca899 1px solid
}
.ytheme-gray .ylayout-nested-layout .ylayout-panel-south {
BORDER-TOP: #aca899 1px solid
}
.ytheme-gray .ylayout-nested-layout .ylayout-panel-east {
BORDER-LEFT: #aca899 1px solid
}
.ytheme-gray .ylayout-nested-layout .ylayout-panel-west {
BORDER-RIGHT: #aca899 1px solid
}
.ytheme-gray .ylayout-panel-dragover {
BORDER-RIGHT: #aca899 2px solid; BORDER-TOP: #aca899 2px solid; BORDER-LEFT: #aca899 2px solid; BORDER-BOTTOM: #aca899 2px solid
}
.ytheme-gray .ylayout-panel-proxy {
BORDER-RIGHT: #aca899 1px dashed; BORDER-TOP: #aca899 1px dashed; BACKGROUND-IMAGE: url(../images/layout/gray/gradient-bg.gif); BORDER-LEFT: #aca899 1px dashed; BORDER-BOTTOM: #aca899 1px dashed; BACKGROUND-COLOR: #f3f2e7
}
Shade Mostly Shady Sun or Shade Mostly Sunny Sunny
Adder's-TongueShade$9.58Apr 13, 2006YesAnemoneMostly Shady$8.86Dec 26, 2006YesBee BalmShade$4.59May 03, 2006YesBergamotShade$7.16Apr 27, 2006YesBlack-Eyed SusanSunny$9.80Jun 18, 2006YesBloodrootMostly Shady$2.44Mar 15, 2006YesBlue GentianSun or Shade$8.56May 02, 2006YesButtercupShade$2.57Jun 10, 2006YesButterfly WeedSunny$2.78Jun 30, 2006YesCalifornia PoppySunny$7.89Mar 27, 2006YesCardinal FlowerShade$3.02Feb 22, 2006YesCinquefoilShade$7.06May 25, 2006YesColumbineMostly Shady$9.37Mar 06, 2006YesCowslipMostly Shady$9.90Mar 06, 2006YesCrowfootShade$9.34Apr 03, 2006YesDutchman's-BreechesMostly Shady$6.44Jan 20, 2006YesGentianSun or Shade$7.81May 18, 2006YesGinger, WildMostly Shady$9.03Apr 18, 2006YesGrecian WindflowerMostly Shady$9.16Jul 10, 2006YesGreek ValerianShade$4.36Jul 14, 2006YesHepaticaMostly Shady$4.45Jan 26, 2006YesJack-In-The-PulpitMostly Shady$3.23Feb 01, 2006YesJacob's LadderShade$9.26Feb 21, 2006YesLiverleafMostly Shady$3.99Jan 02, 2006YesMarsh MarigoldMostly Sunny$6.81May 17, 2006YesMayappleMostly Shady$2.98Jun 05, 2006YesPhlox, BlueSun or Shade$5.59Feb 16, 2006YesPhlox, WoodlandSun or Shade$2.80Jan 22, 2006YesPrimroseSunny$6.56Jan 30, 2006YesShooting StarMostly Shady$8.60May 13, 2006YesSnakerootShade$5.63Jul 11, 2006YesSpring-BeautyMostly Shady$6.59Feb 01, 2006YesTrilliumSun or Shade$3.90Apr 29, 2006YesTrout LilyShade$6.94Mar 24, 2006YesViolet, Dog-ToothShade$9.04Feb 01, 2006YesWake RobinSun or Shade$3.20Feb 21, 2006Yes
Common Name |
Light |
Price |
Available |
Indoor? |
注:如果您发现gird工作不正常,请刷新浏览器,已保证它不是缓冲的(尽管我已经叫它不缓存的了)。
如果还是不行,请在论坛里POST出现的问题,以便我能修复它,谢!
单元格之间的键盘控制
最初的GIRD支持可编辑字段的Tab/Shift Tab、回车、方向键的控制 ,类似MS Excel。这个范例中不仅支持单击,而且支持双击。
实时数据验证
下列的编辑器,当输入数据都会有实时的数据验证。默认情况下,非法的数据会有下划红线提示(像MSOffice),并有tooltip显示错误的原因。这些可用通过CSS改变。如单元格的数据包含非法的数据,编辑后(编辑器失去焦点,用户按下回车或用户按下方向键移动到其它的单元格)单元格会恢复原始值。
国际化支持和韧性配置
编辑器的原型(prototypes)定义了所有错误信息和配置选项,可根据你的需要来覆盖(override)默认的,尤其方便国际化的支持。有两种方式配置:1.设置编辑器的属性;2.传入一个配置对象到编辑器的构建函数。
// 通过属性设置选项
var editor = new YAHOO.ext.grid.NumberEditor();
editor.allowBlank = false;
editor.minValue = 10;
editor.minText = "Nice try buddy, %0 is too small.";//通过配置对象设置选项
var editor = new YAHOO.ext.grid.NumberEditor({allowBlank: false, minValue: 10,
minText: "Nice try buddy, %0 is too small."});//设置最大最小值,NumberEditors的西班牙文错误提示
YAHOO.ext.grid.NumberEditor.prototype.minText = "La cantidad debe ser menos de %0";
YAHOO.ext.grid.NumberEditor.prototype.maxText = "La cantidad debe ser más de %0";
预定义编辑器Predefined Editors
当前的编辑器已经实现的功能:
文本编辑器TextEditor 提供一个简单的文本编辑器,下列是配置选项:
- allowBlank - True if the cell is allowed to be empty.
- selectOnFocus - True to select the text when the editor is activated.
- blankText - The tooltip (error message) to display when the cell is empty and is not allowed to be.
- regex - A regular expression to match if the value is valid. If the regex.test(value) returns false, the value is considered invalid.
- regexText - The tooltip (error message) to display when regex does not match.
- validator - Any custom validation function you want called. The function must return true if the data is valid or an error message otherwise.
- validationDelay - The delay in milliseconds for validation. Each time the user types something the field is validated after a specified delay, setting this value allows you to customize that delay (for example, if your custom validation routine is slow).
数字编辑器 NumberEditor
- allowDecimals - True if the cell can have decimal values.
- decimalSeparator - Character(s) to allow as the decimal separator.
- decimalPrecision - Set the maximum decimal precision.
- decimalPrecisionFcn - Define the function to call to remove extra precision (ie. Math.floor, Math.round, Math.ceil or your own function).
- allowNegative - True if the cell allows negative values.
- selectOnFocus - True to select the text when the editor is activated.
- minValue - The minimum value the cell will allow.
- maxValue - The maximum value the cell will allow.
- minText - The tooltip to display when the value in the cell is below the minimum.
- maxText - The tooltip to display when the value in the cell is above the maximum.
- nanText - The tooltip to display when the value in the cell is not a valid number (for example, negatives are allowed and the value in the cell is just "-" with no numbers).
- allowBlank -同TextEditor。
- blankText -同TextEditor。
- validationDelay -同TextEditor。
- validator -同TextEditor。
日期编辑器 DataEditor
提供一个日期编辑器的字段,可选地提供一个DatePicker。如果你不想用内置的DatePicker,DateEditor提供一个方法(showCalendar)来覆盖override内置的DatePicker。相比YUI日历组件,这里我选用了自己的DataPicker,它非常容易地override Gird事件,并工作地很好。压缩后它只有5K大小,而YUI日历压缩后40k大小。使用DataPicker时,左/右改变月份,上下改变年份,鼠标滚轮快速地切换月份。DateEditor支持下列配置选项:
- format - The date format for the editor. The format is now identical to PHP date() and text is allowed. Credit for that goes to this fantastic date library. This format is for the editor only and doesn't affect the rendering of the cell when not in edit mode. Your rendering function can use any date format it wants.
- minValue - The minimum allowed date. Can be either a Javascript date object or a string date in the specified format.
- maxValue - The maximum allowed date. Can be either a Javascript date object or a string date in the specified format.
- minText - The tooltip to display when the date in the cell is before minValue.
- maxText - The tooltip to display when the date in the cell is after maxValue.
- invalidText - The text to display when the date in the field is invalid (for example: 02/31/06)
- disabledDays - An array of days to disable, 0 based. For example, [0, 6] disables Sunday and Saturday.
- disabledDaysText - The tooltip to display when the date in the cell (or DatePicker) falls on a disabled day.
- disabledDates - An array of "dates" to disable, as strings. These strings will be used to build a dynamic regular expression so they are very powerful. For example, ["03/08/2003", "09/16/2003"] would disable those dates, but ["03/08", "09/16"] would disable them for every year. If you are using short years, you will want to use ^ to tell the regular expression to only match the beginning like ["^03/08"]. To disable March of 2006: ["03/../2006"] or every March ["^03"]. In order to support regular expressions, if you are using a date format that has "." in it, you will have to escape the dot when restricting dates. For example: ["03.08.03"].
- disabledDatesText - The tooltip to display when the date in the cell (or DatePicker) falls on a disabled date.
- allowBlank -同TextEditor。
- blankText -同TextEditor。
- validationDelay -同TextEditor。
- validator -同TextEditor。
单选项编辑器CheckboxEditor
为布尔值提供checkbox。当前没有配置选项。
SelectEditor
利用xhtml中的Select字段创建编辑器。你可以在JAVASCRIPT中用DOM来创建select,然后传入到SelectEditor的构建函数,或者用这种简单的方式:定义一个select在xhtml文档中,定义 ygrid-editor class的样式。
ShadeMostly ShadySun or ShadeMostly SunnySunny
创建SelectEditor 对象, 传入Select之ID
var editor = new YAHOO.ext.grid.SelectEditor('light');
组合所有的功能在一起
你可以采用这种方式定义一个ColumnModel:
var yg = YAHOO.ext.grid;
var cols = [{
header: "Common",
width: 120,
editor: new yg.TextEditor()
},{
header: "Light",
width: 80,
editor: new yg.SelectEditor('light')
},{
header: "Price",
width: 50,
renderer: formatMoney,
editor: new yg.NumberEditor({allowBlank: false, allowNegative: false})
},{
header: "Available",
width: 85,
renderer: formatDate,
editor: new yg.DateEditor({format: 'MM/dd/yy', minValue: '01/01/06'})
},{
header: "Indoor?",
width: 50,
renderer: formatBoolean,
editor: new yg.CheckboxEditor()
}];
var colModel = new YAHOO.ext.grid.DefaultColumnModel(cols);
创建自己的编辑器
如果以上的编辑器不够用的话,GIRD与编辑器之间的接口(interface)是足够简单的让你轻松地创建你自己的编辑器。 甚至有个这样一个的基类(CellEditor),已经负责了75%-80%的工作量。CellEditor 接口由三个方法组成(grid, bodyElement, callback);
init(grid, bodyElement, callback);
这方法在编辑器被激活之前调用(每次)。gird参数明显是gird对象。bodyElement 参数是gird内的元素,当你欲滚动gird body时,编辑器应该渲染的元素。回调函数是用于用户编辑单元格时的调用。
cell.startEditing(value, row, cell);
激活某个单元格编辑后,这个方法被调用。当调用后,编辑器组件应该适应其自身到单元格中,设置它的初始值,附加到特定的事件中,例如,另外一个单元格被激活编辑,那么原来的单元格就要停止编辑了。
stopEditing();
保存数据
改变单元格数据会触发DataModel的onCellUpdated事件。你可利用该事件来保存数据。如果你使用是XMLDataModel,所有的编辑会自动保存到由DataMODEL加载的XML文档。通过getDocument() 可获取该文档。
反馈
回溯到这篇贴子的目的,是为了可以尽可能测试,然后归档,准备发布出来。我正正需要的是反馈。缺了些什么?我肯定这里还有很多你需要、想要的功能而我还没做的。当前只有我一个人在做(不过我也希望有所改变),没有大家的参与是不可能开发想这样的GIRD。如果有你想看到功能,请发表评论或在论坛里参与讨论。谢!
目前这些功能来自反馈:
- NumberEditor.decimalSeparator - 支持不同的十进制分隔符
- NumberEditor.decimalPrecision, NumberEditor.decimalPrecisionFcn - Support for decimal precision and rounding etc. See the thread in the forum for details.
- Shift-tab to navigate backwards, enter moves down 1 cell.
- DatePicker changes: Highlights selected date, highlights today, restricts selection based on min/max values for the DateEditor.
- Hiding and "Unhiding" of columns programmatically. You can also start columns in a hidden state.
- More DateEditor/Picker enhancements: disabling of days (i.e. Saturday and Sunday), and disabling of individual dates/date ranges/dates each year. The disabling of the dates is accomplished by dynamically building a regular expression so it is very flexible and very fast. See DateEditor above for more details. The date format specifiers are different now and match the PHP date() function instead of Java mm/dd/yy style. The reason is I integrated this small date lib and got rid of my own date parsing code. It's faster and also support dates with text now, such as 15-Mar-06.
- Regular expression validation on the TextEditor without using a validator function.
请随时发表反馈!