Jump to content

Oliver Morsch

uniGUI Subscriber
  • Posts

    356
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Oliver Morsch

  1. if "FreeOnClose" of UniForm1 is "true", there is no instance of UniForm1 anymore (in the anonymous procedure).
  2. The text of the cell must contain the html for the panel (div) and images (img).
  3. IE9 has no support: http://caniuse.com/#feat=filereader
  4. You have updated post #1, I think it was the version of (my) post #4. Now I have updated #4 with example (.zip) and screenshot.
  5. procedure TFormProduct.UniFormClose(Sender: TObject; var Action: TCloseAction); begin if dmMain.Product.State in [dsEdit,dsInsert] then begin Action := caNone; MessageDlg('Would you like to save the changes (Y/N/C) ?', mtConfirmation, mbYesNoCancel, QuestionSaveYesNo); end; end; procedure TFormProduct.QuestionSaveYesNo(Res: Integer); begin case Res of mrYes : dmMain.Product.Post; mrNo : dmMain.Product.CancelUpdates; else EXIT; end; Close; end; Try this code, but it is not tested...
  6. procedure TFormProduct.UniFormClose(Sender: TObject; var Action: TCloseAction); Do you see the (var) "action"?
  7. Set Action := caNone before (when) you call MessageDlg. In "TFormProduct.QuestionSaveYesNo" you must call Close again (or do nothing in the last case if you ask "YES/NO/CANCEL")
  8. Have you changed the service name to "myUniGuiApp" / is there a service named "UniServiceModule" ?
  9. Have you tried to set "autocoinicialize" to true? (Autocoinitialize)
  10. In this case it should be simple to give the user a TUniHmlMemo (or "tiny MCE" component) for editing the mail. The user must only insert things like [LastName] or you give him buttons to insert this. And then you must replace all [Fieldnames] with the value of the current record before sending. Where do you have problems?
  11. Do you (your users) need 1:n-relations in the message body? Or is 1 query (record) -> 1 mail(body) enough?
  12. Not at present, but it is planned for the future. I think i will simply have a text like "dear [NAME], ..." and then replace [NAME] and more by a sql query... I don't know at this time if we will need master/detail-relations (e.g. invoice items) in the email or sending such things as PDF-Attachment. But i have developped such a behavior (master/detail with text replacing) a few years ago for a RTF-Report. It works, but is too difficult for most users, so we must deliver the "reports" (sql-relations, ...).
  13. My current test version looks like this:
  14. I see only the login screen; on login in firefox nothing happens and in chrome the browser will be closed...
  15. I use indy (idSmtp, idPop3, idMessage) for sending and receiving mails. For viewing i use uniHtmlFrame and uniHtmlMemo as (HTML-)editor. All mails are stored in a firebird database.
  16. I have found a report designer running in web browser: using flash or using ajax (otimized for touch/tablets) Intranet or internet? In intranet it is OK but i think it is not a good idea to make a database directly accessible over the internet... Regards Oliver
  17. You can start a .exe in ISAPI-Module using ShellExecute or CreateProcess, but that is not that what you want, because the program will run on Server (on client you will see nothing). So it makes only sense to use this for starting "command line programs" (without windows/forms). I use CreateProcess to start such processes on server. Or you can send the .exe to the client and the user must intsall/execute it on the client. But then you have the problem to access the databasse server... => You need a report builder created with UniGui or other web framework.
  18. I have made some tests just editing the title of the event. Instead using the event title "New Event" i use: <span title="event details...">New Event</span> Displays "event details..." as hint <span onmouseover="alert('Hello');">New Event</span> Calls function alert(). Instead alert() you could use your own javascript function myfunc('EventId').
  19. I have made two changes: 1. The uploading and uploaded files are displayed in the blue area itself. 2. Now everything is in one Frame, so it can be easy included on own forms in other projects. To use it in other projects you can: - copy UfraMultiUpload.pas and UfraMultiUpload.dfm to your project - add UfraMultiUpload.pas to your project - choose "Standard -> Frames" in component palette and insert "fraMultiUpload" on your own form - done MuploadSample_en.zip edit: attachements uploaded again
  20. 1st: In the function "handleFiles(files)" the var "files" contains all files. I use only "var file = files[0];" for getting the first one. You must loop over all files ("for .... files"). 2nd: In the function "handleReaderLoad(evt)" the var "evt.target.result" contains a string like this: <img src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0 vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Roter Punkt" /> You can upload this string (as parameter) to server using function "ajaxRequest()" and then handle it on server using the "onAjaxRequest"-event of the form (or a component) on server. In "onAjaxRequest" on server you must extract the base64-code and decode it to binary file and save it. For decoding base64 there should be functions in Delphi (maybe in IndyComponents). 3rd: The name of the file is in the var "file.name". Send it to the server in the ajaxRequest() as parameter.
  21. For security reasons, browsers do only allow the user to select files manually for upload. For new browsers you can use HTML5 in a TUniHtmlFrame. But users must select or drag&drop files.
  22. If you want to be independant from browser and office installation you can upload your office files to Microsoft Skydrive and there you can get a code to embed the document on a website (UniHtmlFrame).
  23. The question seemed familiar. UniGui is not made (primarily) for remote control. But it should work anyway.
  24. Easiest way is to use a TUniTimer and in "onTimer" change the components on the (web)form, if there was changes (in the vcl-thread). But this will produce traffic and processor usage if the timer interval is too short. The browser session is another thread. It works like two (or more, if more browsers use it at the same time) applications in one. If you use the same form in both, you have two different instances of this form. So you can also use two different forms. Are you the same "UliBru" like here ?
  25. All sessions (VCL-window and browser-window(s)) are separate threads. So, if you want so, you have to synchronize them: http://forums.unigui.com/index.php?/topic/1947-session-manager/page__p__8581__hl__locklist__fromsearch__1&do=findComment&comment=8581 (or use IPC). 2nd problem: you can't (easy) send information from server to browser; so browser must ask the server: use a timer, long polling, websocket, or ... You could make 2 different Forms (or Frames) and create/show them alternatively: if WebMode then "Create + Show web-Form" else "Create + Show Desktop-Form";
×
×
  • Create New...