Jump to content

Sherzod

Moderators
  • Posts

    19725
  • Joined

  • Last visited

  • Days Won

    639

Everything posted by Sherzod

  1. try this link may help: http://stackoverflow.com/questions/18871760/how-to-detect-ie-11-with-javascript-in-asp-net
  2. 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
  3. Sherzod

    Show form via JS

    Hi Janex. Do you want to create and show a form using JS? Or form already exists? Best regards.
  4. 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); }
  5. 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.
  6. 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.
  7. 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.
  8. Hi schweppes. You want to say that "decimalPrecision" is not working correctly? Best regards.
  9. I thought that the question was about the variable on the client side ...
  10. 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.
  11. 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.
  12. 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.
  13. 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.
  14. Hi erich. Can you clarify? describe in more detail "ajaxRequest"? Best regards
  15. Try var link = document.createElement('link'); link.type = 'image/png'; //link.type = 'image/ico'; link.rel = 'icon'; link.href = 'images/ok.png'; //link.href = 'http://www.google.com/favicon.ico'; document.getElementsByTagName('head')[0].appendChild(link); Best regards
  16. Hi http://mathiasbynens.be/demo/dynamic-favicons ... Works in Firefox, Opera, and Chrome. Fails in Safari and Internet Explorer function changeFavicon(src) { var link = document.createElement('link'), oldLink = document.getElementById('dynamic-favicon'); link.id = 'dynamic-favicon'; link.rel = 'shortcut icon'; link.href = src; if (oldLink) { document.head.removeChild(oldLink); } document.head.appendChild(link); }; changeFavicon('http://www.google.com/favicon.ico'); Best regards
  17. use: function reconfigure(sender, store, columns, oldStore, the, eOpts) { for (var i = 0; i < columns.length; i++) { columns[i].editor = {selectOnFocus: true}; }; columns[1].editor = {selectOnFocus: true, listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; }
  18. function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[1].editor = {selectOnFocus: true, listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; } OR (Do not need to put one under the other! (Sorry if I do not understand)) function reconfigure(sender, store, columns, oldStore, the, eOpts) { for (var i = 0; i < columns.length; i++) { columns[i].editor = {selectOnFocus: true}; }; columns[1].editor = {selectOnFocus: true, listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; }
  19. Try function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[1].editor = {selectOnFocus: true, listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; } function reconfigure(sender, store, columns, oldStore, the, eOpts) { for (var i = 0; i < columns.length; i++) { columns[i].editor = {selectOnFocus: true}; }; columns[1].editor = {selectOnFocus: true, listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; }
  20. No problem! (Sorry, that I requested clarification many times!...) function store.load(sender, records, successful, eOpts) { sender.grid.getSelectionModel().setCurrentPosition({row: 1, column: 5}); } Best regards.
  21. I'm sorry I did not understand the question ... ie, please clarify again ...
  22. try: function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[1].setWidth(200); columns[2].setWidth(500); }
  23. And add this code too. This allows you to move to another column in edit mode: UniDBGrid1 -> ClientEvents -> ExtEvents add reconfigure function function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[1].editor = {listeners: { specialkey: function(field, e) { if (e.getKey() == e.TAB) { sender.getSelectionModel().setCurrentPosition({row: sender.getSelectionModel().getCurrentPosition().row, column: 5}); } } } }; } Try... Best regards.
×
×
  • Create New...