Jump to content

Sherzod

Moderators
  • Posts

    19839
  • Joined

  • Last visited

  • Days Won

    646

Everything posted by Sherzod

  1. I'm sorry, Please, Can you create a small test case? Best regards.
  2. Hi, Hmm, What is your version uniGUI?
  3. 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.
  4. Hi, Perhaps you meant it, try: function tabPanel.beforeInit(sender, config) { sender.border = false } Best regards.
  5. 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();');
  6. Hi, If I understand correctly you, here: UniServerModule -> ExtLocale Best regards.
  7. 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.
  8. Hi, Have you installed the runtime package on the server? Best regards.
  9. Hi, Try: .x-grid-row-selected .x-grid-cell-inner { font-weight: bold; background-color:green; } Best regards.
  10. Hi, You should handle the onKeyDown instead of the onKeyPress event. Best regards.
  11. 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.
  12. hmm, for me is working correctly..
  13. 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.
  14. Hi, One of the possible solutions, try: UniScrollBox1 -> ClientEvents -> ExtEvents... function afterrender(sender, eOpts) { sender.el.dom.style.overflowY = "hidden" } Best regards.
  15. 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.
  16. Hi ! Try: function date.afterrender(sender, eOpts) { sender.setEditable(false) } function time.afterrender(sender, eOpts) { sender.setEditable(false) } Best regards.
  17. Ok, no problem.. (sorry, I'm not clear pointed a variable in the code..) We will analyze..
  18. 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.
  19. 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.
  20. try: Ext.get('button-1005-btnInnerEl').setHTML("_Ok!") Best regards.
  21. Hi, Try: procedure TMainForm.UniButton1Click(Sender: TObject); begin ShowMessage('Test'); UniSession.AddJS('Ext.get("messagebox-1001_header_hd-textEl").setHTML("Your Caption")'); end; Best regards.
  22. Hi, This solution can also be helpful: http://forums.unigui.com/index.php?/topic/3137-is-it-possible-to-change-unimainmodulebrowseroptions-at-runtime/?hl=bodisablemouserightclick http://forums.unigui.com/index.php?/topic/3137-is-it-possible-to-change-unimainmodulebrowseroptions-at-runtime/&do=findComment&comment=21489 Best regards.
  23. Try: function afterrender(sender, eOpts) { sender.pagingBar.getComponent("refresh").handler = function () { //your custom logic... sender.getStore().load(); } }
  24. Hi, 1. It may help: http://forums.unigui.com/index.php?/topic/4425-grid-refresh-button/&do=findComment&comment=21879 2. Try: UniDBGrid1 -> .... function afterrender(sender, eOpts) { if (sender.pagingBar) { sender.pagingBar.getComponent("refresh").hide() } } Best regards!
×
×
  • Create New...