sidebar width too short to display datetimepicker - isis

How can i solve this situation?

Assuming you are using Apache Isis 1.17.0, take a look at
wicket/wicket/resource/org.apache.isis.viewer.wicket.ui.pages.SidebarCssResourceReference/simple-sidebar-ver-1582544091730.css
and try to modify values for padding / margin. Eventually you need to override settings in application.css; sometimes you may need to use '!important'
If you are using Chrome, press <Ctrl>-<Shift>-C and select the date-time widget.
If you can provide sample code, I could take a closer look.

Related

wxGrid - RefreshBlock Undocumented Member Function

In order to refresh a part of the grid, i.e., when font or alignment changes, I was using the following approach:
wxRect rect1=CellToRect(TopLeft);
wxRect rect2=CellToRect(BottomRight);
wxRect r(rect1.GetTopLeft(), rect2.GetBottomRight());
RefreshRect(r);
This was refreshing only a part of the intended block and was not working correctly.
From the suggestions of intellisense I came across RefreshBlock function and it works correctly. I searched the docs and have not found any information on it. I wonder if it is not recommended to use RefreshBlock for some reason? What does RefreshBlock do, does it refresh a block (as the name suggests) or is it equivalent to Refresh?
I am using wxWidgets 3.2 on Win10.
Thanks in advance.
The function RefreshBlock() is indeed the best way to do what you want and it was only undocumented by mistake, i.e. we simply forgot to do it. I've added documentation for it only now, so it will only get included in 3.2.1, but you can still use it in your code, the function itself is available since 3.1.3.
It seems from the source code that, depending on the location of its parameters, RefreshBlock refreshes any of the following:
corner grid
frozen cols grid
frozen rows grid
main grid
Since the area I wanted to refresh was on the main grid the following approach works (the idea is similar to RefreshBlock's approach):
auto GridWnd = CellToGridWindow(TL);
wxRect rect = BlockToDeviceRect(TL, BR, GridWnd);
GetGridWindow()->RefreshRect(rect);
Now everything is refreshed correctly.
Notes:
If only RefreshRect(rect) is called, things will NOT work as expected.
Little experiment showed that BlockToDeviceRect(TL, BR) also works, therefore eliminating the need for auto GridWnd = CellToGridWindow(TL);

CreateJs Range slider function

Trying to create a range slider
similar to:
http://foundation.zurb.com/docs/components/range_slider.html
it has to follow the mouse, so no onclick
and needs to output values between 0 (left side)
to 100 (right side) does anyone know the best way to go about this?
thanks
The EaselJS download actually includes a simple slider that is used by some of the examples. You could likely use that as a starting point and build on top of it.
https://github.com/CreateJS/EaselJS/blob/master/_assets/js/Slider.js
The Transform.html and Filters_input.html samples in the examples directory use it if you'd like to see it in action.
http://www.createjs.com/demos/easeljs/transform

Imageresizer bgcolor transparancy

I am currently using ImageResizer from Imazen (http://imageresizing.net/)
I want to create images with the same dimensions which is easily achieved by adding the
www.example.com/example.png?w=150&h=150
however i want to give a bgcolor to the image for background/whitespace color.
again www.example.com/example.png?w=150&h=150&bgcolor=FF00FF works perfectly.
However is there a way to make this bgcolor transparant? (ofcourse only for .png's)
I read the docs and couldn't find a plugin or basic functionality that could provide this feature. Does anyone know if (or how) this can be achieved?
Use a 6-digit hex value (RRGGBBAA) to include an alpha/transparency component.

Gridster add_widget is slow

I want use Gridster for my web site, but i need to add lot of widgets with "add_widget" command. I do a test and i think there is a problem with "add_widget" function : grid is more and more slow and there are memory leak.
You can see that in this video : grister problem video
However, as you can see on the video, if i add widget at beginning (not with add_widget function) there is no problem. Can you help me ? Something wrong with my code ?
Thanks in advance !
In my own experience, the main culprit was using the autogenerate_stylesheet setting. The problem is that it regenerates the css on every call to add_widget(), and this just absolutely kills browsers. Additionally, gridster has/had a bug where stylesheets get duplicated, filling the <head> with tons of duplicate style rules, making it tough on the browser(this bug was supposedly fixed, but my experience was that the fix only worked in specific scenarios, definitely not in mine).
When I used gridster, my widgets were always the same size. So, in my case, I was able to generate the stylesheet once, never needing to regenerate it.
I don't think its part of the public api, but you can just call generate_stylesheet() method once manually.
var gridster = $(".gridster ul").gridster({
autogenerate_stylesheet: false,
widget_base_dimensions: [140, 140],
//other options...
}).data('gridster');
gridster.generate_stylesheet({rows: 30; cols: 8});
//freely call gridster.add_widget(...); as many times as you like
Since you're only going to generate the stylesheet once, you need to make sure gridster will generate style rules for enough rows and columns to accommodate all your widgets, otherwise once you exceed the range, you'll experience broken layouts. Just supply an upper bound on rows and cols when calling generate_stylesheet(opts). If you don't, it seems like it defaults to whatever value your gridster instance is using for max_rows and max_cols.
The nice thing is by manually generating the stylesheet, is that you completely avoid the duplicate style bug too.
The exponential slowdown will be gone. Happy gridstering.
I know I'm a bit late on this but I had the same problem and none of the above solutions worked.
However, I found that I was generating the size and coordinates of the widgets as a string rather than an integer on the back-end.
By making sure they were integers I managed to speed things up loads.
The best way to fix it, is not to disable the autogenerated stylesheet, but to edit the fn.generate_stylesheet function in jquery.gridster.js
At the end of the function, just before these lines:
return this.add_style_tag(styles);
};
add this line:
this.remove_style_tags();
The final result would look like this:
this.remove_style_tags();
return this.add_style_tag(styles);
};
With this, each time a stylesheet is generated, the previous one is removed, so there no duplication problem!

Vaadin - how to set max size for a dynamically growing panel?

The problem is the folowing:
I have to create a panel in Vaadin that has undefined heigth, but there is also a constraint that it should expand only til it reaches a maximum size (heigth).
Does anyone know a solution for this?
It is not yet implemented yet as a built-in feature in Vaadin, see:
http://dev.vaadin.com/ticket/6137
What can be done instead?
The only approach I can think of that may be worth trying - and I've no idea if it'll work - is to try and use a containing CSSLayout, and use max-height: in the CSS to create a maximum size for the panel.