diff --git a/lib/controller/getWidthTable.php b/lib/controller/getWidthTable.php index 760ac5f..9c80451 100644 --- a/lib/controller/getWidthTable.php +++ b/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':[] }"; diff --git a/lib/controller/getWidthTableEditor.php b/lib/controller/getWidthTableEditor.php index 53fb3d7..54af29a 100644 --- a/lib/controller/getWidthTableEditor.php +++ b/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}, diff --git a/lib/javascript/jsapi_dynamic/mojo_settings.js b/lib/javascript/jsapi_dynamic/mojo_settings.js index 095ef27..b9f9d61 100644 --- a/lib/javascript/jsapi_dynamic/mojo_settings.js +++ b/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(); } } };