Thank you so much for explaining this so briefly to me.
When I tried to run through this code,
var themeChange = function (menu, item, e, eOpts) {
debugger;
App.direct.GetThemeUrl(item.text, {
success: function (result) {
debugger;
Ext.net.ResourceMgr.setTheme(result);
var mainPanel = Ext.getCmp("pnlComp");
mainPanel.items.each(function (el) {
if (!Ext.isEmpty(el.iframe)) {
if (el.getBody().Ext) {
Ext.net.ResourceMgr.setTheme(result);
}
}
});
mainPanel.doLayout();
},
failure: function (response) {
alert('test');
}
});
};
the
App.direct.GetThemeUrl(item.text, {
is sending me the failure result. Can you please explain this to me? here item.text returns the name of the theme I selected from the menu item.
And after analyzing this code :
if (Ext.isEmpty(lowerUrl) || lowerUrl == "blue" || lowerUrl == "default" || lowerUrl == "classic") {
url = path ? (path + "/extjs/resources/ext-theme-classic/ext-theme-classic-all" + suffix + ".css") : "~/extjs/resources/ext_theme_classic/ext-theme-classic-all" + suffix +"-embedded-css/ext.axd";
name = "classic";
}
What I understood is , if it gets the css files of the selected theme, it will load the file from application otherwise it will load from ext.axd.
So I put all the theme folders inside extjs/resources folder in my application. So that it can get the css files. If I can make it work, then my problem would be solved.