diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 02:43:19 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-09-29 02:43:19 +0200 |
| commit | df2405cb949e268dda4c880d2685054c0eab4a80 (patch) | |
| tree | e27f01bf29b9fe16dfccc157f2a1f2d6fcb872e4 /ishtar_common/templates/ishtar | |
| parent | fa03f91834500f7589ba1912a681227186d7974e (diff) | |
| download | Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.tar.bz2 Ishtar-df2405cb949e268dda4c880d2685054c0eab4a80.zip | |
Display dynamicaly large tables in windows
Diffstat (limited to 'ishtar_common/templates/ishtar')
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/window_tables/documents.html | 2 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html | 37 |
2 files changed, 38 insertions, 1 deletions
diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html index 9405bc3e8..f1592cc42 100644 --- a/ishtar_common/templates/ishtar/blocks/window_tables/documents.html +++ b/ishtar_common/templates/ishtar/blocks/window_tables/documents.html @@ -1,5 +1,5 @@ {% load i18n %} -<table> +<table class='simple'> <caption>{{caption}}</caption> <tr> <th>{% trans "Title" %}</th> diff --git a/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html new file mode 100644 index 000000000..bd83983f4 --- /dev/null +++ b/ishtar_common/templates/ishtar/blocks/window_tables/dynamic_documents.html @@ -0,0 +1,37 @@ +{% load i18n %} + +<h4>{{caption}}</h4> +<table id='grid_{{name}}' class='jqgrid'></table> +<div id='pager_{{name}}'></div> + +<script type="text/javascript" language='javascript'> + +setTimeout( + function(){ + jQuery("#grid_{{name}}").jqGrid({ + url:'{{source}}', + datatype: "json", + mtype: 'GET', + colNames:['id', '', {{col_names|safe}}], + colModel:[ + {name:'id', index:'id', hidden:true}, + {name:'link', index:'link', width:30}, + {{extra_cols|safe}} + ], + sortname: 'value', + viewrecords: true, + sortorder: "asc", + emptyrecords: "{{no_result}}", + loadtext: "{{loading}}", + pager: '#pager_{{name}}', + width:720, + rowNum:20, + jsonReader : {repeatitems: false}, + loadError: function (jqXHR, textStatus, errorThrown) { + alert("{% trans "An error as occured during search. Check your query fields." %}"); + } + }); +}, 200); + +</script> + |
