Browse Source

Zuzu

master
Evgeny Gagua 3 years ago
parent
commit
e3bf32d92d
  1. 16
      lib/controller/getWidthTable.php
  2. 4
      lib/controller/getWidthTableEditor.php
  3. 7
      lib/javascript/jsapi_dynamic/mojo_settings.js

16
lib/controller/getWidthTable.php

@ -11,13 +11,27 @@
$MR = floatval( $ZZ[0]['max_range'] );
$Data['totalCount'] = count( $RR );
$Data['rows'] = array();
$PR = array();
foreach( $RR as $R ){
$CC[0] = intval( $R['id'] );
$CC[1] = intval( $R['width_k'] );
$CC[2] = intval( $R['range_k'] );
$CC[3] = intval( ( $MR * $CC[2] ) / 100.0 );
$Data['rows'][] = $CC;
if( count( $PR )){
$ZZ = array();
$ZZ[0] = $PR[0];
$ZZ[1] = $PR[1];
$ZZ[2] = $PR[2] . '-' . $CC[2];
$ZZ[3] = $PR[3] . '-' . $CC[3];
$Data['rows'][] = $ZZ;
};
$PR = $CC;
};
$ZZ[0] = $PR[0];
$ZZ[1] = $PR[1];
$ZZ[2] = $PR[2] . '-100';
$ZZ[3] = $PR[3] . '-' . $MR;
$Data['rows'][] = $ZZ;
echo json_encode( $Data );
} else {
echo "{ 'totalCount': 0, 'rows':[] }";

4
lib/controller/getWidthTableEditor.php

@ -53,10 +53,10 @@
type: 'int'
},{
name: 'range',
type: 'int'
type: 'string'
},{
name: 'range_m',
type: 'int'
type: 'string'
}],
baseParams:{
UID: {$UserID},

7
lib/javascript/jsapi_dynamic/mojo_settings.js

@ -98,8 +98,8 @@ var targetWidthTable_store = new Ext.data.ArrayStore({
fields: [
{name: 'id', type: 'int' },
{name: 'width', type: 'int'},
{name: 'range', type: 'int'},
{name: 'range_m', type: 'int'}
{name: 'range', type: 'sting'},
{name: 'range_m', type: 'sting'}
]
});
var cWTRowSelected = null;
@ -109,7 +109,8 @@ var widthTableSelModel_ops = {
listeners: {
rowselect: function( sm, row, rec ) {
cWTRowSelected = rec.data.id;
Ext.getCmp('del_btn_width_table').enable();
//todo
//Ext.getCmp('del_btn_width_table').enable();
}
}
};

Loading…
Cancel
Save