Merge branch 'master' of git.cuchulu.com:paramecio/jsutils
Integring changes .
This commit is contained in:
commit
7aeefea0dd
1 changed files with 7 additions and 4 deletions
|
|
@ -330,18 +330,21 @@ $=jQuery;
|
||||||
|
|
||||||
field=options.order_fields[i];
|
field=options.order_fields[i];
|
||||||
|
|
||||||
|
|
||||||
field_pos=this.fields.indexOf(field);
|
field_pos=this.fields.indexOf(field);
|
||||||
|
|
||||||
if(field_pos!=-1) {
|
if(field_pos!=-1) {
|
||||||
|
|
||||||
html_ele='<a href="#" class="change_order" data-field="'+field+'">'+$(this).find('tr:first-child').children().eq(field_pos).html()+'</a> <span id="flag_down_'+field+'" class="order_flag fa fa-caret-square-o-down" style="display:none;"></span><span id="flag_up_'+field+'" class="order_flag fa fa-caret-square-o-up" style="display:none;"></span>';
|
flag_down='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="24" style="fill: currentColor;display: inline-block;vertical-align: -.130em;position:absolute;right:-4px;top:-3px;"><!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M480 496C488.8 496 496 488.8 496 480L496 160C496 151.2 488.8 144 480 144L160 144C151.2 144 144 151.2 144 160L144 480C144 488.8 151.2 496 160 496L480 496zM544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480zM320 416C313.3 416 307 413.2 302.4 408.3L198.4 296.3C191.9 289.3 190.2 279.1 194 270.4C197.8 261.7 206.5 256 216 256L424 256C433.5 256 442.2 261.7 446 270.4C449.8 279.1 448.1 289.3 441.6 296.3L337.6 408.3C333.1 413.2 326.7 416 320 416z"/></svg>';
|
||||||
|
|
||||||
|
flag_up='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640" width="24" style="fill: currentColor;display: inline-block;vertical-align: -.130em;position:absolute;right:-4px;top:-3px;"><!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M160 144C151.2 144 144 151.2 144 160L144 480C144 488.8 151.2 496 160 496L480 496C488.8 496 496 488.8 496 480L496 160C496 151.2 488.8 144 480 144L160 144zM96 160C96 124.7 124.7 96 160 96L480 96C515.3 96 544 124.7 544 160L544 480C544 515.3 515.3 544 480 544L160 544C124.7 544 96 515.3 96 480L96 160zM320 224C326.7 224 333 226.8 337.6 231.7L441.6 343.7C448.1 350.7 449.8 360.9 446 369.6C442.2 378.3 433.5 384 424 384L216 384C206.5 384 197.8 378.3 194 369.6C190.2 360.9 191.9 350.7 198.4 343.7L302.4 231.7C306.9 226.8 313.3 224 320 224z"/></svg>';
|
||||||
|
|
||||||
|
html_ele='<span style="position:relative;display:inline-block;width:100%;"><a href="#" class="change_order" data-field="'+field+'" style="display:inline-block;">'+$(this).find('tr:first-child').children().eq(field_pos).html()+'</a> <span id="flag_down_'+field+'" class="order_flag order_flag_down fa fa-caret-square-o-down" style="display:none;">'+flag_down+'</span><span id="flag_up_'+field+'" class="order_flag fa fa-caret-square-o-up" style="display:none;">'+flag_up+'</span></span>';
|
||||||
|
|
||||||
$(this).find('tr:first-child').children().eq(field_pos).html(html_ele);
|
$(this).find('tr:first-child').children().eq(field_pos).html(html_ele);
|
||||||
|
|
||||||
if(field==order_field) {
|
if(field==order_field) {
|
||||||
|
|
||||||
$(this).find('tr:first-child').children().eq(field_pos).find('.fa-caret-square-o-down').show();
|
$(this).find('tr:first-child').children().eq(field_pos).find('.order_flag_down').show();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue