Jump to content
uniGUI Discussion Forums

fredmontier

uniGUI Subscriber
  • Content Count

    54
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by fredmontier

  1. English: This example shows how to copy text using the clipboard but on the client side and not using the application memory area on the server. In other words, it's how you should do the "copy and paste" in uniGUI. Portuguese: Este exemplo mostra como copiar texto usando o clipboard mas no client-side e não usando a área de memória do aplicativo no servidor. Em outras palavras, é como se deve fazer o "copiar e colar" no uniGUI. Thanks to Sherzod Code: http://forums.unigui.com/index.php?/topic/6116-copy-paste-selected-text-in-tunimemo/&tab=comments#comment-31802 Moderator/ Staff: http://forums.unigui.com/index.php?/profile/906-sherzod/ Also, third party code from the web. uniGUI DOES COPY TEXT TO CLIPBOARD.rar
  2. uniGUI DOES SESSION TIMEOUT PROPERLY There is nothing worst than lazy people using your program and keeping it open taking resources (DB access, memory, CPU time) and not paying homage to your wonderful work , hey ? They just leave there paying no attention whatsoever !!! I hate those lazy Btds people ! So, what about a solution to detect idle UI time at browser's side and alerts the user showing the real time left to close the session ? "No problemo, I got you back boy !!!" Seriously, when you have 50-100 concurrent sessions and not planning to expand to Hyper Server, it may cripple yours application performance very deeply and quickly. That's no joke for real developers ! So, kick out the lazy ones doing nothing ! Solution https://stackoverflow.com/questions/13246378/detecting-user-inactivity-over-a-browser-purely-through-javascript This project is based in the code above and I made some tweaks to work properly and warn the user to put, that lazy bstd, to work again or leave that marvelous piece of code of yours alone. I found a better code some days latter but it don't seams to make any big difference to the JS Snippet used here. I'm planning to a latter update in the users area of unigui.com.br. For now it's what I got working and tested. Instructions 1- Put the MainForm Script in your project. 2- In MainForm OnAjaxRequest past the code provided here. Change the messages and other details. 3- As you can see, there are two Events: one to trigger at a 1 minute idle time (_idle_timeout = no mouse ou keyboard activities) and starts to show the time remaining based in uniServerModule.SessionTimeout, to TimeOut, of course !. And teh other to show the busy mode (_busy). So when the session expires, at least you warned the user before and have a trigger point to save data and close any pending task. You can also flag "work mode" and and "idle mode" showing proper remaining session time. Have fun... and have a good one. Here is a second JS Code Snippet that works better and I will replace later. Stay tuned ! (or clicking...) var IDLE_TIMEOUT = 60; //seconds var _localStorageKey = 'global_countdown_last_reset_timestamp'; var _idleSecondsTimer = null; var _lastResetTimeStamp = (new Date()).getTime(); var _localStorage = null; AttachEvent(document, 'click', ResetTime); AttachEvent(document, 'mousemove', ResetTime); AttachEvent(document, 'keypress', ResetTime); AttachEvent(window, 'load', ResetTime); try { _localStorage = window.localStorage; } catch (ex) { } _idleSecondsTimer = window.setInterval(CheckIdleTime, 1000); function GetLastResetTimeStamp() { var lastResetTimeStamp = 0; if (_localStorage) { lastResetTimeStamp = parseInt(_localStorage[_localStorageKey], 10); if (isNaN(lastResetTimeStamp) || lastResetTimeStamp < 0) lastResetTimeStamp = (new Date()).getTime(); } else { lastResetTimeStamp = _lastResetTimeStamp; } return lastResetTimeStamp; } function SetLastResetTimeStamp(timeStamp) { if (_localStorage) { _localStorage[_localStorageKey] = timeStamp; } else { _lastResetTimeStamp = timeStamp; } } function ResetTime() { SetLastResetTimeStamp((new Date()).getTime()); } function AttachEvent(element, eventName, eventHandler) { if (element.addEventListener) { element.addEventListener(eventName, eventHandler, false); return true; } else if (element.attachEvent) { element.attachEvent('on' + eventName, eventHandler); return true; } else { //nothing to do, browser too old or non standard anyway return false; } } function WriteProgress(msg) { var oPanel = document.getElementById("SecondsUntilExpire"); if (oPanel) oPanel.innerHTML = msg; else if (console) console.log(msg); } function CheckIdleTime() { var currentTimeStamp = (new Date()).getTime(); var lastResetTimeStamp = GetLastResetTimeStamp(); var secondsDiff = Math.floor((currentTimeStamp - lastResetTimeStamp) / 1000); if (secondsDiff <= 0) { ResetTime(); secondsDiff = 0; } WriteProgress((IDLE_TIMEOUT - secondsDiff) + ""); if (secondsDiff >= IDLE_TIMEOUT) { window.clearInterval(_idleSecondsTimer); ResetTime(); alert("Time expired!"); document.location.href = "logout.html"; } } uniGUI DOES SESSION TIMEOUT PROPERLY.rar
  3. fredmontier

    Circular image

    Hi, having problem with CSS in a uniImage. My goal is to produce circular images with CSS but I can only apply to the main class in CustomCSS as follows: img { vertical-align: middle; width: 80px; height: 80px; border-radius: 50%; } Problem is, affects all uniImage. I want to apply to a specific uniImage When I change the name for instance ... .avatar { vertical-align: middle; width: 80px; height: 80px; border-radius: 50%; } And try to apply in only one specific uniImage it does not work. Have tried beforeinit, run time adding config.cls , addCls etc... Using version 1.0.70.92
  4. Hi... I'm trying to make this example to the uniGUI DOES Series but I got some problems using the correct names in CANVAS to generate the karaoke CDG GRAPHICS using the JS libs/code. Any help is welcome and I think it will be of grate value to the community. Bellow are two different CDG libs and project's Skeletons to make it work. I don't want to generate a HTML to the CDG (It's already in the example included) and browser to it. It's a ridiculous solution. Use uniFRAMEHTML, uniCANVAS , FORM or other solution. But no external HTML or uniURLFRAME (don't work either). I will pack the final working project and give the credits to whom ever come up with the solution. And of course, will be published in CODE SAMPLES to everybody. Thanks... PS: Already tried support. uniGUI DOES KARAOKE.rar uniGUI DOES KARAOKE2.rar
  5. fredmontier

    Change color field with focus

    "Changed in css" I meant , what has changed in CSS attribution to component names, class , whatever. Same project works fine in version 1482 but not in 1496.
  6. fredmontier

    Change color field with focus

    I had it working fine in prior versions via CSS. And now, it is not working. Same example in codepen do not work in CSS via CustomCSS. The example above uses function at runtime and its not necessary. What has changed in CSS ? And how can we be aware of that changes in the future ? See post below.
  7. fredmontier

    Has something changed in CSS ?

    Has something changed in CSS definitions ? Only today I noticed. Background color on focused is not working (version 1496) Se example in https://codepen.io/chriscoyier/pen/IgEiz. and below. Rolled back and compiled in an old version as its Ok, with a background color inside when focused. An example and printscreen (Custom CSS): Same code different results .... input[type=text], textarea { background-color: grey; } input[type=text]:focus, textarea:focus { background-color: yellow; }
  8. fredmontier

    PWA and uniGUI

    Hi there... I know the difference between stateful and stateless and uniGUI works in stateful mode (hence sessions, etc),and is the core to it's technology. As Android dominates mobile apps and Apple declines in importance, the app stores fees and prices seems to be more and more unreal. And recently I read a post from neo4a about it and really worked in a webpage. See reference here and here. There are websites services dedicated to convert you webpage to a "PWA-ish". I think its almost impossible, hope I'm wrong but would it be possible to create a more modest uniGUI app stateless in the future ? Or just a new encapsulated project model in Expert Project Design in IDE as PWA (manifest, resources etc) ? Since recent Safari versions an IOs are "supporting" PWA there is a good opportunity for another uniGUI format in the near future. Don't you think ?
  9. fredmontier

    pwa mobile app

    OK. thanks... I posted about your message in General D..
  10. fredmontier

    pwa mobile app

    And how it works when session goes off-line ? Looks like you could easily adapt a webpage/app stateless but not a stateful app like uniGUI. Am I wrong ?
  11. fredmontier

    Receive a Json Array in uniGUI

    Hi there... I need to receive a json array and I figured out that it was supposed to be handled in ServerModule, in UniGUIServerModule.OnHTTPDocument on in UniGUIServerModule.OnHTTPCommand. How it should work: 1- Send data to the ecommerce server (name, card number, amount etc) 2- It will return in another transaction the JSON Array with info about it. (more detail, approved or not etc) 3- I need to get that array and manipulate it. Where I get this Json array ? In manual just said the "ONhttpDocument" worh like idHTTPServer event. But even there I could not put it to work properly. PS: Don't work with Serverparams, tried already.
  12. fredmontier

    Alternative for MessageDLG

    really thanks.. I tested and it's really a good replacement to messagedlg.
  13. fredmontier

    uniGUI DOES SESSION TIMEOUT PROPERLY

    Already updated source. Missing one unit.
  14. uniGUI DOES Circular Images aka Avatars Don't ask me way but they are in everywhere. Don't ask me why they must be circular either. But... that's it. This project show some methods to produce circular images and how to apply loading, as resource and applying to a regular image at run-time. Thanks to Sherzod for correcting my CSS class name. Have fun uniGUI DOES AVATARS.rar
  15. fredmontier

    Circular image

    Oh.. .man... I'm so dumb ! Thanks a lot. This is for a example I will post here. A lot of people asked me about it and it turn out to be a little trickier than I thought. Really appreciated your help.
  16. I read somewhere here that was not possible to play a sound on the mobile platform using uniGUI. I completely forgot about the subject and these days I needed to put sound in one of my web/app/sites and already knew how to do with JQuery and mainly did not want those HTML5 audio controls disrupting the interface. And combining JQuery with uniGUI I was able to do much faster. So I made this example Desktop / Mobile showing that yes, "uniGUI DOES" sounds and very well. Both desktop and mobile. Example showing how to play direct from a URL, local (local file here refers to a file on the server and not from the client's computer, of course), using ClientEvents and conventional OnEnter Event. And in Mobile, no need to put in TAP, because it's obvious. Preview online. http://www.unigui.com.br:8077/ uniGUI DOES SOUNDS.rar
  17. QrCode Reader for uniGUI That's is my new series (old "All about x topic") and now inspired in Chelsea DOES Series... (lol) here we go. This is the first experimental project for our future Pack 4 commercial/biz automation. The final version will have several other features as well as QrCode generation capability etc. This code is free and based on several JavaScript libs linked and adapted. This project design is hybrid. Restrictions: Chrome only allows WebRTC access via https or localhost. Safari ONLY https. FireFox is the most compatible of all. This is an HTML5 feature that has not yet been implemented in most browsers and many users have old versions. So check the browser version of your device and test with others browsers. Website that shows what each browser supports https://caniuse.com/#search=getUserMedia Mobile Compatibility with HTML5 http://mobilehtml5.org/ https://webrtc.github.io/samples/ https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API How to use: Copy the / files folder just below where you want to place your ISAPI or StandAlone. And let's rock ! Live Demo: https://lojasms.com.br/qrcode/qrcode.dll More Information, Resources, Books, and Project Packs visit http://www.unigui.com.br (the Brazilian portal to uniGUI). ' Enjoy... and have a good one! Sorry: but I'm experience some health problems today... tomorrow I'll post version with English Interface. Pack04-Project01 QrCode.rar
  18. fredmontier

    uniGUI DOES QrCode

    Not this example thou. But can be done. QrCode is the most flexible due to the distance e irregular positioning. While 1D Barcode and other format every scan reader already decodes the barcodes and may insert as if it was some sort of keyboard attached to the device. And while everybody has a cam/webcam only those ones working with automation has this sort of equipment. So the demand was really for QrCodes. I have 2 barcode reader and one of them (table/cashier position, like in the ones used in stores, a multibeams scanner) can read any format available and convert on the fly by hardware to the program. While the other one can read only 16 formats except QrCode (it's a handheld single line laser beam). Single Line Beams scanner don't work with QrCodes, at least to my knowledge in the field. Resuming, the majority of old scanner can't read QrCodes. So, it's a solution looking for a problem.
  19. Hi there...

    There is very similar component from Falcon, is it based in your code ? Did you authorized ?  Was already in public domain ?

    Your code still free, as in "free meal" ?

    I'm trying to put a public and free uniRX (-ish) type library for uniGUI community and I want to ask you permission to include uniGMaps.

    Would you allow it
    Care to join us in this endeavor . ?

    Thanks...

  20. fredmontier

    How About an "uniRX Library" ?

    Hi Folks... For quite some time I have found and collected a lot of components here in the forum that are not include in the official uniGUI distributions. Some of them are very good in quality (like uniGMaps) and unique and while other are just regular uniGUI components with minors but good tweaks. To "old Delphi timer" (like myself above 40), we loved Rx Library. How about we put together a "uniRX Library" free for all uniUsers ? Could work also for a "lab" and suggestions on improvements to the main uniGUI pack's without bother the development team with little requests and at the same time help the community and the folks behind uniGUI with a community compass to their work. We should open a GitHUB Project and start from there with a Small Packs and adding as things come up. Who is up to the task or help it ? What you think about ? Is there anyone else doing it already ?
  21. fredmontier

    How About an "uniRX Library" ?

    Making it clear... it should be free to uniGUI community and works as a code donation basis as RX Library was. You could Help by: 1- Indicating the component itself. 2- Indicating the origin (uniGUI Forum link or external link), author, author's contact and how to credit. 3- Indicating source to or providing documentation, examples or demos. 4- Helping to doc, creating demos, trying it.. etc. 5- Suggestions 6- whatever... And of course, if you're the author of any uniGUI component, you are more than welcome to participate. I could provide the final package with installation and format the documentation to it and notify the community whenever an update or version is available. More suggestions ?
  22. From the "infamous" series, "All about...", we got together 4 examples of animated backgrounds for LoginForms. A foreground LoginForm (with some tricks and a soft gradient) that can be easily included in minutes to you project for a "quick facelift" and voilá . Different solutions with only one goal: All formatted to be used in LoginForms because "it's all about the looks my dear"... With the examples provided you can easily adapt any animated JavaScript background to your projects and get an extra bang to user attention. There are lots of animated jscripts , particules, elements in codepen and other Jscript resources websites that you can use the same tools and solutions here. Since we are almost at Christmas and Festivities days, SnowFlakes JavaScript Animated background is here for direct download. Additional projects with nice effects and ready-to-use is downloadable from the link below. Visit www.unigui.com.br (use the google translation control at the top - soon in english) and download the other examples and material. Project Packs, Books (in Portuguese only for now but coming soon in english) and resources exclusive to uniGUI Framework. Happy festivities, Christmas and a prosper new year. Cheers, Fred. PS: you can write me in english for more info and support. "No problemo.. " Projeto31-LoginSnowFlakesEffects.rar
  23. These are low-res gifs... take a look at the snowflakes project. You got hi-res with Jscript effect at the end. The other examples will be soon available in www.unigui.com.br only. I don't want to "spam" the forum with similar posts with the same subject. Next month, two new post using the "All about" tag series (Grids and Edits) and we will move to a new topic and series. C'ya
  24. Another from the series "All about..." All about a Login Form with a Background video Project Repository for a Initial Login Screen for desktop projects with background video and informative DIV and pause / play button. Adapted example from W3School (http://wwww.w3schools.com). Panel with Gradient in two colors and centralized shade to facilitate the definition of your login controls. Note that it is a borderless LoginForm and properly configured to work. Author: Fred Montier / Cetera Softwares 1- Open your IDE 2- Open the project in the Source folder and compile / execute. 3- Open your browser and go to the default address. 4- EX: http: // localhost: 8077 Future versions like this example and others you will find easily in the portal http://www.unigui.com.br Source code right below... have fun. Projeto24-LoginVideoInBackground.rar
×