Jump to content
uniGUI Discussion Forums

nimarufa

uniGUI Subscriber
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

2 Neutral

About nimarufa

  • Rank
    Newbie

Profile Information

  • Gender
    Male
  • Location
    Ufa, Russian Federation

Recent Profile Visitors

112 profile views
  1. nimarufa

    script in uniHTMLFrame

    Please any suggestions
  2. nimarufa

    script in uniHTMLFrame

    Please help to include script of realtime player to uniHTMLFrame. From manual on service the following code must be included in html: <html> <head> <script src="http://192.168.1.111:9786/js/swfobject.js" type="text/javascript"></script> <script type="text/javascript"> var flashvars = { ip:"192.168.1.111", //ip - host port:9786, //port login:"www", //login pass:"aaa", //password uriCamera:"/cameras/0", //uri camera quality:80, //0-100 quality fps:8, //fps sound:false, //microphone ptz:false, //PTZ playOnStart:true, //play video on start logo:true, //logo devline lang:"ru", //language "ru" "en" "cn" name:"video" // by default, use name cameras from the server }; var params = { menu: "false", scale: "noScale", allowFullscreen: "true", allowScriptAccess: "always", bgcolor: "#ffffff" }; var attributes = { id:"flash" }; swfobject.embedSWF("http://192.168.1.111:9786/miniflash.swf", "altContent", "100%", // set as a percentage or absolute size (in pixels) "100%", "11.2.0", "expressInstall.swf", flashvars, params, attributes); </script> <style type="text/css"> html, body { height:100%; overflow:hidden; } body { margin:0; } </style> </head> <body> <div id="altContent"> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p> </div> </body> </html> I want to use it in my application in HTMLFrame the address of host (192.168.1.111) can be changed runtime.
  3. nimarufa

    TUnimEdit popup at tapped position

    Thanks! I'll be waiting for it!
  4. nimarufa

    TUnimEdit popup at tapped position

    Please advice! I need poput text edit window on click at HTML Frame at the clicked position. I'd found two ways how to do it on desktop. One way is pure ExtJS. But no one works on mobile. This code I call via JSInterface.JSAdd var popup=Ext.create('Ext.panel.Panel', { centered: true, // modal: true, // hideOnMaskTap: true, items: [{ xtype: 'textfield', value: 'EditText', name: 'edRange', clearable: false, enableKeyEvents: true, listeners: { painted: function(element, eOpts) {element.focus();}, blur: function(thisEdit, e){popup.destroy();}, keyup: function(thisField, e){ if(e.browserEvent.keyCode==27){popup.destroy();}; // if(e.browserEvent.keyCode==13){ajaxRequest(<popup.parent>,'_edit_range_done',['text='+thisField.getValue()]); popup.destroy();}; } } }], }); Ext.Viewport.add(popup); But the problem is the popup panel with the edit is always centered. If change 'centered' property to false the popup doesnt appear. I'm attaching test sample.There is desktop(2 versions) and moble version. Please some advice. UniGUI 1.70.0.1485. RuntimeEditTest.zip
  5. nimarufa

    DBTreeGrid auto collapsed on update

    Works great!!!! thanks a lot!!!
  6. nimarufa

    DBTreeGrid auto collapsed on update

    Please, any suggestions....
  7. nimarufa

    TUniImage Draw and Update

    Replaced UniImage with UniHTMLFrame In UniFormReady add UniHTMLFrame1.HTML.Text :='<div ID="img_container" style="width:100%; height:100%;"><img src="blank.jpg" id="preloaded_image" /></div>'; in Timer event (when need to repaint picture) - actually not paint to Image but paint to Bitmap or PNG then save it to file. Then create an TImage in JS and fire AJAX when client loaded image (this will done in background!!!) FName:=UniServerModule.NewCacheFileUrl(False, 'png', '', '', url, false); oPNGDest := TPNGObject.Create; try oPNGDest.Assign(bmp); oPNGDest.SaveToFile(FName); finally oPNGDest.Free; end; UniSession.AddJS( 'var my_image = new Image();'+ 'my_image.onload = ajaxRequest(' + self.Image.JSName + ', "ImageUpdated", []);'+ 'my_image.src = '''+url+''';' ); Create AJAX event to HTMLFrame. if( SameText(EventName, 'ImageUpdated') ) then begin UniSession.AddJS('document.getElementById("preloaded_image").src = '''+url+''';'); end; Now the image is in browser cache and it will display very fast, just assign .src to image url. Hope this help someone who use pictures with updating data or drawing to image. Glad to hear any optimizations to more speed up this code.
  8. nimarufa

    TUniImage Draw and Update

    Got 1 Solution!
  9. nimarufa

    TUniImage Draw and Update

    I need to draw updating data to my web application. Due some problems I cannot move all drawing code to JS. The all drawing is done in some library to Bitmap. After that the bitmap is assigned to TUniImage . As i understand unigui does the following: 1. Prepare bitmap on server's cache folder (some jpeg file). 2. Clear existing image. 3. Transfer new bitmap to client 4. Show it in client's browser. At the step 2-3 the image became clear white in browser and the picture is flicker when updated. I'm attaching small test case. I'm using TUniImage because i'm using this drawing on desktop and on mobile platform. Have any suggestion to workaround/minimize this effect? ImageDrawing.zip
  10. nimarufa

    DBTreeGrid auto collapsed on update

    Sorry here is it DBTreeGridTest.zip
  11. nimarufa

    DBTreeGrid auto collapsed on update

    Hi, I've got one problem - after update data in TreeGrid the grid is auto collapsed. I need only update data and keep opened nodes open and closed nodes close. I'm attaching a sample. Way to repoduce: 1. Tap "Expand" or open some nodes. 2. Tap Update The thee will close all nodes automatically. Please help to solve it. Version 1.50.0.1480 Complete
  12. I need component like VirtualTreeView but in unigui. First column is tree, next columns are grid. UniDBTreeGrid is looks like this, but i need to manually operade data in it without database connection. Can any one suggest any unigui component for this? Or how to use UniDBTreeGrid with custom data.
  13. nimarufa

    Mobile form + UniFrame = ExtEvents not work

    Yes, this workaround works! Thanks! Hope painted event will act like afterlayout.
  14. nimarufa

    Mobile form + UniFrame = ExtEvents not work

    Here is it FrameEventTest.zip
  15. When i place Frame on mobile form clientEvents are not working. For Example Ext.panel.Panel afterlayout event. for example function afterlayout(sender, layout, eOpts) { alert('AF event!'); } Frame is creating like this procedure TMainmForm.UnimFormCreate(Sender: TObject); begin CFrame := TMymFrame.Create(self); CFrame.Visible := true; CFrame.Parent := self; end; On desktop form events are working.
×