Jump to content

Sherzod

Moderators
  • Posts

    19793
  • Joined

  • Last visited

  • Days Won

    643

Everything posted by Sherzod

  1. How to store other languages (unicode) in cookies and get it back again var cookieValue = document.getElementsByTagName('input')[0].value; document.cookie = "lboxcook=" + encodeURIComponent(cookieValue); function get_cookie(cookie_name) { var results = document.cookie.match ('(^| ?' + cookie_name + '=([^;]*)(;|$)'); return results ? decodeURIComponent(results[2]) : null; } Farshad, I think in the future, by default, you can use this approach when saving cookies Sincerely.
  2. Hi Hank. One of the solutions, try: UniDBGrid1 -> ClientEvents -> ExtEvents ... add the afterrender function function afterrender(sender, eOpts) { sender.getEl().select('.x-progress-text').each(function (el) {el.setStyle("font-size", "14px")}) } Sincerely.
  3. This method is only allowed to be called for windows that were opened by a script using the window.open method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script. https://developer.mozilla.org/en-US/docs/Web/API/window.close If you are using Mozilla Firefox, enter in the about:config and modify dom.allow_scripts_to_close_windows property to true, then you can use window.close() ...
  4. Hi! If in runtime, try 1. Change TextColor: UniSession.AddJS(UniButton1.JSName + '.badgeEl.setStyle(''color'', ''red'');'); 2. Change BackgroundColor: UniSession.AddJS(UniButton1.JSName + '.badgeEl.setStyle(''background-color'', ''red'');'); Best regards.
  5. Hi Farshad. Hi perjanbr. Thank you for your answers! Sorry, but I understood the question Fenix otherwise ... ​​, ie how to create a custom user-defined function with callback? Is it possible? for example: after the completion of a certain function, the function calls another callback function. Sorry if I was not able to to explain the essence of my question, and if the question is not correct... Sincerely.
  6. Hi Farshad! Creation of user-defined (arbitrary) function with callback... Thank you.
  7. Hi David. Try to understand these examples... http://dev.sencha.com/deploy/ext-4.0.1/examples/tree/treegrid.html http://jsfiddle.net/8JmqL/10/ Sincerely.
  8. 1. UniRadioButton1.Font.Color := $E7D8CC 2. I think there is a bug when using the "UniDBNavigator1.Enabled: = ..." Use it: disabled: UniSession.AddJS(UniDBNavigator1.JSName + '.setDisabled(true)'); enabled: UniSession.AddJS(UniDBNavigator1.JSName + '.setDisabled(false)'); Sincerely.
  9. +1 Hi Farshad! Can you answer us? Can you give an example? Sincerely.
  10. Hi Erich. I think there need to add little time delay and use javascript Try: aktuell_uniCanvas:=TuniCanvas.Create(self); aktuell_uniCanvas.Parent:=aktuell_panel; aktuell_uniCanvas.Left:=1; aktuell_uniCanvas.Top:=1; aktuell_uniCanvas.Width:=20; aktuell_uniCanvas.Height:=20; aktuell_uniCanvas.Pen.Color := clred; aktuell_uniCanvas.Brush.Color := clred; //code below does not have time, but can be used anywhere in the code after creating canvas //aktuell_uniCanvas.Cirlcle(1,1,10); //use UniSession.AddJS('setTimeout('''+ aktuell_uniCanvas.JSName + '.circle(1,1,10)'', 50);'); Rectangle: aktuell_uniCanvas.Rectangle(10,10,100,100); = UniSession.AddJS('setTimeout('''+ aktuell_uniCanvas.JSName + '.rect(10,10,110,110)'', 50);'); ... Sincerely.
  11. And so you can change the value of combobox, try UniDBGrid1 -> ClientEvents -> ExtEvents -> add function sortchange: function sortchange(ct, column, direction, eOpts) { Ext.getCmp(MainForm.UniComboBox1.id).select(Ext.getCmp(MainForm.UniComboBox1.id).getStore().getAt(column.dataIndex)); } Best regards.
  12. Strangely, I have combobox value is updated when I click on any header column! UniGUI version: 0.95.0.1044 Tested in FF 29.0.1
  13. Hi msegura! Sorry, to be honest, the problem is not very clear to me ... I do not see two-way communication with the combobox. If I understand correctly, try to include this code: procedure TMainForm.UniComboBox1Change(Sender: TObject); begin UniSession.AddJS(UniDBGrid1.JSName + '.getStore().sort({ property: ''' + IntToStr(UniComboBox1.ItemIndex) + ''', direction : ''ASC''});'); end; If I do not understand correctly, please again clarify the problem, I'll be glad to help you! Sincerely.
  14. Here is my example of integration, (need jquery). How to use? 1. Download "jquery" from here "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" and copy to the directory "/files/". 2. For this example, you need to download some files: 2.1. http://code.highcharts.com/highcharts.js 2.2. http://code.highcharts.com/highcharts-3d.js 2.3. http://code.highcharts.com/modules/exporting.js they also need to copy to the folder "files" 3. Add CustomFiles in UniServerModule: files/jquery.min.js files/highcharts.js files/highcharts-3d.js files/exporting.js 4. Add CustomCSS in UniServerModule: #container, #sliders { min-width: 310px; max-width: 800px; margin: 0 auto; } #container { height: 400px; } 5. Add "HTMLFrame1" 6. HTMLFrame1.HTML <div id="container"></div> <div id="sliders"> <table> <tr><td>Alpha Angle</td><td><input id="R0" type="range" min="0" max="45" value="15"/> <span id="R0-value" class="value"></span></td></tr> <tr><td>Beta Angle</td><td><input id="R1" type="range" min="0" max="45" value="15"/> <span id="R1-value" class="value"></span></td></tr> </table> </div> 7. HTMLFrame1.AfterScript $(function () { // Set up the chart var chart = new Highcharts.Chart({ chart: { renderTo: 'container', type: 'column', margin: 75, options3d: { enabled: true, alpha: 15, beta: 15, depth: 50, viewDistance: 25 } }, title: { text: 'Chart rotation demo' }, subtitle: { text: 'Test options by dragging the sliders below' }, plotOptions: { column: { depth: 25 } }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }] }); // Activate the sliders $('#R0').on('change', function(){ chart.options.chart.options3d.alpha = this.value; showValues(); chart.redraw(false); }); $('#R1').on('change', function(){ chart.options.chart.options3d.beta = this.value; showValues(); chart.redraw(false); }); function showValues() { $('#R0-value').html(chart.options.chart.options3d.alpha); $('#R1-value').html(chart.options.chart.options3d.beta); } showValues(); }); source: http://www.highcharts.com/demo/3d-column-interactive demo: http://jsfiddle.net/gh/get/jquery/1.9.1/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/3d-column-interactive/ Sincerely.
  15. Hi SohoSoftWare. +1 * FREE FOR NON-COMMERCIAL Do you want to use Highcharts for a personal website, a school site or a non-profit organisation? Then you don't need our permission, just go on! http://www.highcharts.com/license Anyway thanks for sharing...
  16. Hi msegura. Can you give a simple test case? Best regards.
  17. Hi msegura. This approach is suitable? 1. procedure TMainForm.UniTimer1EventHandler(Sender: TComponent; EventName: string; Params: TStrings); begin if (not (Sender as TUniTimer).Enabled) and (EventName = '_start') then begin (Sender as TUniTimer).Enabled := True; end; end; 2. Set enabled: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('ajaxRequest(' + UniTimer1.JSName + ', ''_start'', []);'); end; or just: procedure TMainForm.UniButton1Click(Sender: TObject); begin UniTimer1.Enabled := True end; Sincerely.
  18. I think it depends on what you open in uniURLFrame. If you yourself generate a script, I think you can... can you give an example script?
  19. Hi David. you can, for example, look example C: \ Program Files \ FMSoft \ Framework \ uniGUI \ Demos \ Basic jQuery
  20. Hi All! Maybe someone is interested in the implementation of this plugin with UniGUI ... http://www.sequelsphere.com/extjs-sqlstore/ Sincerely
  21. https://raw.githubusercontent.com/Certun/Ext.ux.plugin.BadgeText/master/BadgeText.js
  22. Please what the problem is, I do not understand.
  23. Hi All! Ext.ux.plugin.BadgeText How to use? 1. Download the file BadgeText.js from here: https://github.com/Certun/Ext.ux.plugin.BadgeText/blob/master/BadgeText.js and copy to the directory /files/ 2. Add CustomFiles in UniServerModule: files/BadgeText.js 3. UniButton1 -> ClientEvents -> UniEvents add beforeInit function function beforeInit(sender) { sender.action = 'badgetext'; sender.plugins = [ { ptype:'badgetext', defaultText: 10, disableOpacity:1, disableBg: 'green', align:'right' } ]; } Use For example: procedure TMainForm.UniButton1Click(Sender: TObject);var bJSName: string; begin bJSName := (Sender as TUniButton).JSName; UniSession.AddJS(bJSName + '.setBadgeText(' + bJSName + '.getBadgeText() + 1);'); end; source: https://github.com/Certun/Ext.ux.plugin.BadgeText demos and more config: https://fiddle.sencha.com/#fiddle/4dc is another similar plugin... https://fiddle.sencha.com/#fiddle/2ar Best regards.
×
×
  • Create New...