eZ Community » Forums » Extensions » The reordering of the blocks doesn't...
expandshrink

The reordering of the blocks doesn't work fine by "drag and drop" - eZ FLow (2.3.0)

The reordering of the blocks doesn't work fine by "drag and drop" - eZ FLow (2.3.0)

Monday 16 May 2011 1:34:19 pm

I can't change the order of the blocks in an attribute of the type "layout" (if you do it with the arrows works fine).

In the console appear this message: "regular expression too complex" (./extension/ezflow/design/standard/javascript/blocktools.js line 396)

The code is this:

if( name.match(/([\a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/|>) ) {
 name = name.replace( /([\a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/|>, "$1_$2[$3][" + index + "]" );
} else if ( name.match(/([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/|>) ) {
 name = name.replace( /([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/|>, "$1[$2-" + index + "$4]" );
} else if ( name.match(/([\a-zA-Z]+)+\_+([0-9])/|>) ) {
 name = name.replace( /([\a-zA-Z]+)+\_+([0-9])/|>, "$1_" + index );
}

I changed it for this and it works fine (but I'm not sure if it's all ok):
Maybe it's yet fixed like in:

if( name.match(/([a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/|>) ) {
 name = name.replace( /([a-z]+)+_([\d]+)\[([\d]+)\]\[([\d]+)\]/|>, "$1_$2[$3][" + index + "]" );
} else if ( name.match(/([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/|>) ) {
 name = name.replace( /([a-zA-Z+]+)\[([\d-\w_]+)-([\d]+)+(-[\w_]+)?\]/|>, "$1[$2-" + index + "$4]" );
} else if ( name.match(/([a-zA-Z]+)+\_+([0-9])/|>) ) {
 name = name.replace( /([a-zA-Z]+)+\_+([0-9])/|>, "$1_" + index );
}

http://share.ez.no/forums/extensi...erule-on-install-file-ezjscore-1.3.0

Related: http://issues.ez.no/IssueView.php?Id=18247&activeItem=87

Edit:  This bug is fixed on newest versions of eZ Flow.

Modified on Wednesday 13 March 2013 12:43:11 pm by Israel Martín

No reply yet!

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from