@ -626,6 +626,450 @@ function setNodeLocationByDelta(){
} ) ;
} ;
//viewport
function Events ( ) {
this . events = { } ;
}
Events . prototype . on = function ( name , fn ) {
var events = this . events [ name ] ;
if ( events == undefined ) {
this . events [ name ] = [ fn ] ;
this . emit ( 'event:on' , fn ) ;
} else {
if ( events . indexOf ( fn ) == - 1 ) {
events . push ( fn ) ;
this . emit ( 'event:on' , fn ) ;
}
}
return this ;
}
Events . prototype . once = function ( name , fn ) {
var events = this . events [ name ] ;
fn . once = true ;
if ( ! events ) {
this . events [ name ] = [ fn ] ;
this . emit ( 'event:once' , fn ) ;
} else {
if ( events . indexOf ( fn ) == - 1 ) {
events . push ( fn ) ;
this . emit ( 'event:once' , fn ) ;
}
}
return this ;
}
Events . prototype . emit = function ( name , args ) {
var events = this . events [ name ] ;
if ( events ) {
var i = events . length ;
while ( i -- ) {
if ( events [ i ] ) {
events [ i ] . call ( this , args ) ;
if ( events [ i ] . once ) {
delete events [ i ] ;
}
}
}
}
return this ;
}
Events . prototype . unbind = function ( name , fn ) {
if ( name ) {
var events = this . events [ name ] ;
if ( events ) {
if ( fn ) {
var i = events . indexOf ( fn ) ;
if ( i != - 1 ) {
delete events [ i ] ;
}
} else {
delete this . events [ name ] ;
}
}
} else {
delete this . events ;
this . events = { } ;
}
return this ;
}
var userPrefix ;
var prefix = ( function ( ) {
var styles = window . getComputedStyle ( document . documentElement , '' ) ,
pre = ( Array . prototype . slice
. call ( styles )
. join ( '' )
. match ( /-(moz|webkit|ms)-/ ) || ( styles . OLink === '' && [ '' , 'o' ] )
) [ 1 ] ,
dom = ( 'WebKit|Moz|MS|O' ) . match ( new RegExp ( '(' + pre + ')' , 'i' ) ) [ 1 ] ;
userPrefix = {
dom : dom ,
lowercase : pre ,
css : '-' + pre + '-' ,
js : pre [ 0 ] . toUpperCase ( ) + pre . substr ( 1 )
} ;
} ) ( ) ;
function bindEvent ( element , type , handler ) {
if ( element . addEventListener ) {
element . addEventListener ( type , handler , false ) ;
} else {
element . attachEvent ( 'on' + type , handler ) ;
}
}
function Viewport ( data ) {
events . add ( this ) ;
var self = this ;
this . element = data . element ;
this . fps = data . fps ;
this . sensivity = data . sensivity ;
this . sensivityFade = data . sensivityFade ;
this . touchSensivity = data . touchSensivity ;
this . speed = data . speed ;
this . lastX = 0 ;
this . lastY = 0 ;
this . mouseX = 0 ;
this . mouseY = 0 ;
this . distanceX = 0 ;
this . distanceY = 0 ;
this . positionX = 0 ;
this . positionY = 0 ;
this . positionZ = 0 ;
this . torqueX = 0 ;
this . torqueY = 0 ;
this . down = false ;
this . upsideDown = false ;
this . previousPositionX = 0 ;
this . previousPositionY = 0 ;
this . previousPositionZ = 0 ;
this . currentSide = 0 ;
this . calculatedSide = 0 ;
bindEvent ( data . element /*document*/ , 'mousedown' , function ( ) { self . down = true ; } ) ;
bindEvent ( data . element , 'mouseup' , function ( ) { self . down = false ; } ) ;
bindEvent ( data . element , 'keyup' , function ( ) { self . down = false ; } ) ;
bindEvent ( data . element , 'mousemove' , function ( e ) { self . mouseX = e . pageX ; self . mouseY = e . pageY ; } ) ;
bindEvent ( data . element , 'touchstart' , function ( e ) {
self . down = true ;
e . touches ? e = e . touches [ 0 ] : null ;
self . mouseX = e . pageX / self . touchSensivity ;
self . mouseY = e . pageY / self . touchSensivity ;
self . lastX = self . mouseX ;
self . lastY = self . mouseY ;
} ) ;
bindEvent ( data . element , 'touchmove' , function ( e ) {
if ( e . preventDefault ) {
e . preventDefault ( ) ;
}
if ( e . touches . length == 1 ) {
e . touches ? e = e . touches [ 0 ] : null ;
self . mouseX = e . pageX / self . touchSensivity ;
self . mouseY = e . pageY / self . touchSensivity ;
}
} ) ;
bindEvent ( data . element , 'touchend' , function ( e ) {
self . down = false ;
} ) ;
setInterval ( this . animate . bind ( this ) , this . fps ) ;
}
var events = new Events ( ) ;
events . add = function ( obj ) {
obj . events = { } ;
}
events . implement = function ( fn ) {
fn . prototype = Object . create ( Events . prototype ) ;
}
events . implement ( Viewport ) ;
Viewport . prototype . animate = function ( ) {
this . distanceX = ( this . mouseX - this . lastX ) ;
this . distanceY = ( this . mouseY - this . lastY ) ;
this . lastX = this . mouseX ;
this . lastY = this . mouseY ;
if ( this . down ) {
this . torqueX = this . torqueX * this . sensivityFade + ( this . distanceX * this . speed - this . torqueX ) * this . sensivity ;
this . torqueY = this . torqueY * this . sensivityFade + ( this . distanceY * this . speed - this . torqueY ) * this . sensivity ;
}
if ( Math . abs ( this . torqueX ) > 1.0 || Math . abs ( this . torqueY ) > 1.0 ) {
if ( ! this . down ) {
this . torqueX *= this . sensivityFade ;
this . torqueY *= this . sensivityFade ;
}
this . positionY -= this . torqueY ;
if ( this . positionY > 360 ) {
this . positionY -= 360 ;
} else if ( this . positionY < 0 ) {
this . positionY += 360 ;
}
if ( this . positionY > 90 && this . positionY < 270 ) {
this . positionX -= this . torqueX ;
if ( ! this . upsideDown ) {
this . upsideDown = true ;
this . emit ( 'upsideDown' , { upsideDown : this . upsideDown } ) ;
}
} else {
this . positionX += this . torqueX ;
if ( this . upsideDown ) {
this . upsideDown = false ;
this . emit ( 'upsideDown' , { upsideDown : this . upsideDown } ) ;
}
}
if ( this . positionX > 360 ) {
this . positionX -= 360 ;
} else if ( this . positionX < 0 ) {
this . positionX += 360 ;
}
if ( ! ( this . positionY >= 46 && this . positionY <= 130 ) && ! ( this . positionY >= 220 && this . positionY <= 308 ) ) {
if ( this . upsideDown ) {
if ( this . positionX >= 42 && this . positionX <= 130 ) {
this . calculatedSide = 3 ;
} else if ( this . positionX >= 131 && this . positionX <= 223 ) {
this . calculatedSide = 2 ;
} else if ( this . positionX >= 224 && this . positionX <= 314 ) {
this . calculatedSide = 5 ;
} else {
this . calculatedSide = 4 ;
}
} else {
if ( this . positionX >= 42 && this . positionX <= 130 ) {
this . calculatedSide = 5 ;
} else if ( this . positionX >= 131 && this . positionX <= 223 ) {
this . calculatedSide = 4 ;
} else if ( this . positionX >= 224 && this . positionX <= 314 ) {
this . calculatedSide = 3 ;
} else {
this . calculatedSide = 2 ;
}
}
} else {
if ( this . positionY >= 46 && this . positionY <= 130 ) {
this . calculatedSide = 6 ;
}
if ( this . positionY >= 220 && this . positionY <= 308 ) {
this . calculatedSide = 1 ;
}
}
if ( this . calculatedSide !== this . currentSide ) {
this . currentSide = this . calculatedSide ;
this . emit ( 'sideChange' ) ;
}
}
this . element . style [ userPrefix . js + 'Transform' ] = 'rotateX(' + this . positionY + 'deg) rotateY(' + this . positionX + 'deg) rotateZ(' + this . positionZ + 'deg)' ;
if ( this . positionY != this . previousPositionY || this . positionX != this . previousPositionX || this . positionZ != this . previousPositionZ ) {
this . previousPositionY = this . positionY ;
this . previousPositionX = this . positionX ;
this . previousPositionZ = this . positionZ ;
this . emit ( 'rotate' ) ;
}
}
Viewport . prototype . setDirect = function ( A , B , C ) {
if ( 1 ) {
this . positionX = A ;
this . positionY = B ;
this . positionZ = C ;
if ( this . positionY > 360 ) {
this . positionY -= 360 ;
} else if ( this . positionY < 0 ) {
this . positionY += 360 ;
}
if ( this . positionY > 90 && this . positionY < 270 ) {
if ( ! this . upsideDown ) {
this . upsideDown = true ;
this . emit ( 'upsideDown' , { upsideDown : this . upsideDown } ) ;
}
} else {
if ( this . upsideDown ) {
this . upsideDown = false ;
this . emit ( 'upsideDown' , { upsideDown : this . upsideDown } ) ;
}
}
if ( this . positionX > 360 ) {
this . positionX -= 360 ;
} else if ( this . positionX < 0 ) {
this . positionX += 360 ;
}
if ( ! ( this . positionY >= 46 && this . positionY <= 130 ) && ! ( this . positionY >= 220 && this . positionY <= 308 ) ) {
if ( this . upsideDown ) {
if ( this . positionX >= 42 && this . positionX <= 130 ) {
this . calculatedSide = 3 ;
} else if ( this . positionX >= 131 && this . positionX <= 223 ) {
this . calculatedSide = 2 ;
} else if ( this . positionX >= 224 && this . positionX <= 314 ) {
this . calculatedSide = 5 ;
} else {
this . calculatedSide = 4 ;
}
} else {
if ( this . positionX >= 42 && this . positionX <= 130 ) {
this . calculatedSide = 5 ;
} else if ( this . positionX >= 131 && this . positionX <= 223 ) {
this . calculatedSide = 4 ;
} else if ( this . positionX >= 224 && this . positionX <= 314 ) {
this . calculatedSide = 3 ;
} else {
this . calculatedSide = 2 ;
}
}
} else {
if ( this . positionY >= 46 && this . positionY <= 130 ) {
this . calculatedSide = 6 ;
}
if ( this . positionY >= 220 && this . positionY <= 308 ) {
this . calculatedSide = 1 ;
}
}
if ( this . calculatedSide !== this . currentSide ) {
this . currentSide = this . calculatedSide ;
this . emit ( 'sideChange' ) ;
}
}
this . element . style [ userPrefix . js + 'Transform' ] = 'rotateX(' + this . positionY + 'deg) rotateY(' + this . positionX + 'deg) rotateZ(' + this . positionZ + 'deg)' ;
if ( this . positionY != this . previousPositionY || this . positionX != this . previousPositionX || this . positionZ != this . previousPositionZ ) {
this . previousPositionY = this . positionY ;
this . previousPositionX = this . positionX ;
this . previousPositionZ = this . positionZ ;
this . emit ( 'rotate' ) ;
}
}
function Cube ( data ) {
var self = this ;
this . element = data . element ;
this . sides = this . element . getElementsByClassName ( 'side' ) ;
this . viewport = data . viewport ;
this . viewport . on ( 'rotate' , function ( ) {
self . rotateSides ( ) ;
} ) ;
this . viewport . on ( 'upsideDown' , function ( obj ) {
self . upsideDown ( obj ) ;
} ) ;
this . viewport . on ( 'sideChange' , function ( ) {
self . sideChange ( ) ;
} ) ;
}
Cube . prototype . rotateSides = function ( ) {
var viewport = this . viewport ;
if ( viewport . positionY > 90 && viewport . positionY < 270 ) {
this . sides [ 0 ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . style [ userPrefix . js + 'Transform' ] = 'rotate(' + ( viewport . positionX + viewport . torqueX ) + 'deg)' ;
this . sides [ 5 ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . style [ userPrefix . js + 'Transform' ] = 'rotate(' + - ( viewport . positionX + 180 + viewport . torqueX ) + 'deg)' ;
} else {
this . sides [ 0 ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . style [ userPrefix . js + 'Transform' ] = 'rotate(' + ( viewport . positionX - viewport . torqueX ) + 'deg)' ;
this . sides [ 5 ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . style [ userPrefix . js + 'Transform' ] = 'rotate(' + - ( viewport . positionX + 180 - viewport . torqueX ) + 'deg)' ;
}
}
Cube . prototype . upsideDown = function ( obj ) {
var deg = ( obj . upsideDown == true ) ? '180deg' : '0deg' ;
var i = 5 ;
while ( i > 0 && -- i ) {
this . sides [ i ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . style [ userPrefix . js + 'Transform' ] = 'rotate(' + deg + ')' ;
}
}
Cube . prototype . sideChange = function ( ) {
for ( var i = 0 ; i < this . sides . length ; ++ i ) {
this . sides [ i ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . className = 'cube-image' ;
}
this . sides [ this . viewport . currentSide - 1 ] . getElementsByClassName ( 'cube-image' ) [ 0 ] . className = 'cube-image active' ;
}
Cube . prototype . set = function ( A , B , C ) {
//C = C + 90.0;
this . viewport . setDirect ( A , B , C ) ;
}
//var viewport = new Viewport({
// element: document.getElementsByClassName('cube')[0],
// fps: 20,
// sensivity: .1,
// sensivityFade: .93,
// speed: 2,
// touchSensivity: 1.5
//});
//new Cube({
// viewport: viewport,
// element: document.getElementsByClassName('cube')[0]
//});
var LRF3D_Icon = L . icon ( {
iconUrl : '/style/assets/5_node.png' ,
@ -795,6 +1239,37 @@ function loadLocationNodes(){
} ) ;
} ;
var orientationEditorWindow = null ;
var cubeViewport = null ;
var cube = null ;
var curX = 0 ;
var curY = 0 ;
var curZ = 0 ;
var bk_upd = false ;
function setCubeOrientation ( A , B , C ) {
if ( bk_upd ) return ;
bk_upd = true ;
curX = A ;
curY = B ;
curZ = C ;
var t = Ext . getCmp ( 'roll_sld' ) ;
t . setValue ( A ) ;
t = Ext . getCmp ( 'roll' ) ;
t . setValue ( A ) ;
t = Ext . getCmp ( 'pitch_sld' ) ;
t . setValue ( B ) ;
t = Ext . getCmp ( 'pitch' ) ;
t . setValue ( B ) ;
t = Ext . getCmp ( 'yaw_sld' ) ;
t . setValue ( C ) ;
t = Ext . getCmp ( 'yaw' ) ;
t . setValue ( C ) ;
if ( cube != null ) cube . set ( curX , curY , curZ ) ;
bk_upd = false ;
} ;
function orientationEditor ( ) {
if ( orientationEditorWindow == null ) {
@ -1362,7 +1837,7 @@ function createNewMap(){
mapCreatorWindow = new Ext . Window ( {
width : 800 ,
height : 580 ,
title : '<?=$Labels->GetLabel(' _CREATE_CUSTOM_MAP_ ');?>' ,
title : "<?=$Labels->GetLabel('_CREATE_CUSTOM_MAP_');?>" ,
modal : true ,
frame : true ,
border : false ,
@ -1373,7 +1848,7 @@ function createNewMap(){
activeTab : 0 ,
items : [ {
xtype : 'form' ,
title : '<?=$Labels->GetLabel(' _INTER_MAP_ ');?>' ,
title : "<?=$Labels->GetLabel('_INTER_MAP_');?>" ,
id : 'map_map_frm' ,
fileUpload : true ,
labelWidth : 250 ,
@ -1381,7 +1856,7 @@ function createNewMap(){
height : 490 ,
items : [ {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _NAME_MAP_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_NAME_MAP_');?>" ,
name : 'map_name' ,
width : 540 ,
} , {
@ -1390,22 +1865,22 @@ function createNewMap(){
value : 1
} , {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _TILE_URL_MAP_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_TILE_URL_MAP_');?>" ,
name : 'map_url' ,
width : 540 ,
} , {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _LAYER_ATTRIB_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_LAYER_ATTRIB_');?>" ,
name : 'map_attr' ,
width : 540 ,
} , {
xtype : 'textarea' ,
fieldLabel : '<?=$Labels->GetLabel(' _DESCRIPTION_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_DESCRIPTION_');?>" ,
name : 'map_desc' ,
width : 540 ,
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_ZOOM_');?>" ,
name : 'map_maxz' ,
editable : false ,
typeAhead : true ,
@ -1422,7 +1897,7 @@ function createNewMap(){
displayField : 'zoom_l'
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_NATURAL_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_NATURAL_ZOOM_');?>" ,
name : 'map_maxnz' ,
editable : false ,
typeAhead : true ,
@ -1440,7 +1915,7 @@ function createNewMap(){
} ]
} , {
xtype : 'form' ,
title : '<?=$Labels->GetLabel(' _LOCAL_PIC_MAP_ ');?>' ,
title : "<?=$Labels->GetLabel('_LOCAL_PIC_MAP_');?>" ,
id : 'map_pic_frm' ,
fileUpload : true ,
height : 490 ,
@ -1455,7 +1930,7 @@ function createNewMap(){
} ,
items : [ {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_NAME_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_NAME_');?>" ,
id : 'map_name_2' ,
name : 'map_name' ,
width : 540
@ -1466,24 +1941,24 @@ function createNewMap(){
} , {
xtype : 'fileuploadfield' ,
id : 'form-file' ,
emptyText : '<?=$Labels->GetLabel(' _SELE_ANIMAGE_ ');?>' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_PICTURE_ ');?>' ,
emptyText : "<?=$Labels->GetLabel('_SELE_ANIMAGE_');?>" ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_PICTURE_');?>" ,
width : 500 ,
name : 'map_image' ,
buttonText : '<?=$Labels->GetLabel(' _BROWSE_ ');?>'
buttonText : "<?=$Labels->GetLabel('_BROWSE_');?>"
} , {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _LAYER_ATTRIB_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_LAYER_ATTRIB_');?>" ,
name : 'map_attr' ,
width : 540 ,
} , {
xtype : 'textarea' ,
fieldLabel : '<?=$Labels->GetLabel(' _DESCRIPTION_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_DESCRIPTION_');?>" ,
name : 'map_desc' ,
width : 540 ,
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_ZOOM_');?>" ,
editable : false ,
typeAhead : true ,
id : 'map_maxz' ,
@ -1501,7 +1976,7 @@ function createNewMap(){
displayField : 'zoom_l'
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_NATURAL_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_NATURAL_ZOOM_');?>" ,
editable : false ,
typeAhead : true ,
id : 'map_maxnz' ,
@ -1519,31 +1994,31 @@ function createNewMap(){
displayField : 'zoom_l'
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _TOP_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_TOP_PIC_BOUND_');?>" ,
name : 'map_tpb' ,
value : 0 ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _LEFT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_LEFT_PIC_BOUND_');?>" ,
name : 'map_lpb' ,
value : 0 ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _RIGHT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_RIGHT_PIC_BOUND_');?>" ,
name : 'map_rpb' ,
value : 0 ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _BOT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_BOT_PIC_BOUND_');?>" ,
name : 'map_bpb' ,
value : 0 ,
width : 540 ,
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_COORD_SYSTEM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_COORD_SYSTEM_');?>" ,
editable : false ,
typeAhead : true ,
hiddenName : 'map_corsys' ,
@ -1579,7 +2054,7 @@ function createNewMap(){
displayField : 'C_SYS'
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_WIDTH_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_WIDTH_');?>" ,
id : 'map_height' ,
name : 'map_height' ,
decimalPrecision : 2 ,
@ -1587,7 +2062,7 @@ function createNewMap(){
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_HEIGHT_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_HEIGHT_');?>" ,
id : 'map_width' ,
name : 'map_width' ,
decimalPrecision : 2 ,
@ -1605,7 +2080,7 @@ function createNewMap(){
items : [ {
xtype : 'spacer' ,
width : 250 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _MAP_CENTER_MODE_ ');?>:</p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_MAP_CENTER_MODE_');?>:</p>"
} , {
xtype : 'radio' ,
name : 'bounds_mode' ,
@ -1635,11 +2110,11 @@ function createNewMap(){
items : [ {
xtype : 'spacer' ,
width : 250 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _MAP_LEFT_CORCORD_ ');?>:</p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_MAP_LEFT_CORCORD_');?>:</p>"
} , {
xtype : 'spacer' ,
width : 100 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _LAT_ ');?></p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_LAT_');?></p>"
} , {
xtype : 'numberfield' ,
id : 'map_lcclat' ,
@ -1650,7 +2125,7 @@ function createNewMap(){
} , {
xtype : 'spacer' ,
width : 100 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _LON_ ');?></p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_LON_');?></p>"
} , {
xtype : 'numberfield' ,
id : 'map_lcclon' ,
@ -1661,11 +2136,11 @@ function createNewMap(){
} , {
xtype : 'spacer' ,
width : 250 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _MAP_RIGHT_CORCORD_ ');?>:</p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_MAP_RIGHT_CORCORD_');?>:</p>"
} , {
xtype : 'spacer' ,
width : 100 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _LAT_ ');?></p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_LAT_');?></p>"
} , {
xtype : 'numberfield' ,
id : 'map_rcclat' ,
@ -1676,7 +2151,7 @@ function createNewMap(){
} , {
xtype : 'spacer' ,
width : 100 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _LON_ ');?></p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_LON_');?></p>"
} , {
xtype : 'numberfield' ,
id : 'map_rcclon' ,
@ -1844,19 +2319,19 @@ function editCurrentMap(){
} ]
} ] ,
bbar : [ '->' , {
text : '<?=$Labels->GetLabel(' _CANCEL_ ');?>' ,
text : "<?=$Labels->GetLabel('_CANCEL_');?>" ,
handler : function ( ) {
mapEditorWindow . destroy ( ) ;
}
} , {
text : '<?=$Labels->GetLabel(' _APPLY_CHANGES_ ');?>' ,
text : "<?=$Labels->GetLabel('_APPLY_CHANGES_');?>" ,
handler : function ( ) {
var tt = Ext . getCmp ( 'mcr_tbp' ) . getActiveTab ( ) ;
if ( tt . id == 'map_map_frm' ) {
if ( Ext . getCmp ( 'map_map_frm' ) . getForm ( ) . isValid ( ) ) {
Ext . getCmp ( 'map_map_frm' ) . getForm ( ) . submit ( {
url : '/lib/controller/updateMap.php' ,
waitMsg : '<?=$Labels->GetLabel(' _UPDATING_DATA_ ');?>...' ,
waitMsg : "<?=$Labels->GetLabel('_UPDATING_DATA_');?>..." ,
clientValidation : false ,
encoding : 'multipart/form-data' ,
success : function ( f , a ) {
@ -1871,7 +2346,7 @@ function editCurrentMap(){
Ext . getCmp ( 'map_pic_frm' ) . getForm ( ) . submit ( {
url : '/lib/controller/updateMap.php' ,
clientValidation : false ,
waitMsg : '<?=$Labels->GetLabel(' _UPDATING_DATA_ ');?>...' ,
waitMsg : "<?=$Labels->GetLabel('_UPDATING_DATA_');?>..." ,
encoding : 'multipart/form-data' ,
success : function ( f , a ) {
alert ( 'Processed file on the server2' ) ;
@ -1895,7 +2370,7 @@ function editCurrentMap(){
mapEditorWindow = new Ext . Window ( {
width : 800 ,
height : 540 ,
title : '<?=$Labels->GetLabel(' _EDIT_CUR_MAP_ ');?>' ,
title : "<?=$Labels->GetLabel('_EDIT_CUR_MAP_');?>" ,
modal : true ,
frame : true ,
border : false ,
@ -1918,7 +2393,7 @@ function editCurrentMap(){
height : 6
} , {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_NAME_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_NAME_');?>" ,
name : 'map_name' ,
value : newMapData . name ,
width : 540
@ -1933,19 +2408,19 @@ function editCurrentMap(){
html : '<center><img height="50px" SRC="/lib/controller/data/assets/images/' + MAP_SET . layer_url + '"></center>'
} , {
xtype : 'textfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _LAYER_ATTRIB_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_LAYER_ATTRIB_');?>" ,
name : 'map_attr' ,
value : newMapData . attribution ,
width : 540 ,
} , {
xtype : 'textarea' ,
fieldLabel : '<?=$Labels->GetLabel(' _DESCRIPTION_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_DESCRIPTION_');?>" ,
name : 'map_desc' ,
value : newMapData . desc ,
width : 540 ,
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_ZOOM_');?>" ,
editable : false ,
typeAhead : true ,
name : 'map_maxz' ,
@ -1963,7 +2438,7 @@ function editCurrentMap(){
displayField : 'zoom_l'
} , {
xtype : 'combo' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAX_NATURAL_ZOOM_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAX_NATURAL_ZOOM_');?>" ,
editable : false ,
typeAhead : true ,
name : 'map_maxnz' ,
@ -1981,38 +2456,38 @@ function editCurrentMap(){
displayField : 'zoom_l'
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _TOP_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_TOP_PIC_BOUND_');?>" ,
name : 'map_tpb' ,
value : newMapData . img_tb ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _LEFT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_LEFT_PIC_BOUND_');?>" ,
name : 'map_lpb' ,
value : newMapData . img_lb ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _RIGHT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_RIGHT_PIC_BOUND_');?>" ,
name : 'map_rpb' ,
value : newMapData . img_rb ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _BOT_PIC_BOUND_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_BOT_PIC_BOUND_');?>" ,
name : 'map_bpb' ,
value : newMapData . img_bb ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_WIDTH_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_WIDTH_');?>" ,
name : 'map_width' ,
decimalPrecision : 2 ,
value : newMapData . img_map_w ,
width : 540 ,
} , {
xtype : 'numberfield' ,
fieldLabel : '<?=$Labels->GetLabel(' _MAP_HEIGHT_ ');?>' ,
fieldLabel : "<?=$Labels->GetLabel('_MAP_HEIGHT_');?>" ,
name : 'map_height' ,
decimalPrecision : 2 ,
value : newMapData . img_map_h ,
@ -2028,7 +2503,7 @@ function editCurrentMap(){
items : [ {
xtype : 'spacer' ,
width : 250 ,
html : '<p style="text-align:right; margin-right: 5px;"><?=$Labels->GetLabel(' _MAP_CENTER_MODE_ ');?>:</p>'
html : "<p style='text-align:right; margin-right: 5px;'><?=$Labels->GetLabel('_MAP_CENTER_MODE_');?>:</p>"
} , {
xtype : 'radio' ,
name : 'bounds_mode' ,
@ -2049,7 +2524,7 @@ function editCurrentMap(){
} ]
} ] ,
bbar : [ '->' , {
text : '<?=$Labels->GetLabel(' _CANCEL_ ');?>' ,
text : "<?=$Labels->GetLabel('_CANCEL_');?>" ,
handler : function ( ) {
mapEditorWindow . destroy ( ) ;
}
@ -2059,7 +2534,7 @@ function editCurrentMap(){
if ( Ext . getCmp ( 'map_edt_frm' ) . getForm ( ) . isValid ( ) ) {
Ext . getCmp ( 'map_edt_frm' ) . getForm ( ) . submit ( {
url : '/lib/controller/updateMap.php' ,
waitMsg : '<?=$Labels->GetLabel(' _UPDATING_DATA_ ');?>...' ,
waitMsg : "<?=$Labels->GetLabel('_UPDATING_DATA_');?>..." ,
encoding : 'multipart/form-data' ,
success : function ( fp , o ) {
mapEditorWindow . destroy ( ) ;