Paste number 58548: a dojo grid for berick

Index of paste annotations: 2 | 1

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:
Raw Source | XML | Display As
<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:
Raw Source | Display As
<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:
Raw Source | Display As
provider_store.onSet = function (item, attr, o, n) {
  if (attr == 'ischanged') return;
  if (n == o) return;
  this.setValue( item, 'ischanged', 1);
};

Colorize as:
Show Line Numbers
Index of paste annotations: 2 | 1

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.