portality/static/widget/fq_widget_depends_compiled.js
// save the sort options from the current UI
save the sort options from the current UI
save the sort options from the current UI
function saveSortOption() {
            var sortchoice = $('.facetview_orderby', obj).val();
            if (sortchoice.length != 0) {
                var sorting = [];
                if (sortchoice.indexOf('[') === 0) {
                    sort_fields = JSON.parse(sortchoice.replace(/'/g, '"'));
                    for ( var each = 0; each < sort_fields.length; each++ ) {
                        sf = sort_fields[each];
                        sortobj = {};
                        sortobj[sf] = {'order': $('.facetview_order', obj).attr('href')};
                        sorting.push(sortobj);
                    }
                } else {
                    sortobj = {};
                    sortobj[sortchoice] = {'order': $('.facetview_order', obj).attr('href')};
                    sorting.push(sortobj);
                }
                options.sort = sorting;
            } else {
                sortobj = {};
                sortobj["_score"] = {'order': $('.facetview_order', obj).attr('href')};
                sorting = [sortobj];
                options.sort = sorting
            }
        }
function saveSortOption ( ) { var sortchoice = $ ( '.facetview_orderby' , obj ) . val ( ) ; if ( sortchoice . length != 0 ) { var sorting = [ ] ; if ( sortchoice . indexOf ( '[' ) === 0 ) { sort_fields = JSON . parse ( sortchoice . replace ( / ' / g , '"' ) ) ; for ( var each = 0 ; each < sort_fields . length ; each ++ ) { sf = sort_fields [ each ] ; sortobj = { } ; sortobj [ sf ] = { 'order' : $ ( '.facetview_order' , obj ) . attr ( 'href' ) } ; sorting . push ( sortobj ) ; } } else { sortobj = { } ; sortobj [ sortchoice ] = { 'order' : $ ( '.facetview_order' , obj ) . attr ( 'href' ) } ; sorting . push ( sortobj ) ; } options . sort = sorting ; } else { sortobj = { } ; sortobj [ "_score" ] = { 'order' : $ ( '.facetview_order' , obj ) . attr ( 'href' ) } ; sorting = [ sortobj ] ; options . sort = sorting } }
save the sort options from the current UI
save the sort options from the current UI