<script type="text/javascript">
<![CDATA[
- var highlighter= {};
- highlighter.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'grid_container', duration : 500 } );
- highlighter.red = dojox.fx.highlight( { color : '#FF2018', node : 'grid_container', duration : 500 } );
-
var dirtyStore = [];
var _status_list = pCRUD.retrieveAll('ccs', { order_by : { ccs : 'name' } });
{ name : ccs_strings.TRANSLATION,
width : "10em",
height : "2em",
+ formatter: function (row) {
+ return '<span class="status_grid_trans_cell_'+row+'"></span>';
+ },
get : function (row) {
if (!window.status_rows) window.status_rows = [];
var r = window.status_data_model.getRow(row);
'status_grid.rowHeightChanged('+row+')',
0
);
- return '<span class="status_grid_trans_cell_'+row+'"></span>';
+ return row;
}
return '';
}
</div>
</div>
+ <script type="text/javascript">
+ var highlighter= {};
+ highlighter.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'grid_container', duration : 500 } );
+ highlighter.red = dojox.fx.highlight( { color : '#FF2018', node : 'grid_container', duration : 500 } );
+ </script>
+
</body>
</html>
{ name : cam_strings.LABEL_TRANSLATION,
width : "10em",
height : "2em",
+ formatter : function (row) {
+ return '<span class="cam_value_'+row+'"></span>';
+ },
get : function (row) {
if (!grid_row_object_cache.cam) grid_row_object_cache.cam = [];
var r = this.grid.model.getRow(row);
);
var oldnode = dojo.byId('value_translation_cam_' + row);
if (oldnode) dijit.byNode(oldnode).destroyRecursive();
- return '<span class="cam_value_'+row+'"></span>';
+ return row;
}
return '';
}
{ name : cam_strings.LABEL_TRANSLATION,
width : "10em",
height : "2em",
+ formatter : function (row) {
+ return '<span class="cam_description_'+row+'"></span>';
+ },
get : function (row) {
if (!grid_row_object_cache.cam) grid_row_object_cache.cam = [];
var r = this.grid.model.getRow(row);
);
var oldnode = dojo.byId('description_translation_cam_' + row);
if (oldnode) dijit.byNode(oldnode).destroyRecursive();
- return '<span class="cam_description_'+row+'"></span>';
+ return row;
}
return '';
}
{ name : cam_strings.LABEL_TRANSLATION,
width : "10em",
height : "2em",
+ formatter : function (row) {
+ return '<span class="'+classname+'_value_'+row+'"></span>';
+ },
get : function (row) {
if (!grid_row_object_cache[classname]) grid_row_object_cache[classname] = [];
var r = this.grid.model.getRow(row);
);
var oldnode = dojo.byId('value_translation_' + classname + '_' + row);
if (oldnode) dijit.byNode(oldnode).destroyRecursive();
- return '<span class="'+classname+'_value_'+row+'"></span>';
+ return row;
}
return '';
}
<script type="text/javascript" src="perm_list.js"></script>
<script type="text/javascript"><![CDATA[
- var highlighter= {};
- highlighter.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'grid_container', duration : 500 } );
- highlighter.red = dojox.fx.highlight( { color : '#FF2018', node : 'grid_container', duration : 500 } );
-
var dirtyStore = [];
var perm_rows = [];
var _perm_data = ppl.toStoreData( _perm_list, 'code' );
var perm_store = new dojo.data.ItemFileWriteStore({ data : _perm_data });
+
perm_store.onSet = function (item, attr, o, n) {
if (attr == 'ischanged') return;
if (n == o) return;
this.setValue( item, 'ischanged', 1);
};
- var perm_data_model = new dojox.grid.data.DojoData({ store: perm_store, query: { code : '*' } });
+
var perm_grid_layout = [
{ cells : [
{ name : ppl_strings.LABEL_TRANSLATION,
width : "10em",
height : "2em",
+ formatter : function (value) {
+ return '<span class="perm_grid_trans_desc_'+value+'"></span>';
+ },
get : function (row) {
var r = perm_data_model.getRow(row);
if (r) {
);
var oldnode = dojo.byId('description_translation_' + row);
if (oldnode) dijit.byNode(oldnode).destroyRecursive();
- return '<span class="perm_grid_trans_desc_'+row+'"></span>';
+ return row;
}
return '';
}
perm_store.fetch({
query : { ischanged : 1 },
- onItem : function (item, req) { try { if (this.isItem( item )) window.dirtyStore.push( item ); } catch (e) { /* meh */ } },
+ onItem : function (item, req) { try { if (this.isItem( item )) dirtyStore.push( item ); } catch (e) { /* meh */ } },
scope : perm_store
});
if (confirmation) {
for (var i in dirtyStore) {
- window.current_perm = dirtyStore[i];
+ current_perm = dirtyStore[i];
save_perm(true);
}
}
});
var err = false;
- pCRUD.create(new_fm_objnew_fm_obj, {
+ pCRUD.create(new_fm_obj, {
onerror : function (r) {
highlighter.red.play();
status_update( ppl_strings.ERROR_CALLING_METHOD_PPL );
</div>
<div dojoType="dijit.layout.ContentPane" style="width:100%; height:100%;" layoutAlign="client">
+ <div dojoType="dojox.grid.data.DojoData" id="perm_data_model" jsId="perm_data_model" store="perm_store" query="{ code : '*' }">
+ </div>
<div id="perm_grid" dojoType="dojox.Grid" model="perm_data_model" structure="perm_grid_layout" jsId="perm_grid">
- <!--
- <script type="dojo/connect" event="onSet" args="item,attr,oldVal,newVal">
- </script>
- -->
</div>
</div>
</div>
</div>
+ <script type="text/javascript">
+ var highlighter= {};
+ highlighter.green = dojox.fx.highlight( { color : '#B4FFB4', node : 'grid_container', duration : 500 } );
+ highlighter.red = dojox.fx.highlight( { color : '#FF2018', node : 'grid_container', duration : 500 } );
+ </script>
+
</body>
</html>