• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] parent.showHelp

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] parent.showHelp

    I am currently live with Valence 2.2. I am testing my application with Valence 3.0. We added help files for all of our options under 2.2. The viewing of these help files do not work in 3.0.

    Here is our code for the help files.

    Code:
                        tbar: [{
                            text: 'Save',
                            iconCls: 'save',
                            handler: function(){
                                fnAddRecord(true);
                            }
                        }, {
                            xtype: 'tbfill'
                        }, {
                            text: vlit.help,
                            tooltip: vlit.help,
                            iconCls: 'help',
                            handler: function(){
                                parent.showHelp('/Help/apmexpacthelp.html');
                            }
                        }],
    Here is the error in Firebug.

    Code:
    parent.showHelp is not a function
    	
    
    parent.showHelp('/Help/apmexpacthelp.html');
    How do we fix this?

  • #2
    parent.showHelp([url]) was used in Valence 2.2 and not Valence 3.x but here is the code that it used:

    You could add this to your apps if they are still using Ext JS 3.4 but if you are using new apps or you want to add this on the portal level, see below.
    Code:
    	// help window
    	window.showHelp = function(autoLoad) {
    		var winHelp = new Ext.Window({
    			autoLoad: autoLoad,
    			autoScroll: true,
    			region: 'center',
    			closable: true,
    			draggable: true,
    			title: Valence.lang.lit.valenceContextHelp,
    			modal: false,
    			layout:'fit',
    			width:700,
    			height:450,
    			resizable: true,
    			closeAction:'close',
    			plain: false
    		});
    		winHelp.show();
    	};

    For 4:

    Code:
    	// help window
    	window.showHelp = function(urlToLoad) {
    		Ext.create(Ext.window.Window, {
    			loader: {
                              url: urlToLoad,
                              autoLoad: true
                            },
    			autoScroll: true,
    			region: 'center',
    			closable: true,
    			draggable: true,
    			title: 'Help',
    			modal: false,
    			layout:'fit',
    			width:700,
    			height:450,
    			resizable: true,
    			closeAction:'close',
    			plain: false
    		}).show();
    	};

    Comment


    • #3
      I created a ".js" file with the EXTJS 3 code you included above. I made a change to the Title property. I ten included this ".js" wherever my help was used and changed parent.showHelp to window.showHelp and it works perfectly.

      I also created an EXTJS 4 version of the this with the code you provided so that when we do out first EXTJS 4 app the help should just work. Thanks for your help.

      Comment

      Working...
      X