Jump to content

Sherzod

Moderators
  • Posts

    19793
  • Joined

  • Last visited

  • Days Won

    643

Everything posted by Sherzod

  1. Hi. I think to replace the RETURN on the TAB (in the grid) is not the best idea!... But, try (working properly if all columns editable)... UniDBGrid1 -> ClientEvents -> ExtEvents -> function reconfigure function reconfigure(sender, store, columns, oldStore, the, eOpts) { for (var i = 0; i < columns.length; i++) { if (columns[i].getEditor()) { columns[i].getEditor().on('specialkey', function (field, e) { if (e.getKey() == 13) { e.keyCode = e.TAB; return e.keyCode; } }) } } } Best regards.
  2. Hi! Sorry, I have not been able to test this plugin on version 0.96. But you can clarify the question, you want to replace the RETURN on the TAB in edit mode? Best regards.
  3. Hi Michael Schindler! If you are working with FireBird do you have the ability to use the components palette "InterBase"? Ie "TIBDatabase", "TIBTransaction", "TIBTable", "TIBQuery", "TIBUpdateSql" ... Best regards.
  4. Hi Janex. I think you can override the "refresh": UniDBGrid1 -> .... function afterrender(sender, eOpts) { sender.pagingBar.getComponent("refresh").handler = function () { //your custom logic... alert("test"); } } Best regards.
  5. Hi Janex. If I understand correctly, try: UniDBHTMLMemo1 -> ClientEvents -> ExtEvents -> add afterrender function: function afterrender(sender, eOpts) { sender.toolbar.getComponent('createlink').handler = function() { var url = prompt(this.createLinkText, this.defaultLinkValue); if (url && url != 'http:/' + '/') { this.relayCmd('insertHTML', "<a href='" + url + "' target='_blank'>" + this.getDoc().getSelection() + "</a>"); } } } This code simply adds a "target". I do not know, but by using the links UniDBHTMLMemo1, of clicking behavior before and after changing the code does not work for me. Try... Best regards.
  6. Hi. C:\Program Files\FMSoft\Framework\uniGUI\Demos\HTMLEditor\htmlEd.dpr
  7. I wish you all good luck!

  8. Hi Mediv07. Yes it is possible, there is a special plugin "TabReorderer", located in the directory: "C:\Program Files\FMSoft\Framework\uniGUI\ext-4.2.1.883\examples\ux" How to use? Try... 1. You must include two files in your project BoxReorderer.js and TabReorderer.js: (in such sequence!) Both files are located in the directory "C:\Program Files\FMSoft\Framework\uniGUI\ext-4.2.1.883\examples\ux". Copy these files to the directory "../files" and include in your project: files/BoxReorderer.js files/TabReorderer.js 2. Further it is necessary to include this plugin: function tabPanel.beforeInit(sender) { sender.plugins = [Ext.create('Ext.ux.TabReorderer')]; } sample: http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/tabs/reorderable-tabs.html Best regards.
  9. try this link may help: http://stackoverflow.com/questions/18871760/how-to-detect-ie-11-with-javascript-in-asp-net
  10. IE 11 is not officially supported prior to ExtJS 4.2.2 (see property isIE11). Microsoft removed the MSIE part from IE11's user agent (refer here), which is the reason why it does not work with ExtJS 4.2.1 (i.e. the latest GPL version) and below. From the source code, for ExtJS 4.2.1: isIE = !isOpera && check(/msie/), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7), isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8), isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9), isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10), isIE6 = isIE && check(/msie 6/), and for ExtJS 4.2.2: isIE = !isOpera && (check(/msie/) || check(/trident/)), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7), isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8), isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9), isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10), isIE11 = isIE && ((check(/trident\/7\.0/) && docMode != 7 && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 11), isIE6 = isIE && check(/msie 6/), source: http://stackoverflow.com/questions/21881671/ext-isie-return-false-in-ie-11
  11. Sherzod

    Show form via JS

    Hi Janex. Do you want to create and show a form using JS? Or form already exists? Best regards.
  12. Apparently you have not attached humane CSS. After unpacking HumaneDemo.zip, 1 Copy the folder "assets" in the directory "c:\myproject\Win32\Debug" 2 In the Custom Files add "assets/js/humane.min.js" 3 in the Custom CSS add html, body { height: 100%; } .humane { position: fixed; -moz-transition: all 0.3s ease-out; -webkit-transition: all 0.3s ease-out; -ms-transition: all 0.3s ease-out; -o-transition: all 0.3s ease-out; transition: all 0.3s ease-out; z-index: 100000; display: none; } .humane { font-family: Ubuntu, Arial, sans-serif; text-align: center; font-size: 15px; top: 10px; right: 10px; opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); width: 150px; color: #fff; padding: 10px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABQCAYAAADYxx/bAAAABmJLR0QA/wD/AP+gvaeTAAAANElEQVQYlWNgYGB4ysTAwMDAxMjICCUQXDQWAwMDAxMTExMedcRyB6d5CAMQ5hGrjSrmAQBQdgIXlosSTwAAAABJRU5ErkJggg=='); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0,0,0,0.90)), color-stop(1, rgba(50,50,50,0.90))) no-repeat; background: -moz-linear-gradient(top, rgba(0,0,0,0.90) 0%, rgba(50,50,50,0.90) 100%) no-repeat; background: -webkit-linear-gradient(top, rgba(0,0,0,0.90) 0%, rgba(50,50,50,0.90) 100%) no-repeat; background: -ms-linear-gradient(top, rgba(0,0,0,0.90) 0%, rgba(50,50,50,0.90) 100%) no-repeat; background: -o-linear-gradient(top, rgba(0,0,0,0.90) 0%, rgba(50,50,50,0.90) 100%) no-repeat; background: linear-gradient(top, rgba(0,0,0,0.90) 0%, rgba(50,50,50,0.90) 100%) no-repeat; *background-color: #000; -moz-border-radius: 5px; -webkit-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; -moz-box-shadow: 0 4px 4px -4px #000; -webkit-box-shadow: 0 4px 4px -4px #000; -ms-box-shadow: 0 4px 4px -4px #000; -o-box-shadow: 0 4px 4px -4px #000; box-shadow: 0 4px 4px -4px #000; -moz-transform: translateY(-40px); -webkit-transform: translateY(-40px); -ms-transform: translateY(-40px); -o-transform: translateY(-40px); transform: translateY(-40px); } .humane p, .humane ul { margin: 0; padding: 0; } .humane ul { list-style: none; } .humane.humane-info { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABQCAYAAADYxx/bAAAABmJLR0QA/wD/AP+gvaeTAAAAMUlEQVQYlWNgYDB6ysTAwMDAxMDACCcYUFkMDEwMDEwMBNVhkxg65jGhmke6M6hgHgBSdgHnpZwADwAAAABJRU5ErkJggg=='); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0,0,50,0.90)), color-stop(1, rgba(0,0,100,0.90))) no-repeat; background: -moz-linear-gradient(top, rgba(0,0,50,0.90) 0%, rgba(0,0,100,0.90) 100%) no-repeat; background: -webkit-linear-gradient(top, rgba(0,0,50,0.90) 0%, rgba(0,0,100,0.90) 100%) no-repeat; background: -ms-linear-gradient(top, rgba(0,0,50,0.90) 0%, rgba(0,0,100,0.90) 100%) no-repeat; background: -o-linear-gradient(top, rgba(0,0,50,0.90) 0%, rgba(0,0,100,0.90) 100%) no-repeat; background: linear-gradient(top, rgba(0,0,50,0.90) 0%, rgba(0,0,100,0.90) 100%) no-repeat; *background-color: #030; } .humane.humane-success { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABQCAYAAADYxx/bAAAABmJLR0QA/wD/AP+gvaeTAAAAMUlEQVQYlWNgMGJ4ysTAwMDAxMAIJxhQWQwMDEwMTKgS2NRhkxg65jGhmke6M6hhHgBS2QHn2LzhygAAAABJRU5ErkJggg=='); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(0,50,0,0.90)), color-stop(1, rgba(0,100,0,0.90))) no-repeat; background: -moz-linear-gradient(top, rgba(0,50,0,0.90) 0%, rgba(0,100,0,0.90) 100%) no-repeat; background: -webkit-linear-gradient(top, rgba(0,50,0,0.90) 0%, rgba(0,100,0,0.90) 100%) no-repeat; background: -ms-linear-gradient(top, rgba(0,50,0,0.90) 0%, rgba(0,100,0,0.90) 100%) no-repeat; background: -o-linear-gradient(top, rgba(0,50,0,0.90) 0%, rgba(0,100,0,0.90) 100%) no-repeat; background: linear-gradient(top, rgba(0,50,0,0.90) 0%, rgba(0,100,0,0.90) 100%) no-repeat; *background-color: #030; } .humane.humane-error { background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADICAYAAAAp8ov1AAAABmJLR0QA/wD/AP+gvaeTAAAAPklEQVQokWMwYmB4ysTAwMCATjASFsOmBBvBRJ7x+O0g0wCS7CDTH/RwH7X9MVDuwyaG032D2M2UeIYO7gMAqt8C19Bn7+YAAAAASUVORK5CYII='); background: -webkit-gradient(linear, left top, left bottom, color-stop(0, rgba(50,0,0,0.90)), color-stop(1, rgba(100,0,0,0.90))) no-repeat; background: -moz-linear-gradient(top, rgba(50,0,0,0.90) 0%, rgba(100,0,0,0.90) 100%) no-repeat; background: -webkit-linear-gradient(top, rgba(50,0,0,0.90) 0%, rgba(100,0,0,0.90) 100%) no-repeat; background: -ms-linear-gradient(top, rgba(50,0,0,0.90) 0%, rgba(100,0,0,0.90) 100%) no-repeat; background: -o-linear-gradient(top, rgba(50,0,0,0.90) 0%, rgba(100,0,0,0.90) 100%) no-repeat; background: linear-gradient(top, rgba(50,0,0,0.90) 0%, rgba(100,0,0,0.90) 100%) no-repeat; *background-color: #300; } .humane.humane-animate { opacity: 1; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); -moz-transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); } .humane.humane-animate:hover { opacity: 0.2; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20); } .humane.humane-js-animate { opacity: 1; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); -moz-transform: translateY(0); -webkit-transform: translateY(0); -ms-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); } .humane.humane-js-animate:hover { opacity: 0.2; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=20); }
  13. Hi Fenix. I think there are a few ways to do this, one of the ways you can use the column's renderer. Try: UniDBGrid1 -> ClientEvents -> ExtEvents -> ... function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[4].renderer = Ext.util.Format.dateRenderer('d/m/Y H:i:s'); columns[5].renderer = Ext.util.Format.dateRenderer('d/m/Y'); } Best regards.
  14. Hi zilav. Maybe you'd like this? UniDBGrid1 -> ClientEvents -> ExtEvents -> ... function beforerender(sender, eOpts) { sender.view.features[0].groupHeaderTpl = "<a href='http://{name}' target='_blank'>{columnName}: {name}</a>" } Best regards.
  15. clear ... then try: UniNumberEdit1 -> ClientEvents -> ExtEvents -> Ext.form.field.Number add function keydown function keydown(sender, e, eOpts) { if (e.getKey() == 190 || e.getKey() == 110) { if (sender.getRawValue().indexOf('.') > -1) e.preventDefault(); }; } but it does not work for copy/paste (but it can also be done...) best regards.
  16. Hi schweppes. You want to say that "decimalPrecision" is not working correctly? Best regards.
  17. I thought that the question was about the variable on the client side ...
  18. Hi vitisan. var uniGUIServerTime; - It is not delphi variable, it is a variable javascript! You must use this: 1. procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin UniLabel1.Caption := DateTimeToStr(Now); end; or 2. procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin UniSession.AddJS(UniLabel1.JSName + '.setText(uniGUIServerTime)'); end; or 3. procedure TMainForm.UniBitBtn1Click(Sender: TObject); begin UniSession.AddJS(UniLabel1.JSName + '.setText(' + DateTimeToStr(Now) + ')'); end; Best regards.
  19. You want to know the server time on the client side? There are several ways, one of them: 1. Declare a variable. In MainForm.Scripts add the line: var uniGUIServerTime; 2. Now you can assign it a value: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS('uniGUIServerTime = "' + DateTimeToStr(Now) + '";'); end; 3. Now on the client side you can use this variable Best regards.
  20. Hi! If question still relevant , try: procedure TMainForm.UniButton1Click(Sender: TObject); begin if MainModule.UniMainModule.BrowserOptions = [] then begin MainModule.UniMainModule.BrowserOptions := [boDisableMouseRightClick]; UniSession.AddJS('document.oncontextmenu = document.body.oncontextmenu = function () { return false; }'); end else begin MainModule.UniMainModule.BrowserOptions := []; UniSession.AddJS('document.oncontextmenu = document.body.oncontextmenu = function () { return true; }'); end; end; Best regards.
  21. Hi erich. On one element you need to use or click or dbclick, but not both. Or use this method: try... <a id="press" href="javascript:void(0)" onclick="singleClick(event)" ondblclick="doubleClick(event)">Click here</a> <div id="log"></div> var timer; var status = 1; function singleClick(event) { event.preventDefault(); status = 1; timer = setTimeout(function() { if (status == 1) { alert("I am single click !"); document.getElementById("log").innerHTML ='I am single click !'; } }, 500); } function doubleClick(event) { event.preventDefault(); clearTimeout(timer); status = 0; alert("I am double click !"); document.getElementById("log").innerHTML = 'I am a double click!'; } or //jquery $('#press').click(function (event) { event.preventDefault(); if ( $(this).data('dblclicked') ) { $('#log').text('No google today!'); clearTimeout( $(this).data('clicked') ); $(this).data('dblclicked', false); }else{ var self = this; $(this).data('dblclicked', true).data('clicked', setTimeout(function() { $('#log').text('google !'); $(self).data('dblclicked', false); },300)); } }); http://stackoverflow.com/questions/17921556/double-click-ambiguity-in-jquery Best regards.
×
×
  • Create New...