Page 1 of 4

Grouping

PostPosted: 08 Nov 2013 11:37
by George
Hi!
Can i create group in "TIWCGJQFancyBox" if i have only direct URLs to pictures?

At this moment, i created hidden TIWCGJQImage's, added it to FancyBox controls and calls "FancyBox.JQFancyBoxOptions.Show();"
Only problem, that i need to refresh page to update FancyBox in browser because AjaxReRender didn't helps and i can't see any another usable method.

Re: Grouping

PostPosted: 11 Nov 2013 07:48
by George
There is no ajax items update procedure.
Can you add such method?

Re: Grouping

PostPosted: 11 Nov 2013 11:02
by Alexander Bulei
Hi George,

George wrote:Hi!
Can i create group in "TIWCGJQFancyBox" if i have only direct URLs to pictures?

At this moment, i created hidden TIWCGJQImage's, added it to FancyBox controls and calls "FancyBox.JQFancyBoxOptions.Show();"
Only problem, that i need to refresh page to update FancyBox in browser because AjaxReRender didn't helps and i can't see any another usable method.



Sorry for delay in the reply.
At this moment, it's impossible do that.
I will check/add this functionality asap.

Best Regards.

Re: Grouping

PostPosted: 11 Nov 2013 12:21
by Alexander Bulei
Hi George,

Added new property ImageGallery in V1.8.0.3135:

delphi code
{$IFDEF NODEF}{$REGION 'CGDevTools - Documentation'}{$ENDIF}
/// <summary>
/// Use this list for the galleries with images. The component
/// will automatically create all necessary html elements.
/// <note type="note">
/// You cannot use ImageGallery and ControlList properties
/// together.
/// </note>
/// <note type="note">
/// You don't need set the <see cref="IsGroup" /> property to
/// True.
/// </note>
/// </summary>
{$IFDEF NODEF}{$ENDREGION}{$ENDIF}
property ImageGallery;


Best Regards.

Re: Grouping

PostPosted: 11 Nov 2013 12:34
by George
I will wait new update :)
Thanks!

Is this property ajax enabled?

Re: Grouping

PostPosted: 11 Nov 2013 15:10
by Alexander Bulei
Hi George,

George wrote:I will wait new update :)
Thanks!

Is this property ajax enabled?


No, you should use AjaxReRender.

Best Regards.

Re: Grouping

PostPosted: 12 Nov 2013 11:20
by George
Hello!

Strange, i can't use this new feature.
delphi code
procedure TFrameFileUpload.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
var
igi: TIWCGJQFancyBoxImageGalleryItem;
begin
igi := IWCGJQFancyBox1.ImageGallery.Add;
igi.Picture.Url := 'http://www.cgdevtools.com/wp-content/uploads/2012/05/logo_cgdevtools.png';
igi.Alt := 'test';
IWCGJQFancyBox1.AjaxReRender();
IWCGJQFancyBox1.JQFancyBoxOptions.Show();
end;


Result: nothing happens or JS error (if button clicked after F5):

Code: Select all
Url : http://127.0.0.1:10700/jq/FancyBox/jquery.fancybox-1.3.4.js?v=1.8.0.3140
Line : 324
Message : Uncaught TypeError: Object # has no method 'onCleanup'

Re: Grouping

PostPosted: 12 Nov 2013 12:26
by Alexander Bulei
Hi George,

George wrote:Hello!

Strange, i can't use this new feature.
delphi code
procedure TFrameFileUpload.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
var
igi: TIWCGJQFancyBoxImageGalleryItem;
begin
igi := IWCGJQFancyBox1.ImageGallery.Add;
igi.Picture.Url := 'http://www.cgdevtools.com/wp-content/uploads/2012/05/logo_cgdevtools.png';
igi.Alt := 'test';
IWCGJQFancyBox1.AjaxReRender();
IWCGJQFancyBox1.JQFancyBoxOptions.Show();
end;


Result: nothing happens or JS error (if button clicked after F5):

Code: Select all
Url : http://127.0.0.1:10700/jq/FancyBox/jquery.fancybox-1.3.4.js?v=1.8.0.3140
Line : 324
Message : Uncaught TypeError: Object # has no method 'onCleanup'


Thanks for reporting,
Removed unnecessary / invalid validation at rendering...

P.S: If you want test, add new empty item at ControlList.

Best Regards.

Re: Grouping

PostPosted: 12 Nov 2013 14:27
by George
P.S: If you want test, add new empty item at ControlList.

Done.

delphi code
IWCGJQFancyBox1.AjaxReRender();
Not sends new gallery items. Only after full refresh (or frame region AjaxReRender) new collection items become available.

Re: Grouping

PostPosted: 12 Nov 2013 15:09
by Alexander Bulei
George wrote:
P.S: If you want test, add new empty item at ControlList.

Done.

delphi code
IWCGJQFancyBox1.AjaxReRender();
Not sends new gallery items. Only after full refresh (or frame region AjaxReRender) new collection items become available.


I think, you must wait for new build...sorry.

Best Regards.