Jump to content

Sherzod

Moderators
  • Posts

    19793
  • Joined

  • Last visited

  • Days Won

    643

Everything posted by Sherzod

  1. Ok, I will try analyze.. Best regards.
  2. Hi, I think there are several ways to redirect to another server with some parameters from the first app, for example, one of these: first app: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS( 'var f = document.createElement("form"); '+ 'f.action="http://localhost:8079"; '+ // the second app url 'f.method="POST"; '+ 'var i=document.createElement("input"); '+ // username 'i.type="hidden"; '+ 'i.name="username"; '+ 'i.value="login"; '+ 'f.appendChild(i); '+ 'var i2=document.createElement("input"); '+ // password 'i2.type="hidden"; '+ 'i2.name="password"; '+ 'i2.value="pwd"; '+ 'f.appendChild(i2); '+ 'document.body.appendChild(f); '+ 'f.submit(); ' ); end; ..and session on auth app will close... I think here too, there are several ways maybe you can use the timer in the first app after the call redirection ??: procedure TMainForm.UniTimer1Timer(Sender: TObject); begin UniSession.Terminate(); end; second app: firstly, need to analyze the demo project: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\URLParameters... ..on close or on timeout in the main app the user will be redirect to the auth app... UniServerModule.ServerMessages.TerminateTemplate..: http://forums.unigui.com/index.php?/topic/2189-redirect-at-close/&do=findComment&comment=28523 <html> <script> function redirect() { location.href = "http://localhost:8077"; // first app url } window.onpaint = redirect(); </script> <body bgcolor="#dfe8f6"> </body> </html> Try... Best regards.
  3. I'm sorry, Please, Can you create a small test case? Best regards.
  4. Hi, Hmm, What is your version uniGUI?
  5. Hi, * Pressing additional chars.. A possible solution, try, While it may help.. UniDBGrid1 -> .... function reconfigure(sender, store, columns, oldStore, the, eOpts) { //columns[2], 2 = your lookup column index columns[2].getEditor().on("keydown", function(obj, e){ if(!columns[2].getEditor().store.findRecord("val", obj.getRawValue() + String.fromCharCode(e.keyCode)) && e.keyCode!=8 && e.keyCode!=35 && e.keyCode!=36 && e.keyCode!=37 && e.keyCode!=38 && e.keyCode!=39 && e.keyCode!=40 && e.keyCode!=46){ e.preventDefault() } } ); columns[2].getEditor().on("change", function(obj, e){ if (obj.getRawValue() == "") { columns[2].getEditor().triggerEl.elements[0].dom.click(); columns[2].getEditor().triggerEl.elements[0].dom.click() } } ) } Best regards.
  6. Hi, Perhaps you meant it, try: function tabPanel.beforeInit(sender, config) { sender.border = false } Best regards.
  7. Hmm, Yes, you're right, #, [xindex] does not work.. We can do so, but it will affect the status of checkboxes.. after add item: UniSession.AddJS(UniListBox1.JSName + '.boundList.refresh();');
  8. Hi, If I understand correctly you, here: UniServerModule -> ExtLocale Best regards.
  9. Checkbox in a list / NO DB While in the process ... Hi, Checkbox can be added by changing the boundList.tpl, You can check, Try: UniListBox1 -> ClientEvents -> ExtEvents -> add function beforerender: function beforerender(sender, eOpts) { document.doEvt = function(el) { //console.log(el.id); }; sender.boundList.tpl.html = '<ul class="x-list-plain"><tpl for="."><table><tr><td id={[Ext.id()]}><input id={[Ext.id()]} type="checkbox" onclick="doEvt(this)"/></td><td width="100%"><li role="option" unselectable="on" class="x-boundlist-item">{val}</li></td></tr></table></tpl></ul>' } Next, need to consider further "actions"! Best regards.
  10. Hi, Have you installed the runtime package on the server? Best regards.
  11. Hi, Try: .x-grid-row-selected .x-grid-cell-inner { font-weight: bold; background-color:green; } Best regards.
  12. Hi, You should handle the onKeyDown instead of the onKeyPress event. Best regards.
  13. Hi, One of the possible solutions, try: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-grid-group-title {font-size: 12px;}")'); end; Best regards.
  14. hmm, for me is working correctly..
  15. Hi, And if so try: ?! 1. MainForm.Scripts.. Ext.apply(Ext.form.field.VTypes, { DateRange: function(val, field) { var date = field.parseDate(val); if (!date) { return false; } if (field.startDateField && (!field.dateRangeMax || (date.getTime() != field.dateRangeMax.getTime()))) { var start = field.up(field.ownerCt.xtype).down('datefield[vfield=beginDate]'); start.setMaxValue(date); start.validate(); field.dateRangeMax = date; } else if (field.endDateField && (!field.dateRangeMin || (date.getTime() != field.dateRangeMin.getTime()))) { var end = field.up(field.ownerCt.xtype).down('datefield[vfield=endDate]'); end.setMinValue(date); end.validate(); field.dateRangeMin = date; } /* * Always return true since we're only using this vtype to set the * min/max allowed values (these are tested for after the vtype test) */ return true; }, DateRangeText: 'From date must be before To date' }); 2. UniDateTimePicker1.ClientEvents.UniEvents... add beforeInit: function beforeInit(sender, config) { sender.id = 'detailBegin', sender.vfield = 'beginDate', sender.endDateField = 'detailEnd', sender.vtype = 'DateRange', sender.listeners = { scope: this, change: function(field, newValue, oldValue) { if (newValue === null) { Ext.form.field.VTypes.DateRange(newValue, field); } } } } 3. UniDateTimePicker2.ClientEvents.UniEvents... add beforeInit: function beforeInit(sender, config) { sender.id = 'detailEnd', sender.vfield = 'endDate', sender.beginDateField = 'detailBegin', sender.vtype = 'DateRange', sender.listeners = { scope: this, change: function(field, newValue, oldValue) { if (newValue === null) { Ext.form.field.VTypes.DateRange(newValue, field); } } } } Best regards.
  16. Hi, One of the possible solutions, try: UniScrollBox1 -> ClientEvents -> ExtEvents... function afterrender(sender, eOpts) { sender.el.dom.style.overflowY = "hidden" } Best regards.
  17. Hi, You can like this, But here you have to understand that then you can not select menu items ... You need to change the logic: Try: 1. type TMMainPopupMenu = class(TUniPopupMenu) end; 2. procedure TMainForm.UniButton1MouseEnter(Sender: TObject); begin UniPopupMenu1.Popup(0, 28, Sender); end; procedure TMainForm.UniButton1MouseLeave(Sender: TObject); var PopupMenuJSName: string; begin PopupMenuJSName := TMMainPopupMenu(UniPopupMenu1).GetMenuControl.JSName; UniSession.AddJS(PopupMenuJSName + '.hide()'); end; Best regards.
  18. Hi ! Try: function date.afterrender(sender, eOpts) { sender.setEditable(false) } function time.afterrender(sender, eOpts) { sender.setEditable(false) } Best regards.
  19. Ok, no problem.. (sorry, I'm not clear pointed a variable in the code..) We will analyze..
  20. Hi! MainForm.UniMainMenu1 is undefined: UniMainMenu1 - should not be "TUniMainMenu", should be the first item, "TUniMenuItem" Sorry, are you sure, you specify the first item? - MainMenuFirstItemName := FormMainMenu1.Name; Best regards.
  21. Hi, Perhaps the code is not optimal and is redundant, But, try : procedure TMainForm.UniFormCreate(Sender: TObject); var fSize: Byte; MainMenuFirstItemName: string; begin fSize := 20; MainMenuFirstItemName := FormMainMenu1.Name; UniSession.AddJS('Ext.util.CSS.createStyleSheet(".x-btn-default-toolbar-small .x-btn-inner { font-size: '+ IntToStr(fSize) +'px; color: green}");'); UniSession.AddJS( 'Ext.onReady(function(){'+ ' var oldHeight = MainForm.'+MainMenuFirstItemName+'.container.up(''.x-toolbar'').getHeight();'+ 'MainForm.'+MainMenuFirstItemName+'.container.up(''.x-toolbar'').setHeight('+ IntToStr(fSize + 24) +');'+ ' var newHeight = MainForm.'+MainMenuFirstItemName+'.container.up(''.x-toolbar'').getHeight();'+ ' MainForm.form.el.setTop(newHeight - oldHeight);'+ ' Ext.get(MainForm.'+MainMenuFirstItemName+'.container.up(''.x-toolbar'').id).select(''.x-btn'').elements.forEach(function(el){Ext.getCmp(el.id).setHeight('+ IntToStr(fSize + 19) +')});'+ ' var dLeft = Ext.get(MainForm.'+MainMenuFirstItemName+'.container.el.select(''.x-btn-inner'').elements[0]).parent().el.getWidth() + Ext.get(MainForm.'+MainMenuFirstItemName+'.container.el.select(''.x-btn-inner'').elements[0]).parent().el.getLeft();'+ ' MainForm.'+MainMenuFirstItemName+'.container.el.select(''.x-btn-inner'').elements.forEach(function(el, i){if (i=0) {Ext.get(el).el.parent().el.parent().el.setLeft(dLeft + 5); dLeft += (5 + Ext.get(el).el.parent().el.parent().getLeft());}});'+ '});' ); end; Best regards.
  22. try: Ext.get('button-1005-btnInnerEl').setHTML("_Ok!") Best regards.
×
×
  • Create New...