diff --git a/lib/controller/addWidthTableRow.php b/lib/controller/addWidthTableRow.php new file mode 100644 index 0000000..da31166 --- /dev/null +++ b/lib/controller/addWidthTableRow.php @@ -0,0 +1,25 @@ +Data['id'] > 1 ){ + if( isset( $_POST['NID'] ) ){ + $NID = intval( $_POST['NID'] ); + $SBM = ( $_POST['SBM'] == 'true' ); + $RNG = floatval( $_POST['RNG'] ); + $WDZ = floatval( $_POST['WDZ'] ) / 100.0; + if( $NID ){ + if( $SBM ){ + $QS = "SELECT `max_range` FROM `lrf_sensors` WHERE `id`={$NID}"; + $RR = $DATABASE->Query( $QS ); + $MR = floatval($RR[0]['max_range']); + $VAL = $RNG / $MR; + if( $VAL > 1.0 ) $VAL = 1.0; + } else { + $VAL = $RNG / 100.0; + if( $VAL > 1.0 ) $VAL = 1.0; + }; + $QS = "INSERT INTO `lrf_detection_width_tables` SET `aux_id`={$NID}, `width_k`={$WDZ}, `range_k`={$VAL}"; + $DATABASE->Query( $QS ); + }; + }; + }; +?> \ No newline at end of file diff --git a/lib/controller/getMaskSchedule.php b/lib/controller/getMaskSchedule.php new file mode 100644 index 0000000..e3f29cd --- /dev/null +++ b/lib/controller/getMaskSchedule.php @@ -0,0 +1,23 @@ +Data['id'] > 1 ){ + if( isset( $_POST['NID'] ) ){ + $NID = intval( $_POST['NID'] ); + $QS = "SELECT * FROM `lrf_mask_schedule` WHERE `sensor_id`={$NID} ORDER BY `time`, `date`"; + $RR = $DATABASE->Query( $QS ); + if( count( $RR ) ){ + $Data['totalCount'] = count( $RR ); + $Data['rows'] = array(); + foreach( $RR as $R ){ + $CC['id'] = intval( $R['id'] ); + $CC['op_mask'] = intval( $R['op_mask'] ); + $CC['day_mask'] = intval( $R['day_mask'] ); + $Data['rows'][] = $CC; + }; + echo json_encode( $Data ); + } else { + echo "{ 'totalCount': 0, 'rows':[] }"; + }; + }; + }; +?> \ No newline at end of file diff --git a/lib/controller/getMaskScheduleEditor.php b/lib/controller/getMaskScheduleEditor.php new file mode 100644 index 0000000..d1b10de --- /dev/null +++ b/lib/controller/getMaskScheduleEditor.php @@ -0,0 +1,226 @@ +Data['id'] > 1 ){ + $EID = intval( $_POST['DID'] ); + $TPL =<<', tooltip:"Special Date", width: 32, sortable: false, fixed: true, menuDisabled: true, renderer: renderer_day_s, dataIndex: 'day_mask' }, + ], + defaults: { + sortable: true, + menuDisabled: true, + width: 100 + }/*, + listeners: { + hiddenchange: function(cm, colIndex, hidden) { + //saveConfig(colIndex, hidden); + } + }*/ + }), + sm: new Ext.grid.RowSelectionModel({ + singleSelect: true, + listeners: { + rowselect: function(sm, row, rec ) { + } + } + }), + ds: new Ext.data.JsonStore({ + root: 'rows', + totalProperty: 'totalCount', + idProperty: 'id', + autoLoad: true, + fields: [{ + name: 'id', + type: 'int' + },{ + name: 'op_mask', + type: 'int' + },{ + name: 'day_mask', + type: 'int' + }], + baseParams:{ + UID: {$UserID}, + SID: '{$Session}', + NID: {$EID} + }, + proxy: + new Ext.data.HttpProxy({ + method: 'POST', + noCache: false, + type: 'ajax', + prettyUrls: false, + url: '/lib/controller/getMaskSchedule.php' + }) + }), + tbar:[{ + text: 'Add Row', + handler: function(){ + var wiwin = new Ext.Window({ + title: 'Add Row', + width: 300, + height: 220, + modal: true, + layout: 'fit', + items:{ + xtype: 'form', + id: 'm_a_w_f', + border: false, + frame: true, + labelWidth: 160, + hideLabel: false, + items:[{ + xtype: 'radio', + fieldLabel: 'Range by Meters', + id: 'ra_ty_me', + name: 'ra_ra_ty', + checked: true, + listeners:{ + check: function( t, n ){ + if( n ){ + Ext.getCmp('ra_ra_vam').enable(); + Ext.getCmp('ra_ra_vap').disable(); + } else { + Ext.getCmp('ra_ra_vap').enable(); + Ext.getCmp('ra_ra_vam').disable(); + }; + } + } + },{ + xtype: 'radio', + fieldLabel: 'Range by Percents', + id: 'ra_ty_pe', + name: 'ra_ra_ty', + checked: false + },{ + xtype: 'numberfield', + id: 'ra_ra_vam', + fieldLabel: 'Range [m]', + hideLabel: false, + width: 60, + listeners:{ + change: function( t, n, o ){ + var cmm = Ext.getCmp('node_range').getValue() / 100; + if( cmm > 0 ){ + Ext.getCmp('ra_ra_vap').setValue( n / cmm ); + } else { + Ext.getCmp('ra_ra_vap').setValue( 0 ); + }; + } + } + },{ + xtype: 'numberfield', + id: 'ra_ra_vap', + fieldLabel: 'Range [%]', + hideLabel: false, + disabled: true, + minValue: 1, + maxValue: 100, + width: 60, + listeners:{ + change: function( t, n, o ){ + var cmm = Ext.getCmp('node_range').getValue() / 100; + if( cmm > 0 ){ + Ext.getCmp('ra_ra_vam').setValue( n * cmm ); + } else { + Ext.getCmp('ra_ra_vam').setValue( 0 ); + }; + } + } + },{ + xtype: 'numberfield', + id: 'wi_wi_va', + fieldLabel: 'Width [%]', + width: 60, + minValue: 1, + maxValue: 5000, + value: 100 + }] + }, + bbar:[{ + text: 'Cancel', + handler: function(){ + wiwin.close(); + } + },{ + text: 'Add', + handler: function(){ + var CT = Ext.getCmp('ra_ty_me').getValue(); + if( CT ){ + var CV = Ext.getCmp('ra_ra_vam').getValue(); + } else { + var CV = Ext.getCmp('ra_ra_vap').getValue(); + }; + var CW = Ext.getCmp('wi_wi_va').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/addWidthTableRow.php', + params: { + UID: {$UserID}, + SID: '{$Session}', + NID: {$EID}, + SBM: CT, + RNG: CV, + WDZ: CW + }, + success: function( response, opts ){ + //get DS and reload! + }, + failure: failureAJAXFunction + }); + } + }] + }); + wiwin.show(); + var cmm = Ext.getCmp('node_range').getValue(); + Ext.getCmp('ra_ra_vam').setRawValue( cmm ); + Ext.getCmp('ra_ra_vap').setRawValue( 100 ); + } + },{ + text: 'Remove Row', + handler: function(){ + + } + },{ + text: 'Clear Table', + handler: function(){ + + } + }] +} +EFUFU; + $TPL = str_ireplace( '%%%NAME%%%', $R_name, $TPL ); + $TPL = str_ireplace( '%%%INFO%%%', $R_dev, $TPL ); + $TPL = str_ireplace( '%%%SPD%%%', $Labels->GetLabel('UART_COM_SPEED'), $TPL ); + $TPL = str_ireplace( '%%%SPD_VAL%%%', $Z['speed'], $TPL ); + $TPL = str_ireplace( '%%%BITS_VAL%%%',$Z['bit'], $TPL ); + $TPL = str_ireplace( '%%%PARITY_VAL%%%',$Z['parity'], $TPL ); + $TPL = str_ireplace( '%%%STOPS_VAL%%%',$Z['stop_bit'], $TPL ); + $TPL = str_ireplace( '%%%%RES_ID%%%',$EID, $TPL ); + $TPL = str_ireplace( '%%%USER_ID%%%',$UserID, $TPL ); + $TPL = str_ireplace( '%%%SESSION%%%',$Session, $TPL ); + echo $TPL; + } else { + header('location: /'); + }; +?> \ No newline at end of file diff --git a/lib/controller/getNodeSettings.php b/lib/controller/getNodeSettings.php index eccfd69..93ae81f 100644 --- a/lib/controller/getNodeSettings.php +++ b/lib/controller/getNodeSettings.php @@ -220,6 +220,258 @@ Query( $QS ); + $NData = $RR[0]; + $NIFO = $Labels->GetLabel( 'SERV_BLD_TAG' ).':'. $NData['version']; +?> +{ + xtype: 'tabpanel', + frame: false, + id: 'node_settings_content', + border: false, + activeTab: 0, + items: [{ + xtype: 'panel', + title: 'General Info', + layout: 'hbox', + items:[{ + xtype: 'panel', + flex: 1, + height: 303, + autoScroll: false, + html: '
' + },{ + xtype: 'form', + id: '_ed_small', + flex: 1, + height: 303, + autoScroll: false, + //layout: 'vbox', + labelWidth: 120, + labelAlign: 'right', + items:[{ + xtype: 'textfield', + fieldLabel: "GetLabel( 'SENS_NAME' );?>", + id: 'node_name', + value: '', + listeners:{ + change: function(){ + settingsChangeNotifier( 'node_name' ); + Ext.getCmp('sasa_bo').enable(); + } + } + },{ + xtype: 'combo', + fieldLabel: "GetLabel( 'SENS_TYPE' );?>", + id: 'node_type', + lazyRender: true, + mode: 'local', + forceSelection: true, + triggerAction: 'all', + editable: false, + disableKeyFilter: true, + store: new Ext.data.ArrayStore({ + fields: ['aa_t','aa_txt'], + data: [ + [1,'ALS Sensor'], + [2,'LFS Sensor'], + [3,'PLS 200 Sensor'], + [4,'PLS 360 Sensor'] + ] + }), + valueField: 'aa_t', + displayField: 'aa_txt', + value: '', + listeners:{ + select: function( t, r, i ){ + var n = r.data.aa_t; + //var b = t.getValue(); + //if( n != b ){ + document.getElementById('node_pic').className = 'node_'+ n +'_img_set'; + settingsChangeNotifier( 'node_type' ); + Ext.getCmp('sasa_bo').enable(); + //}; + }, + change: function( t, n, o ){ + document.getElementById('node_pic').className = 'node_'+ n +'_img_set'; + settingsChangeNotifier( 'node_type' ); + Ext.getCmp('sasa_bo').enable(); + } + } + },{ + xtype: 'numberfield', + fieldLabel: "GetLabel( 'SENS_RANGE' );?>", + id: 'node_range', + value: '', + listeners:{ + change: function( t, n, o ){ + settingsChangeNotifier( 'node_range' ); + Ext.getCmp('sasa_bo').enable(); + } + } + },{ + xtype: 'panel', + width: '100%', + html: '
GetLabel( 'SETIAL_TAG' ).': '.$NData['serial'];?>
' + },{ + xtype: 'panel', + width: '100%', + html: '
' + },{ + xtype: 'button', + id: 'sasa_bo', + width: '100%', + disabled: true, + text: 'Apply Changes', + handler: function(){ + } + }] + }] + },{ + xtype: 'panel', + title: 'Resources', + layout: 'hbox', + items:[{ + xtype: 'panel', + flex: 1, + height: 303, + autoScroll: 'auto', + //layout: 'fit', + items:[Query( $QS, false ); + $SockDataParts = array(); + if( count( $Result ) ){ + foreach( $Result as $R ){ + switch( $R['type'] ){ + case 1: + //Uart + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('UART_LINE_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 6: + //USB DC + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('UART_LINE_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 31: + //Video Grabber + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('FRAMEGRAB_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 100: + //Loopback + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('LOOPBACK_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 101: + //Ethernet Interface + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('ETHERNET_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 102: + //WiFi Interface + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('WIFI_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 103: + //Virtual IP Interface + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('VIRTUALIP_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 104: + //VPN Interface + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('VPN_TUN_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + case 105: + //WAN Interface + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$Labels->GetLabel('WAN_LINE_PROP').' '.(($R['used']==0)?'':'').'\'}'; + break; + //Media Encoder Sink + case 131: // Video Encoder Sink + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.'Video Sink'.' '.(($R['used']==0)?'':'').'\'}'; + break; + case 132: // Audio Encoder Sink + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.'Audio Sink'.' '.(($R['used']==0)?'':'').'\'}'; + break; + default: + $SockDataParts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$R['device'].' '.(($R['used']==0)?'':'').'\'}'; + }; + }; + echo implode( ',', $SockDataParts ); + }; + ?>] + },{ + xtype: 'panel', + id: 'res_ed_small', + flex: 1, + height: 303, + layout: 'fit', + items:[{ + html:'
GetLabel('_PLS_SEL_LEFT_ITEM_');?>
' + }] + }] + },{ + xtype: 'panel', + title: 'Detection Settings', + layout: 'hbox', + items:[{ + xtype: 'panel', + flex: 1, + height: 303, + autoScroll: 'auto', + //layout: 'fit', + items:[Query( $QS ); + $Proparts = array(); + foreach( $ZUBI as $Z ){ + switch( $Z['profile_id'] ){ + case 1: $MOMO = 'Low Sensitivity Profile'; break; + case 2: $MOMO = 'Medium Sensitivity Profile'; break; + case 3: $MOMO = 'High Sensitivity Profile'; break; + default: $MOMO = 'Factory Profile'; break; + }; + $Proparts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''.$MOMO.' '.(($R['used']==0)?'':'').'\'}'; + }; + if( count( $ZUBI ) > 1 ){ + $Proparts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''."Profiles Schedule".' '.(($R['used']==0)?'':'').'\'}'; + }; + $Proparts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''."Width Table".' '.(($R['used']==0)?'':'').'\'}'; + // Check if Masks Exists + $QS = "SELECT `id` FROM `lrf_masks` WHERE `sensor_id`={$Node['aux_id']}"; + $MM = $DATABASE->Query( $QS ); + if( count( $MM ) ){ + $Proparts[] = '{ xtype: \'panel\', boder: false, frame: false, html: \''."Mask Schedule".' '.(($R['used']==0)?'':'').'\'}'; + }; + echo implode( ',', $Proparts ); + ?>] + },{ + xtype: 'panel', + id: 'dep_ed_small', + flex: 1, + height: 303, + layout: 'fit', + items:[{ + html:'
GetLabel('_PLS_SEL_LEFT_ITEM_');?>
' + }] + }] + },{ + xtype: 'panel', + title: 'Embed Options', + layout: 'hbox', + items:[{ + }] + },{ + xtype: 'panel', + title: 'Advanced', + layout: 'hbox', + items:[{ + }] + }] +} +Data['id'] > 1 ){ + if( isset( $_POST['NID'] ) ){ + $NID = intval( $_POST['NID'] ); + $QS = "SELECT * FROM `lrf_detection_width_tables` WHERE `aux_id`={$NID} ORDER BY `range_k`"; + $RR = $DATABASE->Query( $QS ); + if( count( $RR ) ){ + $QS = "SELECT `max_range` FROM `lrf_sensors` WHERE `id`={$NID}"; + $ZZ = $DATABASE->Query( $QS ); + $MR = floatval( $ZZ[0]['max_range'] ); + $Data['totalCount'] = count( $RR ); + $Data['rows'] = array(); + foreach( $RR as $R ){ + $CC['id'] = intval( $R['id'] ); + $CC['width'] = intval( 100.0 * floatval($R['width_k'])); + $CC['range'] = intval( 100.0 * floatval($R['range_k'])); + $CC['range_m'] = intval( $MR * floatval($R['range_k']) ); + $Data['rows'][] = $CC; + }; + echo json_encode( $Data ); + } else { + echo "{ 'totalCount': 0, 'rows':[] }"; + }; + }; + }; +?> \ No newline at end of file diff --git a/lib/controller/getWidthTableEditor.php b/lib/controller/getWidthTableEditor.php new file mode 100644 index 0000000..53fb3d7 --- /dev/null +++ b/lib/controller/getWidthTableEditor.php @@ -0,0 +1,229 @@ +Data['id'] > 1 ){ + $EID = intval( $_POST['DID'] ); + $TPL =<< 0 ){ + Ext.getCmp('ra_ra_vap').setValue( n / cmm ); + } else { + Ext.getCmp('ra_ra_vap').setValue( 0 ); + }; + } + } + },{ + xtype: 'numberfield', + id: 'ra_ra_vap', + fieldLabel: 'Range [%]', + hideLabel: false, + disabled: true, + minValue: 1, + maxValue: 100, + width: 60, + listeners:{ + change: function( t, n, o ){ + var cmm = Ext.getCmp('node_range').getValue() / 100; + if( cmm > 0 ){ + Ext.getCmp('ra_ra_vam').setValue( n * cmm ); + } else { + Ext.getCmp('ra_ra_vam').setValue( 0 ); + }; + } + } + },{ + xtype: 'numberfield', + id: 'wi_wi_va', + fieldLabel: 'Width [%]', + width: 60, + minValue: 1, + maxValue: 5000, + value: 100 + }] + }, + bbar:[{ + text: 'Cancel', + handler: function(){ + wiwin.close(); + } + },{ + text: 'Add', + handler: function(){ + var CT = Ext.getCmp('ra_ty_me').getValue(); + if( CT ){ + var CV = Ext.getCmp('ra_ra_vam').getValue(); + } else { + var CV = Ext.getCmp('ra_ra_vap').getValue(); + }; + var CW = Ext.getCmp('wi_wi_va').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/addWidthTableRow.php', + params: { + UID: {$UserID}, + SID: '{$Session}', + NID: {$EID}, + SBM: CT, + RNG: CV, + WDZ: CW + }, + success: function( response, opts ){ + //get DS and reload! + }, + failure: failureAJAXFunction + }); + } + }] + }); + wiwin.show(); + var cmm = Ext.getCmp('node_range').getValue(); + Ext.getCmp('ra_ra_vam').setRawValue( cmm ); + Ext.getCmp('ra_ra_vap').setRawValue( 100 ); + } + },{ + text: 'Remove Row', + handler: function(){ + + } + },{ + text: 'Clear Table', + handler: function(){ + + } + }] +} +EFUFU; + $TPL = str_ireplace( '%%%NAME%%%', $R_name, $TPL ); + $TPL = str_ireplace( '%%%INFO%%%', $R_dev, $TPL ); + $TPL = str_ireplace( '%%%SPD%%%', $Labels->GetLabel('UART_COM_SPEED'), $TPL ); + $TPL = str_ireplace( '%%%SPD_VAL%%%', $Z['speed'], $TPL ); + $TPL = str_ireplace( '%%%BITS_VAL%%%',$Z['bit'], $TPL ); + $TPL = str_ireplace( '%%%PARITY_VAL%%%',$Z['parity'], $TPL ); + $TPL = str_ireplace( '%%%STOPS_VAL%%%',$Z['stop_bit'], $TPL ); + $TPL = str_ireplace( '%%%%RES_ID%%%',$EID, $TPL ); + $TPL = str_ireplace( '%%%USER_ID%%%',$UserID, $TPL ); + $TPL = str_ireplace( '%%%SESSION%%%',$Session, $TPL ); + echo $TPL; + } else { + header('location: /'); + }; +?> \ No newline at end of file diff --git a/lib/controller/props/1_node_prop.js b/lib/controller/props/1_node_prop.js index f55fda7..838d0cb 100644 --- a/lib/controller/props/1_node_prop.js +++ b/lib/controller/props/1_node_prop.js @@ -14,7 +14,8 @@ text: 'Change Settings', width: '100%', handler: function(){ - LRF2D2_settings(); + //LRF2D2_settings(); + showSettings(%%%NODEID%%%); } },{ xtype:'fieldset', diff --git a/lib/controller/updateUserSssion.php b/lib/controller/updateUserSssion.php new file mode 100644 index 0000000..07db5e8 --- /dev/null +++ b/lib/controller/updateUserSssion.php @@ -0,0 +1,8 @@ +Data['id'] > 1 ){ + echo "{'sessionIsValid': true }"; + } else { + echo "{'sessionIsValid': false }"; + }; +?> \ No newline at end of file diff --git a/lib/javascript/jsapi_dynamic/rgoose_main.js b/lib/javascript/jsapi_dynamic/rgoose_main.js index 8c18b43..e27572c 100644 --- a/lib/javascript/jsapi_dynamic/rgoose_main.js +++ b/lib/javascript/jsapi_dynamic/rgoose_main.js @@ -103,6 +103,32 @@ function setUserContent( c_id ){ }); }; +var gSessionValidatorInterval = null; + +function sessionValidator(){ + Ext.Ajax.request({ + url: '/lib/controller/updateUserSssion.php', + params: { + UID: , + SID: '' + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + if( !data.sessionIsValid ){ + playSound(); + Ext.Msg.show({ + title:'GetLabel('_REQ_FAILURE_');?>', + msg: 'GetLabel('_AJX_REQFAILURE_');?>', + buttons: Ext.Msg.OK, + icon: Ext.MessageBox.INFO + }); + doLogout(); + }; + }, + failure: failureAJAXFunction + }); +}; + function doCheckWindowSize(){ if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { @@ -127,6 +153,7 @@ var NotificationStack = null; Ext.onReady(function(){ doCheckWindowSize(); + gSessionValidatorInterval = window.setInterval( sessionValidator, 1000 ); NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25}); //window.onresize = doCheckWindowSize; Ext.QuickTips.init(); diff --git a/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js b/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js index 0ac4f11..f6d081e 100644 --- a/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js +++ b/lib/javascript/jsapi_dynamic/rgoose_sysmap_editor.js @@ -212,6 +212,99 @@ function editModule( mid ){ }; }; +function editWidthTable( did ){ + var loadEditor = true; + if( settingsAreChanged ){ + Ext.Msg.show({ + title:'GetLabel('_SETTINGS_CHANGED_');?>', + msg: 'GetLabel('_SET_CHANGED_WOULD_SAVE_');?>', + buttons: Ext.Msg.YESNO, + icon: Ext.MessageBox.WARNING, + fn: function(btn, text){ + if( btn == 'yes' ){ + cleanupChangeNotifier(); + } else { + loadEditor = false; + }; + } + }); + }; + if( loadEditor ){ + Ext.Ajax.request({ + url: '/lib/controller/getWidthTableEditor.php', + params: { + DID: did, + UID: , + SID: '', + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + var resourceEdPanel = Ext.getCmp('dep_ed_small'); + if( resourceEdPanel ){ + resourceEdPanel.removeAll( true ); + resourceEdPanel.add( data ); + resourceEdPanel.doLayout(); + }; + }, + failure: failureAJAXFunction + }); + }; +}; + +function renderer_mask_0( a ){ return ( a & 1 )?'':'';}; +function renderer_mask_1( a ){ return ( a & ( 1 << 1 ) )?'':'';}; +function renderer_mask_2( a ){ return ( a & ( 1 << 2 ) )?'':'';}; +function renderer_mask_3( a ){ return ( a & ( 1 << 3 ) )?'':'';}; +function renderer_mask_4( a ){ return ( a & ( 1 << 4 ) )?'':'';}; + +function renderer_day_0( a ){ return ( a & 1 )?'':'';}; +function renderer_day_1( a ){ return ( a & ( 1 << 1 ) )?'':'';}; +function renderer_day_2( a ){ return ( a & ( 1 << 2 ) )?'':'';}; +function renderer_day_3( a ){ return ( a & ( 1 << 3 ) )?'':'';}; +function renderer_day_4( a ){ return ( a & ( 1 << 4 ) )?'':'';}; +function renderer_day_5( a ){ return ( a & ( 1 << 5 ) )?'':'';}; +function renderer_day_6( a ){ return ( a & ( 1 << 6 ) )?'':'';}; +function renderer_day_s( a ){ return ( a & ( 1 << 7 ) )?'':'';}; + +function editMaskSchedule( did ){ + var loadEditor = true; + if( settingsAreChanged ){ + Ext.Msg.show({ + title:'GetLabel('_SETTINGS_CHANGED_');?>', + msg: 'GetLabel('_SET_CHANGED_WOULD_SAVE_');?>', + buttons: Ext.Msg.YESNO, + icon: Ext.MessageBox.WARNING, + fn: function(btn, text){ + if( btn == 'yes' ){ + cleanupChangeNotifier(); + } else { + loadEditor = false; + }; + } + }); + }; + if( loadEditor ){ + Ext.Ajax.request({ + url: '/lib/controller/getMaskScheduleEditor.php', + params: { + DID: did, + UID: , + SID: '', + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + var resourceEdPanel = Ext.getCmp('dep_ed_small'); + if( resourceEdPanel ){ + resourceEdPanel.removeAll( true ); + resourceEdPanel.add( data ); + resourceEdPanel.doLayout(); + }; + }, + failure: failureAJAXFunction + }); + }; +}; + function reloadNetworkData(){ Ext.Ajax.request({ url: '/lib/controller/getNetwork.php', diff --git a/style/assets/mCamx4knTO6C4J_usFsMVw.png_500xaaaf.png b/style/assets/mCamx4knTO6C4J_usFsMVw.png_500xaaaf.png new file mode 100644 index 0000000..44f134f Binary files /dev/null and b/style/assets/mCamx4knTO6C4J_usFsMVw.png_500xaaaf.png differ diff --git a/style/assets/mCamx4knTO6C4J_usFsMVw.spng_500xaf.png b/style/assets/mCamx4knTO6C4J_usFsMVw.spng_500xaf.png new file mode 100644 index 0000000..b8c2c6a Binary files /dev/null and b/style/assets/mCamx4knTO6C4J_usFsMVw.spng_500xaf.png differ diff --git a/style/style.css b/style/style.css index 310ca57..2652b6a 100644 --- a/style/style.css +++ b/style/style.css @@ -666,4 +666,48 @@ A.CalendarDS:hover { background-position: 25px 15px; background-size: 220px 220px; } +.node_1_img_set{ + display: block; + border-radius: 128px; + width: 256px; + height: 256px; + background-color: #fff343; + background-image: url('assets/!cid_ii_jvmzuzrm9.png'); + background-repeat: no-repeat; + background-position: 17px 15px; + background-size: 220px 220px; +} +.node_2_img_set{ + display: block; + border-radius: 128px; + width: 256px; + height: 256px; + background-color: #fff343; + background-image: url('assets/!cid_ii_jvmzuzqb2.png'); + background-repeat: no-repeat; + background-position: 17px 15px; + background-size: 220px 220px; +} +.node_3_img_set{ + display: block; + border-radius: 128px; + width: 256px; + height: 256px; + background-color: #fff343; + background-image: url('assets/!cid_ii_jvmzuzqh3.png'); + background-repeat: no-repeat; + background-position: 17px 15px; + background-size: 220px 220px; +} +.node_4_img_set{ + display: block; + border-radius: 128px; + width: 256px; + height: 256px; + background-color: #fff343; + background-image: url('assets/!cid_ii_jvmzuzqx6.png'); + background-repeat: no-repeat; + background-position: 17px 15px; + background-size: 220px 220px; +}