Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
29f4cec8
Commit
29f4cec8
authored
Jun 03, 2015
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUGFIX] in papers-table
parent
7b84ce03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
14 deletions
+21
-14
jquery.dynatable.js
static/js/jquery/jquery.dynatable.js
+21
-14
No files found.
static/js/jquery/jquery.dynatable.js
View file @
29f4cec8
...
...
@@ -206,7 +206,10 @@
};
processAll
=
function
(
skipPushState
)
{
$
(
"#multiple_selection"
)[
0
].
checked
=
false
;
if
(
$
(
"#multiple_selection"
).
length
>
0
)
$
(
"#multiple_selection"
)[
0
].
checked
=
false
;
var
data
=
{};
this
.
$element
.
trigger
(
'dynatable:beforeProcess'
,
data
);
...
...
@@ -623,28 +626,32 @@
// For really advanced sorting,
// see http://james.padolsey.com/javascript/sorting-elements-with-jquery/
this
.
sort
=
function
()
{
var
sort
=
[].
sort
,
sorts
=
settings
.
dataset
.
sorts
,
sortsKeys
=
settings
.
dataset
.
sortsKeys
,
sortTypes
=
settings
.
dataset
.
sortTypes
;
var
sort
=
[].
sort
;
var
sorts
=
settings
.
dataset
.
sorts
;
var
sortsKeys
=
settings
.
dataset
.
sortsKeys
;
var
sortTypes
=
settings
.
dataset
.
sortTypes
;
var
sortFunction
=
function
(
a
,
b
)
{
// console.log(a)
// console.log(b)
// console.log(" - -- - - - ")
var
comparison
;
if
(
$
.
isEmptyObject
(
sorts
))
{
comparison
=
obj
.
sorts
.
functions
[
'originalPlacement'
](
a
,
b
);
}
else
{
// // console.log( $.isEmptyObject(sorts) )
// // console.log(sortsKeys)
// console.log("( "+a.name+"|"+a.score+" , "+b.name+"|"+a.score+" )")
for
(
var
i
=
0
,
len
=
sortsKeys
.
length
;
i
<
len
;
i
++
)
{
var
attr
=
sortsKeys
[
i
],
direction
=
sorts
[
attr
],
sortType
=
sortTypes
[
attr
]
||
obj
.
sorts
.
guessType
(
a
,
b
,
attr
);
comparison
=
obj
.
sorts
.
functions
[
sortType
](
a
,
b
,
attr
,
direction
);
// Don't need to sort any further unless this sort is a tie between a and b,
// so break the for loop unless tied
var
attr
=
sortsKeys
[
i
];
var
direction
=
sorts
[
attr
];
var
sortType
=
sortTypes
[
attr
]
||
obj
.
sorts
.
guessType
(
a
,
b
,
attr
);
var
comparison
=
obj
.
sorts
.
functions
[
sortType
](
a
,
b
,
attr
,
direction
);
// // console.log("a: "+a+" | b: "+b)
// console.log("\tattr: "+attr+" | direction: "+direction+" | sortType: "+sortType+" | comparison: "+comparison)
// // Don't need to sort any further unless this sort is a tie between a and b,
// // so break the for loop unless tied
if
(
comparison
!==
0
)
{
break
;
}
}
// console.log(" - -- - - - ")
}
return
comparison
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment