//
//	Copyright (c) 2006-2008, Yuki Osada
//	          All Rights Reserved.
//	Licensed under the Academic Free License version 2.1 or above OR the
//	modified BSD license. For more information on Dojo licensing, see:
//	shuffle card jalan configuration
//
// ==========================================================================
// Custom formatters
// ==========================================================================
formatCurrency = function(inDatum){
 return isNaN(inDatum) ? '...' : dojo.currency.format(inDatum, this.constraint);
}
formatDate = function(inDatum){
 return dojo.date.locale.format(new Date(inDatum), this.constraint);
}
formatNumber = function(inDatum){
 return isNaN(inDatum) ? '...' : parseInt(inDatum,10);
}
// ==========================================================================
// Grid structure
// ==========================================================================
//gridLayout = [{
// type: 'dojox.GridRowView', width: '20px'
//},{
gridLayout = [
 [
     { name: '識別',  field: 'ID',  width: 4 },
     { name: 'チェック',  field: 'chk',  width: 3 , styles: 'text-align: center;', editable: true , type: dojox.grid.cells.Bool  },
     { name: '宿名' ,  field: 'hname', width: 16 , styles: 'text-align: left;' },
     { name: '自己採点',  field: 'ratio',  width: 5 , editable: true , type : dojox.grid.cells.Select, options: [ 0,1,2,3,4,5 ], values: [ 0,1,2,3,4,5 ] ,formatter: scj_change_myscore },
     { name: '宿泊料金',  field: 'price',  width: 7 , formatter: formatCurrency, constraint: {currency: 'JPY'}, styles: 'text-align: right;' },
     { name: 'クチコミ評価',  field: 'score',  width: 7 },
     { name: 'クチコミ件数',  field: 'vote',  width: 7 , formatter: formatNumber }
 ]
];
var SCJ_GRID_LINK_STR = '表示';

var emptyData = { identifier: 'ID', label: '詳細', items: []}; 
var scstore = new dojo.data.ItemFileWriteStore({data: emptyData}); 

// { name: '自己採点',  field: 3,  width: 5 , editor: dojox.grid.editors.Select, options: [ 0,1,2,3,4,5 ], values: [ 0,1,2,3,4,5 ] ,formatter: scj_change_myscore},