BUG 6212 Skin swtich on row double click

Switch skin in skins list on a row double click
This commit is contained in:
Hugo Loza
2011-07-20 18:40:45 -04:00
parent e982f4c560
commit ef15c73de1
2 changed files with 14 additions and 6 deletions

View File

@@ -45,6 +45,7 @@ $oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('setup/skinList', false); //adding a javascript file .js
$oHeadPublisher->addContent('setup/skinList'); //adding a html file .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher->assign('FORMATS',$c->getFormats());

View File

@@ -319,7 +319,13 @@ Ext.onReady(function(){
}, searchText,clearTextButton,searchButton],
bbar: bbarpaging,
listeners: {
rowdblclick: DoNothing
rowdblclick: function(grid, n,e){
rowSelected = infoGrid.getSelectionModel().getSelected();
if((rowSelected.data.SKIN_FOLDER_ID)&&((rowSelected.data.SKIN_FOLDER_ID!=""))){
viewport.getEl().mask(_('ID_SKIN_SWITCHING'));
changeSkin(rowSelected.data.SKIN_FOLDER_ID,SYS_SKIN);
}
}
},
view: new Ext.grid.GroupingView({
forceFit:true,
@@ -411,10 +417,6 @@ exportSkin = function(){
}
//Open New Calendar
NewCalendarAction = function(){
location.href = 'calendarEdit';
};
//Load Grid By Default
GridByDefault = function(){
@@ -522,4 +524,9 @@ UpdatePageConfig = function(pageSize){
size: pageSize
}
});
};
};
function changeSkin(newSkin,currentSkin){
currentLocation=top.location.href;
newLocation = currentLocation.replace("/"+currentSkin+"/","/"+newSkin+"/");
top.location.href=newLocation;
}