| Paste number 58548: | a dojo grid for berick |
| Pasted by: | eeevil |
| When: | 1 year, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+196C |
| Channel: | #openils-evergreen |
| Paste contents: |
<div dojoType="dojox.grid.data.DojoData" id="provider_model" jsId="provider_model" store="provider_data" query="{id:'*'}"></div>
<div id="provider_grid" dojoType="dojox.Grid" model="provider_model" jsId="provider_grid">
<script type="dojo/connect" event="startup">
provider_grid.setStructure(
[
{ cells : [[
{ name : "Name",
field: "name"
},
{ name : "Currency Type",
field: "currency_type"
}
]]
}
]
);
</script>
</div>
Annotations for this paste:
| Annotation number 2: | creating the structure up front |
| Pasted by: | eeevil |
| When: | 1 year, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+196C#2 |
| Paste contents: |
<script type="text/javascript">
var provider_grid_layout = [
{ cells : [[
{ name : "Name",
field: "name"
},
{ name : "Currency Type",
field: "currency_type"
}
]]
}
];
</script>
<div dojoType="dojox.grid.data.DojoData" id="provider_model" jsId="provider_model" store="provider_data" query="{id:'*'}"></div>
<div id="provider_grid" dojoType="dojox.Grid" model="provider_model" jsId="provider_grid" structure="provider_grid_layout"></div>
| Annotation number 1: | onSet |
| Pasted by: | eeevil |
| When: | 1 year, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+196C#1 |
| Paste contents: |
provider_store.onSet = function (item, attr, o, n) {
if (attr == 'ischanged') return;
if (n == o) return;
this.setValue( item, 'ischanged', 1);
};