0 ) {
var selectedRow = grid.getSelectionModel().getSelected();
var params = { sid: SID, fileID: selectedRow.data.id, rm: 'delProject', r: Math.random() };
gridDS.remove(selectedRow);
gridForm.submit({
waitMsg: "Einen Moment bitte ...",
params: params,
success: function(form, action) {
gridDS.load({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'showProjects'
},
scripts: true
});
},
failure: function(form, action) {
alert( "Die Aktion konnte nicht ausgeführt werden ..." );
gridDS.load({
url: "/perl/index.pl",
params: { sid: SID, rm: 'showProjects' },
scripts: true
});
}
});
} else {
mM4App.msg("Achtung:","Bitte wählen Sie ein Projekt zum löschen.");
}
};
var gridHeaderPanel = grid.getView().getHeaderPanel(true);
var gridTB = new Ext.Toolbar( gridHeaderPanel, [
{
text: "Löschen",
handler: function() {
delProject();
}
}
]);
this.grid = grid;
this.gridDS = gridDS;
this.gridCM = gridCM;
Ext.apply(this, config, {
width: 600,
height: 400
});
layout.endUpdate();
dialog.resizeTo(this.width, this.height);
};
mM4ProjectListDialog.prototype = {
show : function( el, callback ) {
this.dialog.show(el);
this.callback = callback;
},
hide : function() {
this.dialog.hide();
},
setUrl : function( url ) {
this.url = url;
},
load : function() {
this.loadGrid();
},
loadFile : function() {
var selRow = this.grid.getSelectionModel().getSelected();
var file = selRow.data.id;
document.location = "/perl/index.pl?sid=" + SID + "&rm=loadProject&fileID=" + file;
this.hide();
},
loadGrid : function() {
this.gridDS.load({
url: "/perl/index.pl",
params: { sid: SID, rm: 'showProjects', r: Math.random() },
scripts: true
});
},
doCallback : function() {
if ( this.callback ) {
var callback = this.callback;
callback();
}
}
};
var mM4HelpBrowser = function(config) {
config = config || {};
if(typeof config == "string"){
config = {title: config};
}
var dialog = new Ext.LayoutDialog( config.id || Ext.id(), {
autoCreate: config.autoCreate || true,
modal: config.modal || false,
resizable: config.resizable || false,
minWidth: config.minWidth || 550,
minHeight: config.minHeight || 350,
syncHeightBeforeShadow: true,
shadow: true,
fixedcenter: true,
draggable: false,
center: { autoScroll: true, titlebar: false }
});
dialog.setTitle( config.title || "Hilfe");
dialog.getEl().addClass('ychooser-dlg');
dialog.addKeyListener(27, dialog.hide, dialog);
// dialog buttons
this.close = dialog.addButton("Schließen", this.hide, this);
// dialog events
dialog.on('show', this.load, this);
// dialog panels
var ho = dialog.body.createChild({tag:'div', id:'helpOutput'});
dialog.getLayout().add('center', new Ext.ContentPanel('helpOutput', {fitToFrame: true}));
Ext.apply(this, config, {
width: 550,
height: 350
});
dialog.resizeTo(this.width, this.height);
this.dialog = dialog;
};
mM4HelpBrowser.prototype = {
show : function( el, callback ) {
this.dialog.show(el);
},
hide : function() {
this.dialog.hide();
},
reset : function() {
this.url = "/help/de/index.html";
},
setUrl : function( url ) {
this.url = url;
},
load : function() {
this.dialog.getLayout().getRegion('center').getActivePanel().load( this.url );
}
};
var mM4maLoginDialog = function(config) {
config = config || {};
if(typeof config == "string"){
config = {title: config};
}
var dialog = new Ext.LayoutDialog( config.id || Ext.id(), {
autoCreate: config.autoCreate || true,
modal: config.modal,
resizable: config.resizable || false,
minWidth: config.minWidth || 600,
minHeight: config.minHeight || 400,
resizable: config.resizable || false,
closable: config.closable || false,
syncHeightBeforeShadow: true,
shadow: true,
fixedcenter: true,
draggable: false,
center: { autoScroll: true, titlebar: false }
});
dialog.setTitle( config.title );
dialog.getEl().addClass('ychooser-dlg');
dialog.addKeyListener(13, this.doLogin, this);
this.declineBtn = dialog.addButton("Abbrechen", this.doDecline, this);
this.acceptBtn = dialog.addButton("Login", this.doLogin, this);
// dialog events
//dialog.on('show', this.load, this);
dialog.on('hide', this.doCallback, this);
// dialog panels
var tmpID = Ext.id();
var ho = dialog.body.createChild({tag:'div', id:tmpID, autoScroll: false, style: "overflow: hidden;"});
dialog.getLayout().add('center', new Ext.ContentPanel(tmpID, {fitToFrame: true, autoScroll: false}));
Ext.apply(this, config, {
width: 400,
height: 300
});
dialog.resizeTo(this.width, this.height);
this.url = config.url;
this.params = config.params;
this.dialog = dialog;
};
mM4maLoginDialog.prototype = {
show : function( el, callback ) {
this.dialog.show(el);
this.load();
if ( callback ) {
this.callback = callback;
}
},
doLogin: function() {
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'doMALogin',
maid: document.maLoginForm.maid.value,
r: Math.random()
},
scripts: true
});
},
doDecline: function() {
this.hide();
mM4App.showAnalysenSelection();
},
hide : function() {
this.dialog.hide();
},
reset : function() {
//this.url = '/help/de/index.html';
},
setUrl : function( url ) {
this.url = url;
},
setParams : function( params ) {
params = params || {};
if(typeof config == "string"){
params = {rm: params};
}
this.params = params;
},
load : function() {
this.dialog.getLayout().getRegion('center').getActivePanel().setUrl( {url: this.url, params: this.params, scripts: true} );
this.dialog.getLayout().getRegion('center').getActivePanel().refresh( {url: this.url, params: this.params, scripts: true} );
},
loadUrl : function( params ) {
this.dialog.getLayout().getRegion('center').getActivePanel().load( { url: this.url, params: params, scripts: true });
},
doCallback : function(){
var callback = this.callback;
if ( callback ) {
callback();
}
}
};
var mM4AppNutzungDialog = function(config) {
config = config || {};
if(typeof config == "string"){
config = {title: config};
}
var dialog = new Ext.LayoutDialog( config.id || Ext.id(), {
autoCreate: config.autoCreate || true,
modal: config.modal,
resizable: config.resizable || false,
minWidth: config.minWidth || 600,
minHeight: config.minHeight || 400,
resizable: config.resizable || false,
closable: config.closable || false,
syncHeightBeforeShadow: true,
shadow: true,
fixedcenter: true,
draggable: false,
center: { autoScroll: true, titlebar: false }
});
dialog.setTitle( config.title );
dialog.getEl().addClass('ychooser-dlg');
this.declineBtn = dialog.addButton("Ablehnen", this.doDecline, this);
this.acceptBtn = dialog.addButton("Akzeptieren", this.doAccept, this);
// dialog events
//dialog.on('show', this.load, this);
dialog.on('hide', this.doCallback, this);
// dialog panels
var tmpID = Ext.id();
var ho = dialog.body.createChild({tag:'div', id:tmpID, autoScroll: false, style: "overflow: hidden;"});
dialog.getLayout().add('center', new Ext.ContentPanel(tmpID, {fitToFrame: true, autoScroll: false}));
Ext.apply(this, config, {
width: 400,
height: 300
});
dialog.resizeTo(this.width, this.height);
this.url = config.url;
this.params = config.params;
this.dialog = dialog;
};
mM4AppNutzungDialog.prototype = {
show : function( el, callback ) {
this.dialog.show(el);
this.load();
if ( callback ) {
this.callback = callback;
}
},
doAccept: function() {
this.hide();
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'acceptUsage',
r: Math.random()
},
scripts: true
});
},
doDecline: function() {
this.hide();
mM4App.showAnalysenSelection();
},
hide : function() {
this.dialog.hide();
},
reset : function() {
//this.url = '/help/de/index.html';
},
setUrl : function( url ) {
this.url = url;
},
setParams : function( params ) {
params = params || {};
if(typeof config == "string"){
params = {rm: params};
}
this.params = params;
},
load : function() {
this.dialog.getLayout().getRegion('center').getActivePanel().setUrl( {url: this.url, params: this.params, scripts: true} );
this.dialog.getLayout().getRegion('center').getActivePanel().refresh( {url: this.url, params: this.params, scripts: true} );
},
loadUrl : function( params ) {
this.dialog.getLayout().getRegion('center').getActivePanel().load( { url: this.url, params: params, scripts: true });
},
doCallback : function(){
var callback = this.callback;
if ( callback ) {
callback();
}
}
};
var mM4AppSelectionDialog = function(config) {
config = config || {};
if(typeof config == "string"){
config = {title: config, autoScroll: true};
}
var dialog = new Ext.LayoutDialog( config.id || Ext.id(), {
autoCreate: config.autoCreate || true,
modal: config.modal,
resizable: config.resizable || false,
minWidth: config.minWidth || 600,
minHeight: config.minHeight || 400,
resizable: config.resizable || false,
closable: config.closable || false,
syncHeightBeforeShadow: true,
shadow: true,
fixedcenter: true,
draggable: false,
center: { autoScroll: true, titlebar: false }
});
dialog.setTitle( config.title );
dialog.getEl().addClass('ychooser-dlg');
dialog.addKeyListener(27, dialog.hide, dialog);
if ( config.autoScroll != false && config.autoScroll != true ) {
config.autoScroll = true;
}
// dialog buttons
this.close = false;
this.close = dialog.addButton("Schließen", this.hide, this);
this.close.disable();
if ( config.closable ) {
this.close.enable();
}
// dialog events
//dialog.on('show', this.load, this);
dialog.on('hide', this.doCallback, this);
// dialog panels
var tmpID = Ext.id();
var ho = dialog.body.createChild({tag:'div', id:tmpID, autoScroll: false, style: "overflow: hidden;"});
dialog.getLayout().add('center', new Ext.ContentPanel(tmpID, {fitToFrame: true, autoScroll: config.autoScroll}));
Ext.apply(this, config, {
width: 400,
height: 300
});
dialog.resizeTo(this.width, this.height);
this.url = config.url;
this.params = config.params;
this.dialog = dialog;
}
mM4AppSelectionDialog.prototype = {
show : function( el, closable, callback ) {
this.dialog.show(el);
this.load();
if ( callback ) {
this.callback = callback;
}
if ( closable ) {
this.closable = true;
this.dialog.closable = true;
this.close.enable();
} else {
this.closable = false;
this.dialog.closable = false;
this.close.disable();
}
},
hide : function() {
this.dialog.hide();
},
reset : function() {
//this.url = '/help/de/index.html';
},
setUrl : function( url ) {
this.url = url;
},
setParams : function( params ) {
params = params || {};
if(typeof config == "string"){
params = {rm: params};
}
this.params = params;
},
load : function() {
this.dialog.getLayout().getRegion('center').getActivePanel().setUrl( {url: this.url, params: this.params, scripts: true} );
this.dialog.getLayout().getRegion('center').getActivePanel().refresh( {url: this.url, params: this.params, scripts: true} );
},
loadUrl : function( params ) {
this.dialog.getLayout().getRegion('center').getActivePanel().load( { url: this.url, params: params, scripts: true });
},
doCallback : function(){
var callback = this.callback;
if ( callback ) {
callback();
}
}
};
var mM4AppLayerSelection = function (config){
var layer = new Ext.Layer({
autoCreate: true,
shadow: true
}, config.id || Ext.id());
layer.addClass('mM4-bordered-selection');
layer.setZIndex(1000);
this.layer = layer;
if ( config.template ) {
this.thumbTemplate = new Ext.Template(config.template);
} else {
this.thumbTemplate = new Ext.Template('');
}
this.thumbTemplate.compile();
this.view = new Ext.JsonView( this.layer, this.thumbTemplate, {
singleSelect: true,
emptyText: config.emptyText || 'THERE ARE NO ANALYSEN AVAILABLE
'
});
this.view.on('click', this.doCallback, this);
this.view.on('loadexception', this.onLoadException, this);
Ext.apply(this, config, {
width: 400,
height: 300
});
layer.setSize( this.width, this.height );
layer.center('content-div');
this.loaded = false;
};
mM4AppLayerSelection.prototype = {
show : function(el, callback){
this.reset();
this.load();
this.layer.fadeIn(el, {duration:.8,remove:false});
this.callback = callback;
},
reset : function(){
this.loaded = false;
this.view.getEl().dom.scrollTop = 0;
this.view.select(0);
},
hide : function() {
this.layer.fadeOut({duration:.8,remove:false});
},
alignHCenter : function(){
this.layer.setX( this.layer.getEl().getParent().getWidth()/2 - this.layer.getWith() / 2 );
},
alignVCenter : function(){
this.layer.setY( this.layer.getEl().getParent().getHeight()/2 - this.layer.getHeight() / 2 );
},
alignCenter : function(){
this.alignHCenter();
this.alignVCenter();
},
onLoad : function() {
this.loaded = true;
this.view.select(0);
},
load : function(){
if(!this.loaded){
this.view.load({url: this.url, params: this.params, callback: this.onLoad.createDelegate(this)});
}
},
setRunmode : function( newRM ) {
this.params.rm = newRM;
},
onLoadException : function(v,o){
var msg = "Error loading data from Url:
" + this.url + "
With Params:";
msg = msg + "
" + this.params;
this.view.getEl().update('' + msg + '
');
},
doCallback : function(){
var selectedNode = this.view.getSelectedNodes()[0];
var callback = this.callback;
if ( selectedNode && callback ) {
this.layer.fadeOut({duration:.8,remove:false});
callback( selectedNode.id );
}
}
};
var mM4App = function() {
var msgCt;
var loading;
var loadingMask;
var contentPanel;
var contentPanelUpdateManager;
var quickinfoPanel;
var quickinfoPanelUpdateManager;
var analysenChooser;
var steckbriefDlg = false;
var nutzungDlg = false;
var maDlg = false;
var planStepChooser;
var mM4Chooser;
var mM4AppLoginDlg = false;
var mM4AppUserRegDlg = false;
var universeChooser;
var auswertungsChooser;
var pageLayout;
var pageWestLayout;
var menuTree;
var menuTreeRoot;
var guideTree;
var guideTreeRoot;
var guideOptNodesSeen = new Array;
var mM4Selection;
var mM4PlanEntry;
var mM4KontaktEingabe;
var mM4helpDialog;
var mM4PlanungsSelector;
var mM4PlanzielSelector;
var mM4MarketSelection = false;
var mM4SpaltenSelection = false;
var mM4TarifSettings;
var projectListDialog;
var sessionListDialog;
var reloadTreeEventFunction;
var initTreeEventFunction;
var iFrameHasListener = false;
var curGuideNode;
// Menu Items
var pMenuNew;
var pMenuSave;
var pMenuSaveAs;
var pMenuLoad;
var pMenuQuit;
var tmpCurNodeID = false;
var curAuswertungID = false;
// standard funktionen
reloadTreeEventFunction = function() {
mM4App.reloadTree();
Ext.get('content-iframe').un("load", reloadTreeEventFunction);
iFrameHasListener = false;
}
initTreeEventFunction = function() {
mM4App.initTree( "Projekt", true );
Ext.get('content-iframe').un("load", initTreeEventFunction);
iFrameHasListener = false;
}
function createBox(t, s){
return [''].join('');
}
return {
init : function() {
// init quicktips engine (for hover quicktips)
Ext.QuickTips.init();
// aplication layout
pageLayout = new Ext.BorderLayout(document.body, {
west: {
split:false,
initialSize: 245,
collapsible: true,
titlebar: true,
title: "Projektmanager",
collapsedTitle: "Projektmanager",
animate: true
},
south: {
split:false,
initialSize: 28
},
center: {
titlebar: true,
split: false
}
});
// menu layout (with quickinfo's)
pageWestLayout = new Ext.BorderLayout('pageMenu', {
south: {
split: false,
initialSize: 170,
collapsible: true,
titlebar: true,
title: "Quick Infos",
collapsedTitle: "Quick Infos",
autoScroll: true,
animate: true
},
center : {
tabPosition: 'bottom',
autoTabs: true,
titlebar: false
}
});
this.pageWestLayout = pageWestLayout;
// begin page layout (add content panels)
pageLayout.beginUpdate();
pageWestLayout.beginUpdate();
var expertCP = new Ext.ContentPanel('expertNav', {title: "open", fitToFrame: true });
var beginnerCP = new Ext.ContentPanel('beginnerNav', {title: "guided", fitToFrame: true });
pageWestLayout.add('south', new Ext.ContentPanel('qi', {fitToFrame: true}));
// pageWestLayout.add('center', beginnerCP);
pageWestLayout.add('center', expertCP);
pMenuNew = new Ext.menu.Item({
text: "Neu ...",
handler: function() {
mM4App.newProject();
}
});
pMenuSave = new Ext.menu.Item({
text: "Speichern",
handler: function() {
mM4App.checkSave();
}
});
if ( !LOADED ) {
pMenuSave.disable();
}
pMenuSaveAs = new Ext.menu.Item({
text: "Speichern unter ...",
handler: function() {
mM4App.showSaveAs();
}
});
pMenuSaveAs.disable();
this.pMenuSaveAs = pMenuSaveAs;
pMenuLoad = new Ext.menu.Item({
text: "Öffnen ...",
handler: function() {
mM4App.showProjectListDialog();
}
});
pMenuQuit = new Ext.menu.Item({
text: "Beenden ...",
handler: function() {
mM4App.closeProject();
}
});
var mnuProjektManager = new Ext.menu.Menu({
id: 'pmMenu'
});
mnuProjektManager.addItem(pMenuNew);
mnuProjektManager.addItem(new Ext.menu.Separator());
mnuProjektManager.addItem(pMenuSave);
mnuProjektManager.addItem(pMenuSaveAs);
mnuProjektManager.addItem(pMenuLoad);
//mnuProjektManager.addItem(new Ext.menu.Separator());
var expertNavTB = new Ext.Toolbar(expertCP.el, [
{
text: "Projekt",
menu: mnuProjektManager
}
]);
if ( USERLEVEL == 9 || CLIENTIP == "217.6.73.190" ) {
var sessionTBButton = new Ext.Toolbar.Button({
text: 'Sessions',
tooltip: 'Zeigt alle Sessions an',
handler: mM4App.showSessionListDialog
});
expertNavTB.add(sessionTBButton);
}
pageWestLayout.getRegion('center').getPanel('expertNav').on('activate', function() {
mM4App.initMenuTree("Projekt", true);
mM4App.btnPrev.hide();
mM4App.btnNext.hide();
mM4App.btnAuswertung.show();
});
pageWestLayout.endUpdate();
pageLayout.add('west', new Ext.NestedLayoutPanel( pageWestLayout ));
pageLayout.add('south', new Ext.ContentPanel('pageFooter', {fitToFrame:true}));
pageLayout.add('center', new Ext.ContentPanel('content-div', {
fitToFrame: true, autoScroll: false, resizeEl: 'content-iframe', title: "Planungs-Modi"
}));
//Ext.get('content-iframe').anchorTo('content-div','tl');
//pageLayout.getRegion('west').hide();
pageLayout.endUpdate();
// set iframe source
Ext.get('content-iframe').dom.src = '/empty.html';
if( Ext.isSafari || Ext.isOpera ){
pageLayout.layout();
}
var btnNext = new Ext.Button('pageFooter', {
text: "Weiter",
handler: function(btn) {
mM4App.checkCurNodeStatus();
}
});
btnNext.hide();
this.btnNext = btnNext;
var btnPrev = new Ext.Button('pageFooter', {
text: "Zurück",
handler: function(btn) {
mM4App.guidePrevStep();
}
});
btnPrev.hide();
this.btnPrev = btnPrev;
var btnAuswertung = new Ext.Button('pageFooter', {
text: "Auswerten",
handler: function(btn) {
mM4App.setContentTitle();
mM4App.showAuswertung();
//mM4App.btnAuswertung.hide();
}
});
btnAuswertung.hide();
this.btnAuswertung = btnAuswertung;
var btnPlanEntry = new Ext.Button('pageFooter', {
text: "Planeingabe",
handler: function(btn) {
mM4App.showPlanEntry();
mM4App.btnAuswertung.show();
mM4App.btnPlanEntry.hide();
}
});
btnPlanEntry.hide();
this.btnPlanEntry = btnPlanEntry;
var btnHelp = new Ext.Button('pageFooter', {
text: "Hilfe",
handler: function(btn) {
mM4App.showHelp();
}
});
// hide loading indicator
this.hideLoading();
if ( LOADED ) {
this.pMenuSaveAs.enable();
mM4App.curTree = menuTree;
mM4App.initMenuTree("Projekt", true);
mM4App.showNav();
var url = "/perl/index.pl?sid=" + SID + "&rm=showAuswertung&r=" + Math.random();
mM4App.showAuswertung();
} else {
this.showLoginWindow();
}
//Ext.get('content-iframe').fitToParent();
//Ext.get('content-iframe').setWidth( Ext.get('content-div').getWidth()-5 );
//Ext.get('content-iframe').setHeight( Ext.get('content-div').getHeight()-5 );
},
showUserRegDialog : function() {
if ( !mM4AppUserRegDlg ) {
mM4AppUserRegDlg = new mM4UserRegDialog({
closable: false
});
}
mM4AppUserRegDlg.show( Ext.get('content-div') );
},
getUserRegDialog : function() {
if ( !mM4AppUserRegDlg ) {
mM4AppUserRegDlg = new mM4UserRegDialog({
closable: false
});
}
return mM4AppUserRegDlg;
},
showLoginWindow : function() {
if ( !mM4AppLoginDlg ) {
mM4AppLoginDlg = new mM4LoginDialog({
closable: false
});
}
mM4AppLoginDlg.show( Ext.get('content-div') );
},
getLoginWindow : function() {
if ( !mM4AppLoginDlg ) {
mM4AppLoginDlg = new mM4LoginDialog({
closable: false
});
}
return mM4AppLoginDlg;
},
newProject : function() {
Ext.MessageBox.confirm("Achtung:", "Sind Sie sicher, dass Sie ein neues Projekt beginnen möchten? Alle nicht gespeicherten Daten gehen verloren!", mM4App.checkNewProject);
},
checkNewProject : function( btn ) {
if ( btn == 'yes' ) {
document.location = "/perl/index.pl?sid=" + SID + "&rm=newProject";
}
},
closeProject : function() {
Ext.MessageBox.confirm("Achtung:", "Sind Sie sicher, dass Sie das aktuelle Projekt beenden möchten? Alle nicht gespeicherten Daten gehen verloren!", mM4App.checkCloseProject);
},
checkCloseProject : function( btn ) {
if ( btn == 'yes' ) {
top.location = "/perl/index.pl?sid=" + SID + "&rm=closeProject";
}
},
setContentTitle : function(strTitel){
var thisTitel;
if ( strTitel ) {
if ( AUSWERTUNGNAME && AUSWERTUNGNAME != "" ) {
if ( AUSWERTUNGNAME != strTitel ) {
thisTitel = AUSWERTUNGNAME + " - " + strTitel;
} else {
thisTitel = AUSWERTUNGNAME;
}
} else {
thisTitel = strTitel;
}
} else if ( AUSWERTUNGNAME && AUSWERTUNGNAME != "" ) {
thisTitel = AUSWERTUNGNAME;
}
if ( thisTitel != "" ) {
pageLayout.getRegion('center').getActivePanel().setTitle( thisTitel );
}
},
showEinstiegSelection : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !mM4Chooser ) {
mM4Chooser = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'einstiegSelection'
},
title: "Planungs-Modi",
modal: true,
resizable: false,
closable: true,
width: 490,
height: 320
});
}
mM4Chooser.show( Ext.get('content-div'), config.closable || true );
},
setEinstieg : function( entryType ) {
if ( entryType != "" ) {
mM4Chooser.hide();
if ( entryType == 'GUIDED') {
mM4App.setContentTitle(""GUIDED PLANNING"");
} else {
pageWestLayout.getRegion('center').showPanel('expertNav');
mM4App.curTree = menuTree;
}
mM4App.loadContent({ rm: 'setEinstieg', type: entryType });
}
},
showUniverseSelection : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !universeChooser ) {
universeChooser = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'getUniverses',
uirm: config.rm || 'setUniverse',
guideMode: config.guideMode,
nodeID: config.nodeID,
r: Math.random()
},
title: "Universumsauswahl",
modal: true,
resizable: false,
closable: false,
width: 470,
height: 300
});
}
universeChooser.setUrl( '/perl/index.pl?r=' + Math.random() );
if ( config.guideMode ) {
var tmpNode = guideTree.getNodeById( config.nodeID );
if ( tmpNode.attributes.cls == "checked" ) {
config.rm = "switchUniverse";
}
}
universeChooser.setParams( {
sid: SID,
rm: 'getUniverses',
uirm: config.rm || 'setUniverse',
guideMode: config.guideMode,
nodeID: config.nodeID,
r: Math.random()
} );
universeChooser.show( Ext.get('content-div'), config.closable );
},
setUniverse : function ( id, runmode, guideMode, nodeID ) {
universeChooser.hide();
if ( nodeID ) {
var tmpNode = guideTree.getNodeById( nodeID );
tmpNode.ui.addClass('checked');
tmpNode.ui.removeClass('unchecked');
tmpNode.attributes.cls = "checked";
if ( tmpNode.nextSibling ) {
tmpNode.nextSibling.enable();
} else {
tmpNode.parentNode.nextSibling.firstChild.enable();
}
tmpNode.render();
}
mM4App.loadContent( { rm: runmode, universeID: id, guideMode: guideMode } );
},
showAuswertungsSelection : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !auswertungsChooser ) {
auswertungsChooser = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'auswertungsSelection'
},
title: "Auswertungsauswahl",
modal: true,
resizable: false,
closable: false,
width: 500,
height: 550
});
}
auswertungsChooser.show( Ext.get('content-div'), config.closable );
},
setAuswertung : function ( aid, auswName ) {
auswertungsChooser.hide();
curAuswertungID = aid;
mM4App.showNav();
if ( auswName ) {
AUSWERTUNGNAME = auswName;
mM4App.setContentTitle();
}
mM4App.showQuickInfo( aid, function() {
mM4App.loadContent( { rm: 'setAuswertung', aid: aid, guideMode: false } );
});
},
showSteckbrief : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !steckbriefDlg ) {
steckbriefDlg = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'showSteckbriefDialog'
},
title: "Steckbrief",
modal: true,
resizable: false,
closable: config.closable,
width: 364,
height: 210
});
}
steckbriefDlg.show( Ext.get('content-div'), config.closable );
},
showMAEntry : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !maDlg ) {
maDlg = new mM4maLoginDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'showMALogin'
},
title: "ma Login",
modal: true,
resizable: false,
width: 400,
height: 180
});
}
maDlg.show( Ext.get('content-div'), config.closable );
},
hideMALogin : function() {
if ( maDlg ) {
maDlg.hide();
}
},
showNutzung : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !nutzungDlg ) {
nutzungDlg = new mM4AppNutzungDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'showNutzungDialog'
},
title: "Nutzungsbedingungen",
modal: true,
resizable: false,
width: 400,
height: 210
});
}
nutzungDlg.show( Ext.get('content-div'), config.closable );
},
showAnalysenSelection : function( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config, autoScroll: false};
}
if ( !analysenChooser ) {
analysenChooser = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'analysenGroupSelection',
guideMode: config.guideMode,
nodeID: config.nodeID
},
title: "Studienauswahl",
modal: true,
resizable: false,
closable: config.closable,
autoScroll: false,
width: 615,
height: 420
});
}
analysenChooser.setParams( {
sid: SID,
rm: 'analysenGroupSelection',
guideMode: config.guideMode,
nodeID: config.nodeID
} );
analysenChooser.show( Ext.get('content-div'), config.closable );
},
getAnalysenSelectionDlg : function() {
return analysenChooser;
},
setAnalyse : function( aid, guideMode, nodeID ) {
analysenChooser.hide();
this.pMenuSaveAs.enable();
if ( guideMode && nodeID ) {
var tmpNode = guideTree.getNodeById( nodeID );
tmpNode.ui.addClass('checked');
tmpNode.ui.removeClass('unchecked');
tmpNode.attributes.cls = "checked";
if ( tmpNode.nextSibling ) {
tmpNode.nextSibling.enable();
} else {
tmpNode.parentNode.nextSibling.firstChild.enable();
}
tmpNode.render();
}
mM4App.loadContent( { rm: 'setAnalyse', aid: aid, guideMode: guideMode } );
},
switchWestPanel : function( panelName, refresh ) {
panelName = panelName || 'beginnerNav';
pageWestLayout.getRegion('center').showPanel(panelName);
if ( refresh ) {
mM4App.initGuideTree( refresh );
}
},
showPlanStepChooser : function ( config ) {
config = config || {};
if(typeof config == "string"){
config = {closable: config};
}
if ( !planStepChooser ) {
planStepChooser = new mM4AppSelectionDialog({
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'planugsGruppenSelektion'
},
title: "Planungsschritte wählen",
modal: true,
resizable: false,
closable: false,
width: 405,
height: 350
});
}
planStepChooser.show( Ext.get('content-div'), config.closable );
},
setPlanSteps : function ( grpID ) {
planStepChooser.hide();
mM4App.showNav();
mM4App.curTree = guideTree;
mM4App.btnPrev.show();
mM4App.btnNext.show();
mM4App.btnAuswertung.hide();
mM4App.loadContent({ rm: 'setGuideGroup', grpID: grpID });
},
displayPlanzielSelection : function( guide ) {
if ( !mM4PlanzielSelector ) {
mM4PlanzielSelector = new mM4PlanTargetInput({
modal: true,
resizable: false,
closable: false,
width: 310,
height: 165
});
}
mM4PlanzielSelector.show( Ext.get('content-div'), guide );
},
showPlanzielSelection : function( guide ) {
if ( !mM4PlanzielSelector ) {
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'mM4AppPlanTargetDialog',
r: Math.random()
},
callback: function() {
mM4App.displayPlanzielSelection(guide);
},
scripts: true
});
} else {
mM4App.displayPlanzielSelection(guide);
}
},
showZeitraumSelection : function( guide ) {
if ( !mM4PlanungsSelector ) {
mM4PlanungsSelector = new mM4TimeFrameSelection({
modal: true,
resizable: false,
closable: false,
width: 300,
height: 150
});
}
mM4PlanungsSelector.show( Ext.get('content-div'), guide );
},
showMarkenSelection : function( listID, listTitle, callback ) {
var titleItems = listTitle.split(" ");
mM4App.setContentTitle( titleItems[0] );
mM4App.loadIframe( '/perl/index.pl?sid=' + SID + "&rm=markenSelectionPage&listID=" + listID + "&r=" + Math.random(), false );
},
showSelection : function( listID, listTitle, callback ) {
var titleItems = listTitle.split(" ");
mM4App.setContentTitle( titleItems[0] );
mM4App.loadIframe( '/perl/index.pl?sid=' + SID + "&rm=selectionPage&listID=" + listID + "&r=" + Math.random(), false );
},
showGridTarifSettings : function( listID, flatIndex, einschaltung, callback ) {
var config = {
width: 430,
height: 365,
listID: listID,
flatIndex: flatIndex,
einschaltung: einschaltung,
callback: callback,
el: Ext.get('content-div')
};
if ( !mM4GridTarifSettingsDlg ) {
mM4GridTarifSettingsDlg = new mM4GridTarifSettingsDialog( config );
}
mM4GridTarifSettingsDlg.show( config );
},
showMarketSelection : function( showclosebutton ) {
if ( !mM4MarketSelection ) {
mM4MarketSelection = new mM4StdDialog({
title: "Marktauswahl",
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'getMaerkte'
},
closeButton: showclosebutton,
width: 320,
height: 340
});
}
if (showclosebutton) {
mM4MarketSelection.showCloseButton();
}
mM4MarketSelection.show( Ext.get('content-div') );
},
getMarketSelectionDlg : function() {
return mM4MarketSelection;
},
showSpaltenSelection : function() {
if ( !mM4SpaltenSelection ) {
mM4SpaltenSelection = new mM4StdDialog({
title: "Spaltenauswahl",
url: '/perl/index.pl',
params: {
sid: SID,
rm: 'showSpaltenSelection'
},
closeButton: false,
width: 320,
height: 300
});
}
mM4SpaltenSelection.show( Ext.get('content-div'), this.showAuswertung );
},
getSpaltenSelectionDlg : function() {
return mM4SpaltenSelection;
},
showTarifSettings : function() {
if ( !mM4TarifSettings ) {
mM4TarifSettings = new mM4TarifSettingsDialog({
width: 320,
height: 400
});
}
mM4TarifSettings.show( Ext.get('content-div') );
},
showKontaktEingabe : function() {
if ( !mM4KontaktEingabe ) {
mM4KontaktEingabe = new mM4KontaktEingabeDialog({
width: 320,
height: 370
});
}
mM4KontaktEingabe.show( Ext.get('content-div') );
},
showKontaktEingabeOld : function() {
mM4App.setContentTitle( "KONTAKTEINGABE" );
mM4App.loadIframe( '/perl/index.pl?sid=' + SID + "&rm=kontaktEingabe&r=" + Math.random(), false );
},
showSaveAs : function() {
Ext.MessageBox.show({
title: "Speichern unter ...",
msg: "Bitte geben Sie eine Beschreibung für das Projekt ein.",
width:300,
buttons: Ext.MessageBox.OKCANCEL,
multiline: true,
fn: mM4App.doSaveAs
});
},
checkSave : function() {
Ext.MessageBox.confirm("Achtung:", "Sind Sie sicher, dass Sie das Projekt überschreiben möchten?", mM4App.doSave);
},
doSave : function(btn) {
if ( btn == 'yes' ) {
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'saveProject',
r: Math.random()
},
scripts: true
});
}
},
doSaveAs : function( btn, text ) {
if ( btn == "ok" ) {
if ( text != "" ) {
pMenuSave.enable();
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'saveProjectAs',
fileDesc: text,
r: Math.random()
},
scripts: true
});
} else {
mM4App.msg("Achtung:","Bitte geben Sie eine Beschreibung ein.");
mM4App.showSaveAs();
}
}
},
showPlanEntry : function() {
mM4App.loadIframe( '/perl/index.pl?sid=' + SID + "&rm=planPage&r=" + Math.random(), false );
},
showSessionListDialog : function() {
if ( !sessionListDialog ) {
sessionListDialog = new mM4SessionListDialog({
width: 1010,
height: 600
});
}
sessionListDialog.show( Ext.get('content-div') );
},
showProjectListDialog : function() {
if ( !projectListDialog ) {
projectListDialog = new mM4ProjectListDialog({
width: 600,
height: 400
});
}
projectListDialog.show( Ext.get('content-div') );
},
showPlanEntryALT : function(){
if ( !mM4PlanEntry ) {
mM4PlanEntry = new mM4PlanEntryDialog({
width: 550,
height: 550
});
}
mM4PlanEntry.show( Ext.get('content-div'), this.showAuswertung );
},
msg : function(title, format){
if(!msgCt){
msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
}
msgCt.alignTo(document, 't-t');
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
m.slideIn('t').pause(3).ghost("t", {remove:true});
},
showNav : function(){
pageLayout.getRegion('west').show();
mM4App.btnAuswertung.show();
},
showLoading : function() {
if (!loading) {
loading = Ext.get('loading');
}
if (!loadingMask) {
loadingMask = Ext.get('loading-mask');
}
loading.fadeIn({duration:.9});
loadingMask.fadeIn({duration:1, endOpacity:.6});
},
hideLoading : function() {
if (!loading) {
loading = Ext.get('loading');
}
if (!loadingMask) {
loadingMask = Ext.get('loading-mask');
}
loadingMask.fadeOut({duration:.8,remove:false});
loading.fadeOut({duration:.6,remove:false});
},
setFilter : function(listID, itemID) {
mM4App.loadContent( { rm: 'setCurItem', listID: listID, itemID: itemID } );
},
printAuswertung : function() {
var url = "/perl/index.pl?sid=" + SID + "&rm=showAuswertung&print=1&r=" + Math.random();
window.open(url,"Print","resizable,width=1000,height=650");
},
exportAuswertung : function( rm ) {
var url = "/perl/index.pl?sid=" + SID + "&rm=" + rm + "&r=" + Math.random();
window.open(url,rm,"resizable,width=800,height=600");
},
showHelp : function ( url, parent ) {
if ( !mM4helpDialog ) {
mM4helpDialog = new mM4HelpBrowser({
minWidth: 550,
minHeight: 350
});
}
mM4helpDialog.reset();
if ( url && url != "" ) {
mM4helpDialog.setUrl( url );
}
mM4helpDialog.show( parent || Ext.get('content-div') );
},
showAuswertung : function( aid ) {
var url = '/perl/index.pl?sid=' + SID + "&rm=showAuswertung&r=" + Math.random();
if ( !aid || aid == "" ) {
if ( curAuswertungID ) {
aid = curAuswertungID;
}
}
if ( aid ) {
curAuswertungID = aid;
url += "&aid=" + aid;
}
mM4App.showQuickInfo( aid, function() {
mM4App.loadIframe( url, true );
});
},
loadIframe : function( url, reloadTree, initTree ) {
if ( initTree == true ) {
Ext.get('content-iframe').on("load", initTreeEventFunction);
iFrameHasListener = true;
} else {
if ( reloadTree == true && iFrameHasListener == false ) {
Ext.get('content-iframe').on("load", reloadTreeEventFunction);
iFrameHasListener = true;
} else if ( reloadTree == false && iFrameHasListener == true ) {
Ext.get('content-iframe').un("load", reloadTreeEventFunction);
iFrameHasListener = false;
}
}
Ext.get('content-iframe').dom.src = url;
},
loadContent : function(params, callback) {
if ( !contentPanel ) {
//contentPanel = Ext.get('content-iframe');
contentPanel = Ext.get('scriptContainer');
}
if ( !contentPanelUpdateManager ) {
contentPanelUpdateManager = contentPanel.getUpdateManager();
}
params['sid'] = SID;
contentPanelUpdateManager.update({
url: "/perl/index.pl",
params: params,
scripts: true
}, callback );
},
loadQI : function( params ) {
if ( !quickinfoPanel ) {
quickinfoPanel = Ext.get('qi');
}
if ( !quickinfoPanelUpdateManager ) {
quickinfoPanellUpdateManager = contentPanel.getUpdateManager();
}
params['sid'] = SID;
if ( !params['rm'] ) {
params['rm'] = 'qi';
}
quickinfoPanelUpdateManager.update({
url: "/perl/index.pl",
params: params,
scripts: true
});
},
initTree : function( item1, item2 ){
if ( pageWestLayout.getRegion('center').getActivePanel().getId() == "expertNav" ) {
mM4App.initMenuTree( item1, item2 );
} else {
mM4App.initGuideTree( item1, item2 );
}
},
reloadTree : function(strAtt,strValue){
if ( pageWestLayout.getRegion('center').getActivePanel().getId() == "expertNav" ) {
mM4App.reloadMenuTree(strAtt,strValue);
} else {
mM4App.reloadGuideTree(strAtt,strValue);
}
},
activeGuideNode : function ( guideNodeID ) {
if ( guideNodeID ) {
curGuideNode = guideNodeID;
}
return curGuideNode;
},
checkCurNodeStatus : function( nodeID ) {
nodeID = nodeID || mM4App.activeGuideNode();
Ext.get('scriptContainer').getUpdateManager().update({
url: "/perl/index.pl",
params: {
sid: SID,
rm: 'checkNodeStatus',
nodeID: nodeID
},
callback : function(oElement, bSuccess, oResponse) {
if ( oResponse.status == 200 ) {
var addClass = "checked";
var removeClass = "unchecked";
var tmpNode = guideTree.getNodeById(mM4App.activeGuideNode());
if ( oResponse.responseText == "unchecked" ) {
addClass = "unchecked";
removeClass = "checked";
} else {
if ( tmpNode.nextSibling && tmpNode.nextSibling.disabled && tmpNode.nextSibling.attributes.cls == "unchecked" ) {
tmpNode.nextSibling.enable();
} else {
tmpNode.parentNode.nextSibling.firstChild.enable();
}
}
tmpNode.ui.addClass(addClass);
tmpNode.ui.removeClass(removeClass);
tmpNode.attributes.cls = addClass;
tmpNode.render();
mM4App.guideNextStep();
}
},
scripts: true
});
},
guidePrevStep : function() {
if ( mM4App.activeGuideNode() && mM4App.activeGuideNode() != "" ) {
var tmpNode = guideTree.getNodeById(mM4App.activeGuideNode());
if ( tmpNode.previousSibling ) {
if ( tmpNode.previousSibling.isLeaf() ) {
mM4App.activeGuideNode( tmpNode.previousSibling.id );
eval( tmpNode.previousSibling.attributes.jsFunction );
} else {
mM4App.activeGuideNode( tmpNode.previousSibling.firstChild.id );
eval( tmpNode.previousSibling.firstChild.attributes.jsFunction );
}
} else if ( tmpNode.parentNode.previousSibling ) {
tmpNode.parentNode.previousSibling.lastChild.enable();
mM4App.activeGuideNode( tmpNode.parentNode.previousSibling.lastChild.id );
eval( tmpNode.parentNode.previousSibling.lastChild.attributes.jsFunction );
}
}
},
disableBtnNext : function( node ) {
var tmpRootNode = guideTree.getRootNode();
var lChild = tmpRootNode.lastChild;
var llChild = lChild.lastChild;
if ( llChild.id == node.id ) {
mM4App.btnNext.disable();
} else if ( llChild.id == node.parentNode.id ) {
mM4App.btnNext.disable();
}
},
getNextNode : function( node ) {
var nextNode = node.nextSibling;
if ( !nextNode || nextNode == "" ) {
nextNode = node.parentNode.nextSibling.firstChild;
} else if ( nextNode.firstChild ) {
nextNode = nextNode.firstChild;
}
if ( nextNode.attributes.cls == 'checked' || ( nextNode.attributes.optional == true && guideOptNodesSeen[nextNode.id] ) ) {
nextNode = mM4App.getNextNode(nextNode);
}
return nextNode;
},
guideNextStep : function() {
var ns = false;
if ( mM4App.activeGuideNode() && mM4App.activeGuideNode() != "" ) {
var curNode = guideTree.getNodeById(mM4App.activeGuideNode());
if ( curNode.attributes.cls == 'unchecked' && curNode.disabled == false && curNode.attributes.optional != true ) {
if ( curNode.attributes.emptyMsg != "" ) {
mM4App.msg("Achtung:", curNode.attributes.emptyMsg);
return;
}
} else {
ns = mM4App.getNextNode( curNode );
if (ns.attributes.hideBtnNext == 1) {
mM4App.disableBtnNext(ns);
}
mM4App.activeGuideNode( ns.id );
if ( ns.attributes.optional == true ) {
guideOptNodesSeen[ns.id] = true;
}
eval( ns.attributes.jsFunction );
}
}
},
initGuideTree : function( refresh, node ) {
if ( !guideTree ) {
guideTree = new Ext.tree.TreePanel('beginnerNav', {
animate: true,
loader: new Ext.tree.TreeLoader({dataUrl: '/perl/index.pl', baseParams: { sid: SID, rm: 'getGuideTreeNodes'}}),
enableDD: false,
containerScroll: true,
lines: false,
rootVisible: false
});
guideTreeRoot = new Ext.tree.AsyncTreeNode({
text: "Geführter Planungsprozess",
draggable: false,
id: '0'
});
guideTree.on('click', function(n){
if( n.isLeaf() && n.attributes.jsFunction != "" && n.disabled != true ) {
eval( n.attributes.jsFunction );
}
});
guideTree.setRootNode(guideTreeRoot);
guideTree.render();
guideTree.expandAll();
}
if ( refresh ) {
guideTreeRoot.reload();
guideTree.expandAll();
}
},
reloadGuideTree : function(strAtt,strValue){
if ( strAtt && strValue != "" ) {
guideTreeRoot.findChild( strAtt, strValue ).reload( callback() );
} else {
guideTreeRoot.reload();
guideTree.expandAll();
}
},
showQuickInfo : function( infoID, callback ) {
pageWestLayout.getRegion('south').getActivePanel().load( { url: "/perl/index.pl", params: { sid: SID, rm: 'showQI', infoID: infoID, r: Math.random() }, callback: callback, scripts: true } );
},
initMenuTree : function( analysenName, refresh ) {
if ( !menuTree ) {
menuTree = new Ext.tree.TreePanel('expertNav', {
animate: true,
loader: new Ext.tree.TreeLoader({dataUrl: '/perl/index.pl', baseParams: { sid: SID, rm: 'getMenuTreeNode'}}),
enableDD: false,
containerScroll: true
});
menuTreeRoot = new Ext.tree.AsyncTreeNode({
text: analysenName,
draggable: false,
id: 'start'
});
menuTree.on('click', function(n){
if(n.isLeaf()){
if (n.parentNode.id != 'planEntry') {
mM4App.btnAuswertung.show();
mM4App.btnPlanEntry.hide();
}
if ( n.id == "addAuswertung" ) {
if ( n.disabled == false ) {
mM4App.showAuswertungsSelection( {closable: true} );
} else {
mM4App.msg("Achtung:", "Es stehen keine weiteren Auswertungen zur Verfügung.");
}
}
else if ( n.id == "analyse" ) {
mM4App.showSteckbrief({closable: true});
}
else if ( n.id == "universe" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showUniverseSelection( { closable: true, rm: 'switchUniverse' } );
});
}
else if ( n.id == "plantarget" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showPlanzielSelection( false );
});
}
else if ( n.id == "timeframe" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showZeitraumSelection();
});
}
else if ( n.id == "tarif" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showTarifSettings();
});
}
else if ( n.id == "market" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showMarketSelection(true);
});
}
else if ( n.id == "spalten" ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showSpaltenSelection();
});
}
else if ( n.parentNode.id == "auswertungen" || n.parentNode.id == "MPA" ) {
mM4App.setContentTitle( n.text );
tmpCurNodeID = n.id;
mM4App.showQuickInfo( n.id, function() {
mM4App.showAuswertung( n.id );
});
}
else if ( n.parentNode.id == "inputs" && n.id > 2000000 ) {
mM4App.showKontaktEingabe();
}
else if ( n.parentNode.id == "inputs" && ( n.id == 7 || n.id == 8 ) ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showMarkenSelection( n.id, n.text );
});
// mM4App.showQuickInfo( n.id, mM4App.showMarkenSelection( n.id, n.text ) );
}
else if ( (n.parentNode.id == "inputs" && n.id != 'planEntry') || (n.parentNode.id == 'planEntry') ) {
mM4App.showQuickInfo( n.id, function() {
mM4App.showSelection( n.id, n.text );
});
if (n.parentNode.id == 'planEntry') {
mM4App.btnAuswertung.hide();
mM4App.btnPlanEntry.show();
}
}
}
else if (n.parentNode.id == "inputs" && n.id == 'planEntry') {
mM4App.showPlanEntry();
}
});
menuTree.setRootNode(menuTreeRoot);
menuTree.render();
menuTreeRoot.expand();
}
if ( refresh ) {
menuTreeRoot.reload();
}
},
reloadMenuTree : function(strAtt,strValue){
if ( strAtt && strValue != "" ) {
menuTreeRoot.findChild( strAtt, strValue ).reload();
} else {
menuTreeRoot.reload();
}
},
setCurTree : function ( treeRef ) {
mM4App.curTree = treeRef;
},
reloadCurTree : function(strAtt,strValue) {
if ( strAtt && strValue != "" ) {
mM4App.curTree.getRootNode.findChild( strAtt, strValue ).reload();
} else {
mM4App.curTree.getRootNode.reload();
}
},
getPlanEntry : function() {
return mM4PlanEntry;
}
}
}();
Ext.onReady(mM4App.init, mM4App, true);