PS1
-
Posts
95 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by PS1
-
-
Now it works !
Thank you very much ❤️
- 1
-
Thanks for the response, but the last part :
.customCh.x-big .x-checkboxfield .x-icon-el { width: 60px; height: 60px; }
Does not seem to have any effect
-
On 11/4/2022 at 5:33 PM, Sherzod said:
One possible solution:
function window.beforeclose(panel, eOpts) { if (!panel.isClosable) { panel.animate({ duration: 1000, to: { opacity: 0 }, listeners: { afteranimate: function() { panel.isClosable = true; panel.close() } } }); } return (panel.isClosable == true) }
Can you please provide mobile version too?
-
Any update on this ?
I need a global option for changing text in the mask too.
-
Any progress ?
-
I can't, i need to make it universal so all forms could use it and i want to change code of it in runtime.
Or maybe is it possible to run procedure(written in delphi) from javascript in ClientEvents, without using onAjaxEvent ?
i need to call refresh function from it.
-
Bingo !
Now it works, Thanks a lot !!
But i have another problem i want to assign OnAjaxEvent to the _panel. But i don't want create this function in a class. I want to create it in another unit as simple procedure without any class.
some thing like this:
procedure CreateRefreshFunc(var _panel : TUnimPanel);
varprocedure Panel_AjaxEvent(Sender: TComponent;
EventName: string; Params: TUniStrings);
begin
//some code
end;begin
_panel.OnAjaxEvent := Panel_AjaxEvent;
end;but i got error : Incompatible types: 'method pointer and regular proedure'
in normal event like onClick (which has only 1 parameter(sender:TObject)) i could use:
var
ANotifyEvent : procedure of object;
procedure Panel_OnClick(ASelf: TObject; Sender: TObject);
begin
//some code
end;begin
TMethod(ANotifyEvent).Code := @OnClick;
TMethod(ANotifyEvent).Data := Pointer(_panel);
_panel.OnClick := ANotifyEvent;end;
-
To create part of ,,Refresh page" functionality in mobile pages(but i refresh only datasets) :
In quick words i create bunch of listeners to get tap movement and show label(with is spinner icon). if user will swipe some distance i refresh page and hide this label.
,,Painted" function used instead of create in below code doesn't execute.
_panel.ClientEvents.UniEvents.Values['afterCreate'] :=
'function afterCreate(sender)'
+'{'
+' '
+' let clientY;'
+' let start_top;'
+' let new_top;'
+' let can_start = true;'
+' let is_at_top = true;'
+' let curr_touch_move;'
+' let label = '+_panel.Owner.Name+'.Labeltest;'
+' function sleep (time) {'
+' return new Promise((resolve) => setTimeout(resolve, time));'
+' }; '
+' '
+' let scroller = sender.getScrollable();'
+' if (scroller) {'
+' scroller.on(''scroll'', function(a, b, c) {'
+' if (c == 0) { is_at_top = true;console.log("is_at_top");}'
+' else { is_at_top = false }'
+' })'
+' };'
+' '
+' sender.el.addListener(''touchstart'', function(e) {'
+' if (is_at_top) {'
+' can_start = true;'
+' start_top = sender.el.getTop();'
+' clientY = e.touches[0].pageY;'
+' label.setTop(-60);'
+' } else {'
+' can_start = false;'
+' }'
+' }); '
+' '
+' sender.el.addListener(''touchmove'', function(e) {'
+' curr_touch_move = e.touches[0].pageY - clientY; '
+' if ((can_start) && (curr_touch_move > 0)) {'
+' '
+' new_top = start_top+curr_touch_move; '
+' '
+' if ( label.getTop() < 50 ) {'
+' label.setTop(-60 + curr_touch_move/1.5); '
+' }'
+' }; '
+' });'
+' '
+' sender.el.addListener(''touchend'', function(e) {'
+' if ( label.getTop() >= 50 ) {'
+' '
+' sleep(300).then(() => {'
+' ajaxRequest(sender, "Refresh", []);'
+' can_start = true;'
+' }); '
+' '
+' } else {'
+' label.setTop(-60);'
+' }'+' }); '
+'}'; -
-
Hey @Sherzod
I have a similar problem. The differences are that i use component created dynamically in clientEvents of another component :
var
xLabel : TUnimLabel;
beginxLabel := TUnimLabel.Create(Form);
xLabel.Parent := _panel;
xLabel.Caption := 'TTTTTTTTTTTTTTTTTTTT';
xLabel.LayoutConfig.Margin := '100 0 0 0';
xLabel.Left := 0;
xLabel.top := 30;
xLabel.Visible := True;
xLabel.Name := 'Labeltest';//+inttostr(DateTimeToUnix(now));_panel.ClientEvents.UniEvents.Values['afterCreate'] :=
'function afterCreate(sender)'
+'{'
+' FormName.Labeltest.getTop();' <<------------ error here
+'}';In getTop() line i get : Cannot read properties of undefined (reading 'getTop');
if i add this label in design then it works.
Can you help me ?
I'm using: uniGUI Complete -Professional Edition Build 1.90.0.1568
-
Hey @Sherzod, Sorry for my late response. Forgot to enable notification for this topic.
Testcase is in attachment.
CSS part is added in ServerModule->customCSS.
-
Hey @Sherzod i am also looking for the answer. I found global solution for all checkboxes by css:
.x-checkboxfield .x-icon-el:before {
font-size: 50px
}.x-big .x-checkboxfield .x-icon-el:before {
font-size: 50px;
}But I want to set it only for some of them. I tried adding cls, but it doesn't work. Can you help ?
.clsMyCheckBoxBig .x-checkboxfield .x-icon-el:before {
font-size: 50px
}.clsMyCheckBoxBig .x-big .x-checkboxfield .x-icon-el:before {
font-size: 50px;
}I'm using:
uniGUI Complete -Professional Edition
Build 1.90.0.1568
-
It works !
Thanks for the fast response.
- 1
-
What about mobile version of this. How can i do it with UnimFileUploadButton ?
UniFileUploadButton1.JSInterface.JSCall('fileInputEl.dom.click', []);
-
I'm using:
uniGUI Complete -Professional Edition
Build 1.90.0.1568
-
@Hayri ASLANIn this topic from 2020 u said u gonna add mobile version of captcha. Is there any progress in building it?
Is there temporary solution for mobile version of reCaptcha?
Small animation of forms on show
in General
Posted
No, i think you didn't understand me correctly, although this post will help me too.
I want to create my own animation. Like you (in the post i quoted previously), but mobile versions dont have beforeClose js functions and i don't know how to code it in beforeHide js function (in mobile UNIGUI)