Share » Forums » Developer » [eZjaxx] Ajax Admin extension discussion

[eZjaxx] Ajax Admin extension discussion

[eZjaxx] Ajax Admin extension discussion

Monday 09 October 2006 8:53:01 am - 81 replies

Modified on Tuesday 23 June 2009 1:49:19 am by André R.

Author Message

André R.

Tuesday 06 February 2007 1:18:49 am

This is unnecessary as of 0.95 since it does not override paglayout.tpl, just remember to make a clean install of the extension.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Brendan Pike

Tuesday 06 March 2007 5:03:01 pm

Hello

I found a problem with eZjaxx when it runs under SSLZones. Initially I reported a bug here http://issues.ez.no/IssueView.php?Id=10274 that effected ezdhtml and ezjaxx, Ruslan suggested adding the following to ezjaxx's site.ini.

[SSLZoneSettings]
ModuleViewAccessMode[ezjaxx/*]=keep

A similar entry in worked for ezdhtml but not for ezjaxx. I would appreciate some help getting this extension to work under SSLZones please.

Thanks

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

André R.

Wednesday 07 March 2007 12:29:55 am

Could you try changing ezjaxx with jaxx ?
The modul name is jaxx, so try this:

[SSLZoneSettings]
ModuleViewAccessMode[jaxx/*]=keep

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Brendan Pike

Wednesday 07 March 2007 4:07:13 am

Spot on André

Thanks for the tip :-)

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Guillaume Kempfer

Tuesday 20 March 2007 2:02:34 am

Hi,

i get an error when trying to dropdown the menu it reload the page and firebug display this error :

$ is not defined at this line :
var menuAjaxRoot = "/limmobilier-en-provence.com/httpdocs/index.php/limmobilier_useradmin/jaxx/expand/navigation/269", menuRoot = $('content_tree_menu')[0];

I cleared the cache after ezjaxx install.
My ezp version is 3.9.1 on OSX 10.4.8 and i'm using firefox 2.0.0.2 as browser

----------------------

I find the error it was a reinitialisation of JavascriptList in my siteaccess
JavascriptList[]=

Kristof Coomans

Tuesday 03 April 2007 11:04:11 pm

Hi André

Is modules/jaxx/classattributemove.php actually used somewhere? I couldn't find back a call to it.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

André R.

Wednesday 04 April 2007 5:38:24 am

No it's not used.
I was about to make a version of it back in November, but then I stopped because of the changes going into 3.9.
It shold never have been added to svn, since it also lacks copyright code that mentions that it is based on your code!

Have a nice Easter Kristof!

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Frode Austvik

Monday 21 May 2007 8:08:06 am

Hi,

Just figured you'd want to know about this:
XDebug shows me a warning from expand.php line 130;

class_exists( eZContentLanguage )

should be

class_exists( 'eZContentLanguage' )

(notice the quotes).

This shows up in the browser as a big orange-titled error box inside every opened subfolder of the content tree (other than those already open on page reload). Only when XDebug is enabled, mind, so it only shows up on development servers.

André R.

Tuesday 22 May 2007 5:26:33 am

Hi, discovered that I was missing some translations now.
So if anyone can translate the following to their language, that would be nice:

String (context)
-------------------------------------------
Please wait... (while waiting for something to load by ajax call )
Copy here ( Possibility to copy the selected node to same parent node )
Quick search ( Label for right menu ajax search )

http://svn.ez.no/svn/extensions/ezjaxx/extension/ezjaxx/translations/

PS: Thanks Frode, I have commited the fix!

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Frode Austvik

Friday 25 May 2007 1:50:01 am

You're welcome. :)

XDebug found me another issue, this time in modules/jaxx/classattribute.php, line 47 - use of an unset variable. Looking at it, it seems the actual problem is that the variable name doesn't match the one used on line 45.

Line 45-47 is this:

$accessRsult = $user->hasAccessTo( 'class', 'edit' );

if ( $result['accessWord'] == 'no' )

Two issues here, one is a typo and the other mismatched variable names.

Kristof Coomans

Friday 25 May 2007 1:54:29 am

Hi Frode

Probably my fault :-) It was fixed in xajax_classattributes though :-D

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

André R.

Friday 25 May 2007 4:06:08 am

Seems like I have to start to use xdebug:)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Frode Austvik

Thursday 14 June 2007 8:18:26 am

Hi,

I added a new feature to the ajax tree menu that I needed, that I thought you might want too?

Basically, it adds a new expand type, which simply calls another module view and lets it take care of passing xhtml back to the client.
Which module and view to run is configured in the .ini file.

This lets people use PHP code to modify the tree behaviour instead of having to use the template, without having to modify the eZjaxx extension itself.

I wasn't sure where to put the patches (I modified both expand.php and jaxx.ini.append.php), should I simply post them here, in code tags? Or mail them somewhere?

André R.

Thursday 14 June 2007 8:27:51 am

ar [add at] ez [add dot] no

But I'm not sure what you need this for, ezjaxx has used no template mode ( pure php ) as default mode for quite some time now.
But I'll look into it of course :)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Frode Austvik

Thursday 14 June 2007 9:37:27 am

Patches sent.

In short, what I need it for is that I have to filter the tree not based on class, but on whether or not it contains another object with a given attribute value... Basically, project-specific modifications to which objects are displayed(and possibly how).

I could probably just make a custom version of expand.php, or modify the javascript to call my own module, but would prefer something cleaner, like I think this is. With this in, no (further) changes to ezjaxx is necessary, so e.g. upgrades would be easier.

Frode Austvik

Wednesday 20 June 2007 5:44:24 am

Patches withdrawn. I didn't realize that basically the exact same functionality, without the indirection layer, could be achieved simply by overriding the content_structure_menu.tpl file and putting in a new root path. Many thanks to André for showing me my ignorance.

Basically, what I've been using eZjaxx for, is a tree menu for the admin side of a (fairly large) product database implemented with eZ objects. These products are sorted into groups by type of product, and contain an attribute for which brand the product has.

The client wants that tree to be filterable by brand, so that only those products (and groups with products) with the given brand are shown in the tree. (Easier said than done, but I've managed.)

A rudimentary version was implemented using the template expand method and heavily modding the templates, but this was slow and not very good, nor easy to work with.
So I translated the code into PHP, and optimized it quite a bit, using custom SQL and other tricks, eventually enough to make it usable (as in not too slow - at one point I had a (technically working) SQL statement that took ~2.5 secs to execute, to return <10 rows).

What I wanted the patches for was to call this module view instead of jaxx/expand... I didn't at the time realize I could do this easily, as mentioned above; I thought the path was hardcoded in a .js file or something like that. So I implemented an indirection layer in expand.php... I know better now. Again, my thanks to André.

Jérôme Vieilledent

Friday 31 August 2007 3:32:17 am

Hello,

I have a javascript error using this great extension... When I have a node with a quote (<b>'</b>), it is not escaped and so it makes an error because parameters in the <i>ezpopmenu_showTopLevel</i>, the quotes doesn't seem to be escaped.
I took a look in the templates but I couldn't manage to fix the bug (I can't find the template used :-/)

Can you please help me ?

Thanks

André R.

Friday 31 August 2007 3:59:40 am

Is this in the preloaded part of the menu or the ajax expanded one ?
I guess it's in the expanded part since it's not escaped, so here is a possible fix:

In expand.php, change this line:

        $itemName = $item['name'];

to this:

        $itemName = htmlspecialchars( substr($item['name'], 0, 18) );

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jérôme Vieilledent

Friday 31 August 2007 5:29:26 am

Hello,

No it's in the Ajax menu. I tried your change but it didn't fix it :-(.
Another bug : When you expand the first folder below the root node, you have the "Please wait" message internationalized (in french for me). But if you try to expand a sub-children, the message is not internationalized (and for information, my first problem is from one of these sub-children nodes).
And I don't if it's important, but of course it deals with custom classes I made appear in the menu.

Thanks for your help :-)

André R.

Friday 31 August 2007 5:58:46 am

Ok, overlooked a small thing so should work now in version 1.1.0.
If want to patch your self, this should fix your javascript menu problem

$itemName = str_replace( array( "\\", "\"", "'"), array( "\\\\", "\\042", "\\047" ) , substr($item['name'], 0, 18) )

I have also fixed the translation of 'Please wait..' in 1.1.0.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu