Show Posts
|
Pages: [1] 2
|
4
|
General Category / EasyUI for jQuery / pivotgrid : styling and i18n
|
on: November 02, 2020, 04:30:45 AM
|
Hi all I am testing pivotgrid component, but I am facing some issues and this component is not well documented : - how to use i18n to set field names and column titles properly ? - how to style column headers ? (just want to add some links and put background color) - I want to style some cells with testing values which are not values of the cell, but parts of my json response : how to ? (only row and value parameters available) thx a lot for your support code example : $('#pg').pivotgrid({ title:'Synthèse des participations délégataires à vos campagnes', url:'${pageContext.request.contextPath}/rest/campagnes/tdb/', method:'get', pivot:{ rows:['relationActive','raisonSocialeDelegataire'], columns:['libelleCampagneMere'], values:[ {field:'inclus', op:'sum', formatter:function(value,row,index){ if (value != null) { if (value==1) return "<center><img align='center' title='" + i18n_messages["lib.yes"] + "' src='"+appContext+"/resources/img/ico_ok.png' width='16' height='16'/></center>"; if (value==0) return ""; if (value>1) return "<center>"+value+"</center>"; } return ""; }} ] }, i18n: { columns: ['test1','test2'] }, frozenColumnTitle:'<span style="font-weight:bold">Mes délégataires / Campagnes</span>', valuePrecision:0 }) }
example datas : [ { "libelleCampagneMere":"ddsdsq", "idCampagneMere":31, "raisonSocialeDelegataire":"test", "relationActive":"Relations Actives", "idDelegataire":1241, "idCampagneDelegataire":0, "score":-1, "inclus":0, "totalInclus":1, "statutCampagneDelegataire":null, "statutCampagneDelegant":"Clôturée" }, { "libelleCampagneMere":"dsqdsq", "idCampagneMere":29, "raisonSocialeDelegataire":"test", "relationActive":"Relations Actives", "idDelegataire":1241, "idCampagneDelegataire":0, "score":-1, "inclus":0, "totalInclus":1, "statutCampagneDelegataire":null, "statutCampagneDelegant":"Clôturée" } ]
|
|
|
5
|
General Category / EasyUI for jQuery / Re: Layouts : content glitter/flash during page setup
|
on: May 07, 2019, 07:26:49 AM
|
I finally found a simple solution : - define html body invisible by default with CSS : <style> html { visibility:hidden; } </style> - set it visible on document.ready event (at the end of the page) : <script> $(document).ready(function() { document.getElementsByTagName("html")[0].style.visibility = "visible"; }); </script>
|
|
|
6
|
General Category / EasyUI for jQuery / Layouts : content glitter/flash during page setup
|
on: May 07, 2019, 02:46:21 AM
|
Hi
I'm facing a graphical issue with my layout contents loading on screen : I setup a basic layout with east, west and center regions : when I reload any page, we see for a short time the raw content (not rendered) of all the regions and buttons aligned on the left side of the screen, and disappear when the layout is rendered
--> Is there any way to mask this raw content until the layout framework and buttons are ready to be screened ? (an option like "showContentOnReadyState" ?)
here's two screenshot to illustrate my words thanks a lot
|
|
|
7
|
General Category / EasyUI for jQuery / Re: Deleting datagrid row
|
on: March 12, 2019, 04:27:25 PM
|
or this smarter way : document.addEventListener('keydown', function(event) { const key = event.key; // const {key} = event; ES6+ if (key === "Delete") { var row = $('#dg').datagrid('getSelected'); if (row){ alert("Deleting rowid : "+row.id); } } });
|
|
|
10
|
General Category / EasyUI for jQuery / switch to focus a tab on a validation error
|
on: March 01, 2019, 04:19:08 AM
|
Hi, I have a form dispatched in several Jeasyui tabs. when I submit my form on the last tab and forgot to fill a mandatory input in the first tab, nothing happen because validation function do not raise/focus on the fisrt tab to show the error. is it possible to raise the tab containing the error ? I saw a invalidHandler in JQuery but don't seems to work with Jeasyui : $(function(){ $('#formAbonne').form({ ajax:false, onSubmit:function(){ return $(this).form('validate'); }, invalidHandler: function(e, validator){ if(validator.errorList.length) $('#tabs a[href="#' + jQuery(validator.errorList[0].element).closest(".tab-pane").attr('id') + '"]').tab('show') } }); });
|
|
|
14
|
General Category / EasyUI for jQuery / window with href not draggable
|
on: October 07, 2018, 01:17:50 AM
|
Hi I'm facing an issue with easyui-window object. When I try to open an empty window, the window open normally and is draggable : <div id="mypopup" closable="true" draggable="true" class="easyui-window" title="Hello" data-options="modal:false,closed:true,iconCls:'icon-man'" style="width:800px;height:520px;padding:10px;"> </div> ... $('#mypopup').window('open'); but if I add a href attribute on the window to load content with XHR before opening, the window opens with the right content well BUT is no more draggable (closing, mini/maximazing is ok): $('#mypopup).panel({href:'http://localhost/test.php'}); $('#mypopup').window('open'); I also try with window's refresh method, but same result : $('#mypopup').window('refresh', 'http://localhost/test.php'); what's the matter ? thanks all
|
|
|
15
|
General Category / EasyUI for jQuery / div.html(), div.load() and JeasyUI styles
|
on: October 04, 2018, 03:28:10 AM
|
Hi all I'm trying to fill a div with JeasyUI widgets, by using JQuery's .html() and load() method. but when I put Jeasyui content in the div, it didn't render correctly. for example, a simple button in my page renders correctly, but when I try to load a Jeasyui button in a div content, it render only a link, not a button, like Jeasyui CSS was not found : <!DOCTYPE html> <html> <head> <title>Basic Form - jQuery EasyUI Demo</title> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/icon.css"> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> </head> <body> <a id="btn" href="#" onclick="load()" class="easyui-linkbutton">click to load, this not work</a>
<div id="mydiv"> </div> <script> function load() { $('#mydiv').html(' <a id="btn2" href="#" class="easyui-linkbutton">not a jeasyui button</a>'); } </script> </body> </html> any idea ? thanks a lot
|
|
|
|