Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Annotation-System
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
14
Issues
14
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Annotation-Pushers
Annotation-System
Commits
3d7add5b
Commit
3d7add5b
authored
Jan 21, 2018
by
Matt Mascarenhas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cinera: Handle sorting state separately from UI
Also add user-select: none
parent
d7d27f59
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
cinera/cinera.c
cinera/cinera.c
+2
-2
cinera/cinera.css
cinera/cinera.css
+3
-0
cinera/cinera_search.js
cinera/cinera_search.js
+11
-12
No files found.
cinera/cinera.c
View file @
3d7add5b
...
...
@@ -14,7 +14,7 @@ typedef struct
version
CINERA_APP_VERSION
=
{
.
Major
=
0
,
.
Minor
=
5
,
.
Patch
=
2
8
.
Patch
=
2
9
};
// TODO(matt): Copy in the DB 3 stuff from cinera_working.c
...
...
@@ -4388,7 +4388,7 @@ IndexToBuffer(buffers *CollationBuffers) // NOTE(matt): This guy malloc's Collat
" <div id=
\"
cineraResults
\"
></div>
\n
"
"
\n
"
" <div id=
\"
cineraIndex
\"
class=
\"
%s
\"
>
\n
"
" <div id=
\"
cineraIndexSort
\"
data-id=
\"
chronal
\"
>Sort: Old to New ⏶</div>
\n
"
" <div id=
\"
cineraIndexSort
\"
>Sort: Old to New ⏶</div>
\n
"
" <div id=
\"
cineraIndexEntries
\"
>
\n
"
,
StringsDiffer
(
Config
.
Theme
,
""
)
?
Config
.
Theme
:
Config
.
ProjectID
,
StringsDiffer
(
Config
.
Theme
,
""
)
?
Config
.
Theme
:
Config
.
ProjectID
);
...
...
cinera/cinera.css
View file @
3d7add5b
...
...
@@ -45,6 +45,9 @@
display
:
inline-block
;
padding
:
5px
;
cursor
:
pointer
;
user-select
:
none
;
-moz-user-select
:
none
;
-webkit-user-select
:
none
;
}
#cineraIndex
#cineraIndexEntries
{
...
...
cinera/cinera_search.js
View file @
3d7add5b
...
...
@@ -9,22 +9,21 @@ if (location.hash && location.hash.length > 0) {
var
indexContainer
=
document
.
getElementById
(
"
cineraIndex
"
);
var
indexSort
=
indexContainer
.
querySelector
(
"
#cineraIndexSort
"
);
var
indexEntries
=
indexContainer
.
querySelector
(
"
#cineraIndexEntries
"
);
var
indexSortChronological
=
true
;
indexSort
.
addEventListener
(
"
click
"
,
function
(
ev
)
{
switch
(
this
.
getAttribute
(
"
data-id
"
)
)
if
(
indexSortChronological
)
{
case
"
chronal
"
:
this
.
setAttribute
(
"
data-id
"
,
"
reverse_chronal
"
);
this
.
firstChild
.
nodeValue
=
"
Sort: New to Old ⏷
"
indexEntries
.
classList
.
add
(
"
sort_reverse
"
);
break
;
case
"
reverse_chronal
"
:
this
.
setAttribute
(
"
data-id
"
,
"
chronal
"
);
this
.
firstChild
.
nodeValue
=
"
Sort: Old to New ⏶
"
indexEntries
.
classList
.
remove
(
"
sort_reverse
"
);
break
;
this
.
firstChild
.
nodeValue
=
"
Sort: New to Old ⏷
"
indexEntries
.
classList
.
add
(
"
sort_reverse
"
);
}
})
else
{
this
.
firstChild
.
nodeValue
=
"
Sort: Old to New ⏶
"
indexEntries
.
classList
.
remove
(
"
sort_reverse
"
);
}
indexSortChronological
=
!
indexSortChronological
;
});
var
lastQuery
=
null
;
var
resultsToRender
=
[];
...
...
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