Skip to content

Instantly share code, notes, and snippets.

@khajer
Created July 5, 2011 10:14
Show Gist options
  • Select an option

  • Save khajer/1064605 to your computer and use it in GitHub Desktop.

Select an option

Save khajer/1064605 to your computer and use it in GitHub Desktop.
test dojo
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dijit/themes/soria/soria.css">
<style type="text/css">
body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
</style>
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#borderContainerTwo{ width: 100%; height: 100%; }
</style>
<style type="text/css">
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojox/grid/resources/Grid.css";
@import "http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojox/grid/resources/soriaGrid.css";
.dojoxGrid table { margin: 0; }
</style>
</head>
<body class="soria" onunload="GUnload()">
<div dojoType="dijit.layout.BorderContainer" gutters="false" id="borderContainerTwo">
<div dojoType="dijit.layout.ContentPane" region="top" splitter="false">
Geometric Marketing System (GMS)
</div>
<div dojoType="dijit.layout.ContentPane" region="bottom" splitter="false">
<span style="float: right; padding: 2px;"> Nation Application</span>
</div>
<div dojoType="dijit.layout.BorderContainer" liveSplitters="false" design="sidebar"
region="center" id="mainSplit">
<div dojoType="dijit.layout.AccordionContainer" minSize="20" style="width: 300px;"
id="leftAccordion" region="leading" splitter="true">
<div dojoType="dijit.layout.AccordionPane" title="ค้นหาจากชื่อ">
<table width="100%">
<tr>
<td width="25%">คำค้นหา</td>
<td>
<input type="text" name="wordSearch" value=""
dojoType="dijit.form.TextBox" id="wordSearch"
trim="true"
propercase="false" />
</td>
</tr>
<tr>
<td>ค้นหาจาก</td>
<td>
<select id="typeLocation" name="typeLocation" dojoType="dijit.form.ComboBox"
autocomplete="true" value="">
<option value='NB' selected="selected">ชื่อตาม BILLNAME</option>
<option value='NR'>ชื่อตามผู้รับ</option>
<option value='CO'>รหัส</option>
</select>
</td>
</tr>
<tr>
<td>ประเภทที่ตั้ง</td>
<td>
<input id="cbAgent" dojotype="dijit.form.CheckBox" name="group"
checked="checked" value="1" type="checkbox" /> Agent
<input id="cbSubgent" dojotype="dijit.form.CheckBox" name="group"
checked="checked" value="1" type="checkbox" > Sub-Agent<br>
<input id="cbBulk" dojotype="dijit.form.CheckBox" name="group"
checked="checked" value="1" type="checkbox" > Bulk
<input id="cbBooth" dojotype="dijit.form.CheckBox" name="group"
checked="checked" value="1" type="checkbox" > Booth
</td>
</tr>
<tr>
<td></td>
<td align="right">
<button dojoType="dijit.form.Button" id="myButton" onClick="searchText()">ค้นหา</button>
</td>
</tr>
</table>
</div>
<div dojoType="dijit.layout.AccordionPane" title="Business Type">
</div>
<div dojoType="dijit.layout.AccordionPane" title="สายเก็บเงิน">
</div>
</div>
<!-- end AccordionContainer -->
<div dojoType="dijit.layout.BorderContainer" region="center" tabStrip="true" id="contentMain">
<div dojoType="dijit.layout.BorderContainer" region="center" tabStrip="true" id="mapBC">
<div dojoType="dijit.layout.ContentPane" region="center" splitter="false">
<div id="map" style="width:700px;height:400px;"></div>
</div>
<div id="resultTabContainer" dojoType="dijit.layout.TabContainer" region="bottom"
style="height:150px" splitter="true">
<div dojoType="dijit.layout.ContentPane" region="bottom" splitter="false"
title="ผลการค้นหา" id="resultPane">
<div style="width: 100%; height: 300px;">
<div dojoType="dojo.data.ItemFileReadStore" jsId="countryStoreForGrid"
data="storeData">
</div>
<div id="grid" dojoType="dojox.grid.DataGrid" store="countryStoreForGrid"
structure="layResultGrid" queryOptions="{deep:true}" query="{}" rowsPerPage="40">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>
<script type="text/javascript">
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.AccordionContainer");
dojo.require("dijit.form.TextBox");
dojo.require("dijit.form.CheckBox");
dojo.require("dijit.form.ComboBox");
dojo.require("dijit.layout.TabContainer");
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileReadStore");
dojo.require("dojox.data.CsvStore");
</script>
<!-- NOTE: the following script tag is not intended for usage in real
world!! it is part of the CodeGlass and you should just remove it when
you use the code -->
<script type="text/javascript">
dojo.addOnLoad(function() {
if (window.pub) {
window.pub();
}
});
</script>
<script>
var layResultGrid = [[
{field: "customer_id", name: "customer_id", width: '10'},
{field: "customer_billname", name: "Customer Name", width: 'auto'},
{field: "businesstype", name: "Business Type", width: '10'}
]];
var storeData = {identifier: 'customer_id', label: 'customer', items:[]};
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment