-
Posts
19725 -
Joined
-
Last visited
-
Days Won
639
Content Type
Profiles
Forums
Events
Everything posted by Sherzod
-
Hi Peter. You can remove the title in designtime. for example: MainForm -> BorderStyle -> bsNone This will completely disable the header though and will remove the ability to move/close the window.
-
Hi J. Oriol M. For example, you can use: var dom = Ext.dom.Query.select('.x-tab-default .x-tab-inner'); var el = Ext.get(dom[0]); http://stackoverflow.com/questions/13379148/extjs-get-element-by-div-class http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.ComponentQuery
-
Separately (for columns) found a solution in runtime (I do not know can have the best solution). Try: hide: UniSession.AddJS('Ext.get('+UniDBGrid1.JSName+'.headerCt.columnManager.columns[0].id + "-triggerEl").hide();'); show: UniSession.AddJS('Ext.get('+UniDBGrid1.JSName+'.headerCt.columnManager.columns[0].id + "-triggerEl").show();'); remove: UniSession.AddJS('Ext.get('+UniDBGrid1.JSName+'.headerCt.columnManager.columns[0].id + "-triggerEl").dom.remove();');
-
-
Hi Guillermo E. Paulino. Try the following: 1. .searchBox{ background:url('images/magnifying-glass.gif') no-repeat !important; padding-left:20px; } 2. not onbeforerender, you need to add to afterrender function afterrender(sender, eOpts) { Ext.get(sender.id + '-inputEl').addCls("searchBox"); }
-
http://forums.unigui.com/index.php?/topic/1128-custom-draw-unidbgrid-rows/
-
Hi Semper. You can so, one operator without adding customCSS UniSession.AddJS(WebForm.JSName + '.el.setStyle({"border": "solid 3px red"});');
-
Hi mehmet pak. Well, a simple example, you can like this: 1. Add the form UniHTMLFrame1. 2. UniHTMLFrame1.html add <canvas id="mycanvas" width="400" height="400"> </canvas> 3. UniHTMLFrame1.AfterScript add (function(){ var canvas = document.getElementById('mycanvas'), /** @type {CanvasRenderingContext2D} */ ctx = canvas.getContext('2d'), width = 400, height = 400, half_width = width >> 1, half_height = height >> 1, size = width * (height + 2) * 2, delay = 30, oldind = width, newind = width * (height + 3), riprad = 3, ripplemap = [], last_map = [], ripple, texture, line_width = 20, step = line_width * 2, count = height / line_width; canvas.width = width; canvas.height = height; /* * Water ripple demo can work with any bitmap image * (see example here: http://media.chikuyonok.ru/ripple/) * But I need to draw simple artwork to bypass 1k limitation */ with (ctx) { fillStyle = '#a2ddf8'; fillRect(0, 0, width, height); fillStyle = '#07b'; save(); rotate(-0.785); for (var i = 0; i < count; i++) { fillRect(-width, i * step, width * 3, line_width); } restore(); } texture = ctx.getImageData(0, 0, width, height); ripple = ctx.getImageData(0, 0, width, height); for (var i = 0; i < size; i++) { last_map[i] = ripplemap[i] = 0; } /** * Main loop */ function run() { newframe(); ctx.putImageData(ripple, 0, 0); } /** * Disturb water at specified point */ function disturb(dx, dy) { dx <<= 0; dy <<= 0; for (var j = dy - riprad; j < dy + riprad; j++) { for (var k = dx - riprad; k < dx + riprad; k++) { ripplemap[oldind + (j * width) + k] += 128; } } } /** * Generates new ripples */ function newframe() { var a, b, data, cur_pixel, new_pixel, old_data; var t = oldind; oldind = newind; newind = t; var i = 0; // create local copies of variables to decrease // scope lookup time in Firefox var _width = width, _height = height, _ripplemap = ripplemap, _last_map = last_map, _rd = ripple.data, _td = texture.data, _half_width = half_width, _half_height = half_height; for (var y = 0; y < _height; y++) { for (var x = 0; x < _width; x++) { var _newind = newind + i, _mapind = oldind + i; data = ( _ripplemap[_mapind - _width] + _ripplemap[_mapind + _width] + _ripplemap[_mapind - 1] + _ripplemap[_mapind + 1]) >> 1; data -= _ripplemap[_newind]; data -= data >> 5; _ripplemap[_newind] = data; //where data=0 then still, where data>0 then wave data = 1024 - data; old_data = _last_map[i]; _last_map[i] = data; if (old_data != data) { //offsets a = (((x - _half_width) * data / 1024) << 0) + _half_width; b = (((y - _half_height) * data / 1024) << 0) + _half_height; //bounds check if (a >= _width) a = _width - 1; if (a < 0) a = 0; if (b >= _height) b = _height - 1; if (b < 0) b = 0; new_pixel = (a + (b * _width)) * 4; cur_pixel = i * 4; _rd[cur_pixel] = _td[new_pixel]; _rd[cur_pixel + 1] = _td[new_pixel + 1]; _rd[cur_pixel + 2] = _td[new_pixel + 2]; } ++i; } } } canvas.onmousemove = function(/* Event */ evt) { disturb(evt.offsetX || evt.layerX, evt.offsetY || evt.layerY); }; setInterval(run, delay); // generate random ripples var rnd = Math.random; setInterval(function() { disturb(rnd() * width, rnd() * height); }, 700); })(); Sincerely...
-
Hi Hank. If I understand correctly, you may like this: Try: 1. Edit CSS in ServerModule: uniServerModule -> CustomCSS add .x-tab-default .x-tab-inner { font-size: 9px; } 2. Or after render uniPageControl1 function afterrender (sender, eOpts) { Ext.select('.x-tab-default .x-tab-inner').setStyle('font-size', '9px') } 3. Or runtime: UniSession.AddJS('Ext.select(''.x-tab-default .x-tab-inner'').setStyle(''font-size'',''9px'');'); But these changes will affect all PageControl (and controls that use these classes)!
-
One of the solutions: UniDBGrid1 -> ClientEvents -> ExtEvents (Ext.grid.Panel) add afterrender function afterrender(sender, eOpts) { sender.dockedItems.items[1].items.get('first').setTooltip(); sender.dockedItems.items[1].items.get('prev').setTooltip(); sender.dockedItems.items[1].items.get('next').setTooltip(); sender.dockedItems.items[1].items.get('last').setTooltip(); sender.dockedItems.items[1].items.get('refresh').setTooltip(); }
-
It's entirely up to the proxy as to whether or not it will send the http_x_forwarded_for header. Some will and some won't. Whichever proxy you were using when you printed the $_SERVER variable, hasn't send the header. Even if all proxies did send the header, you would still have a problem because anyone can spoof the http_x_forwarded_for header and so if your script treats that as the real IP, then someone could spoof it to circumvent your IP check. The best you can do if use $_SERVER['REMOTE_ADDR'] and forget about relying on http_x_forwarded_for. Yes users of proxies will be able to visit your site under a new IP, but this is better than the ability for all users to spoof the IP in http_x_forwarded_for. As an aid you could maintain a list of known proxies but again this won't ultimately give you the real client IP, it could only tell you if the IP is in your proxy list.
-
Hi Bresler. Thank you for your response. I tried this code in the example "C: \ Program Files \ FMSoft \ Framework \ uniGUI \ Demos \ GridEditors", not work. Thank you.
-
How to identify a user who sits across PROXY? Common non-standard request headers: ... X-Forwarded-For a de facto standard for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer X-Forwarded-For: client1, proxy1, proxy2 X-Forwarded-For: 129.78.138.66, 129.78.64.103 http://en.wikipedia.org/wiki/List_of_HTTP_header_fields But, it does not work ...: UniSession.RequestHeader ['HTTP_X_FORWARDED_FOR']; Who can help? Thank you.
-
http://try.sencha.com/extjs/4.0.7/examples/charts/gauge/viewer.html How use: 1. Add to form UniChart1 2. UniChart1.Legend.Visible := False; 3. Add UniChart1 - > ClientEvents -> UniEvents add chart.beforeInit(sender) function chart.beforeInit(sender){ var store = Ext.create('Ext.data.JsonStore', { fields: ['value'], data: [ { 'value':70 } ] }); sender.store = store; //sender.width = 200; sender.margin = 20; sender.height = 200; sender.animate = true; sender.animate = { easing: 'bounceOut', //easing: 'elasticIn', duration: 1000 }; sender.insetPadding = 30; sender.axes = [{ type: 'gauge', position: 'gauge', minimum: 0, maximum: 100, steps: 10, margin: 10 }]; sender.series = [{ type: 'gauge', field: 'value', donut: 30, colorSet: ['#F49D10', '#ddd'] }]; } Result: setValue: UniSession.AddJS('Ext.getCmp('+UniChart1.JSName+'.items.getAt(0).id).store.getAt(0).set(''value'', Math.round(Math.random()*100));'); UniSession.AddJS('Ext.getCmp('+UniChart1.JSName+'.items.getAt(0).id).store.getAt(0).set(''value'', 90);');
-
If the question is still relevant var myText = yourUniHTMLMemoJSName.getValue().replace(/<br\s*[\/]?>/gi, '\n'); myText = myText.replace(/<\/?[^>]+(>|$)/g, ''); alert(myText); //tested window.clipboardData.setData("Text", myText); //not tested or may need to use jQuery: http://jsfiddle.net/8kEAF/1/
- 1 reply
-
- 1
-
Hi Kanatshym. Try: http://jsfiddle.net/Vandeplas/5aKdc/3/ yourGridJSName.store.sorters.clear(); yourGridJSName.view.refresh();
-
You are welcome!
-
Or runtime or desingtime: UniTabSheet1.TabVisible := False; UniTabSheet2.TabVisible := False; does not help?
-
in runtime: uses ... UniGUIApplication ... procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();'); end; Or runtime or desingtime: UniTabSheet1.TabVisible := False; UniTabSheet2.TabVisible := False; ....
-
Solution: Hide: UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.hide();'); Show: UniSession.AddJS(UniPageControl1.JSName + '.tabPanel.show();'); http://forums.unigui.com/index.php?/topic/2939-how-to-hide-header/&do=findComment&comment=17616 or hide / show by index, example index=2 Hide: UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.hide();'); Show: UniSession.AddJS(UniPageControl1.JSName + '.items.getAt(0).items.getAt(2).tab.show();');
-
http://forums.unigui.com/index.php?/topic/3751-how-use-accordion-layout/&do=findComment&comment=17929
-
Hi. Try this: UniPanel1 -> ClientEvents -> UniEvents add beforeInit function beforeInit(sender) { sender.layout = 'accordion'; sender.items = [{ title: 'Panel 1', html: 'Panel 1 content' }, { title: 'Panel 2', html: 'Panel 2 content' }, { title: 'Panel 3', html: 'Panel 3 content' }]; }
-
Hi codeb! Try this: UniDBGrid1 -> ClientEvents -> ExtEvents add reconfigure function reconfigure(sender, store, columns, oldStore, the, eOpts) { // columns[your_column_index] columns[0].width = 110; columns[0].renderer = function (v, m, r) { var id = Ext.id();Ext.defer(function () {Ext.widget('progressbar', { renderTo: id, value: v / 100, width: 100 });}, 50);return Ext.String.format('<div id="{0}"></div>', id);}; } http://ext4all.com/post/progress-bar-inside-a-grid-cell Sincerely.