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
eecabef5
Commit
eecabef5
authored
Jul 25, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terms table: new hybrid save/import button
parent
dee8e918
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
30 deletions
+28
-30
NGrams_dyna_chart_and_table.js
static/lib/gargantext/NGrams_dyna_chart_and_table.js
+24
-18
terms.html
templates/pages/corpora/terms.html
+4
-12
No files found.
static/lib/gargantext/NGrams_dyna_chart_and_table.js
View file @
eecabef5
...
...
@@ -1413,13 +1413,6 @@ $("#Clean_All").click(function(){
// $("#Clean_All, #Save_All").attr( "disabled", "disabled" );
});
$
(
"#Save_All"
).
click
(
function
(){
SaveLocalChanges
()
});
$
(
"#Save_All_Bottom"
).
click
(
function
(){
SaveLocalChanges
()
});
// find all the consequences of changes from MAP => MAIN
// -----------------------------------------------------
...
...
@@ -2310,23 +2303,36 @@ function isNumeric(n) {
// (it can only go back OFF with a save action via page reload)
function
toggleNeedSave
()
{
var
icons
=
$
(
".needsaveicon"
)
var
boxes
=
$
(
'.savediv'
)
var
topButton
=
$
(
'#ImportListOrSaveAll'
)
var
botButton
=
$
(
'#Save_All_Bottom'
)
// change the status icons
$
(
".needsaveicon"
).
removeClass
(
"glyphicon-floppy-saved"
);
$
(
".needsaveicon"
).
addClass
(
"glyphicon-floppy-remove"
);
$
(
".needsaveicon"
).
css
(
"color"
,
"red"
);
$
(
".needsaveicon"
).
css
(
"font-size"
,
"120%"
);
icons
.
removeClass
(
"glyphicon-floppy-saved"
);
icons
.
removeClass
(
"glyphicon-import"
);
icons
.
addClass
(
"glyphicon-exclamation-sign"
);
icons
.
css
(
"color"
,
"red"
);
icons
.
css
(
"font-size"
,
"120%"
);
// give new text to the hybrid save/import button
topButton
.
html
(
"<b>Save all changes</b>"
)
// save_divs get a new tooltip title
$
(
'.savediv'
)
.
prop
(
'title'
,
"Click to save all changes to DB"
)
boxes
.
prop
(
'title'
,
"Click to save all changes to DB"
)
// activate the buttons
$
(
'#Save_All'
).
prop
(
'disabled'
,
false
)
;
$
(
'#Save_All'
).
removeClass
(
"btn-muted"
);
$
(
'#Save_All'
).
addClass
(
"btn-success"
);
topButton
.
prop
(
'disabled'
,
false
)
;
topButton
.
removeClass
(
"btn-warning"
);
topButton
.
addClass
(
"btn-success"
);
botButton
.
prop
(
'disabled'
,
false
)
;
botButton
.
removeClass
(
"btn-muted"
);
botButton
.
addClass
(
"btn-success"
);
$
(
'#Save_All_Bottom'
).
prop
(
'disabled'
,
false
)
;
$
(
'#Save_All_Bottom'
).
removeClass
(
"btn-muted
"
);
$
(
'#Save_All_Bottom'
).
addClass
(
"btn-success
"
);
// bind the onclick events (it also replaces the default import onclick for the hybrid button)
topButton
.
attr
(
"onclick"
,
"SaveLocalChanges()
"
);
botButton
.
attr
(
"onclick"
,
"SaveLocalChanges()
"
);
// toggle the global var ON
_NeedSave
=
true
...
...
templates/pages/corpora/terms.html
View file @
eecabef5
...
...
@@ -126,19 +126,11 @@ em {
</center>
</h2>
<div
class=
"savediv pull-left"
style=
"margin-top:1.5em;padding-right:1em;"
title=
"No changes to save"
>
<!-- need save status -->
<span
class=
"needsaveicon glyphicon glyphicon-floppy-saved"
></span>
<!-- save button -->
<button
id=
"Save_All"
class=
"btn btn-muted"
disabled
style=
"font-size:120%"
>
<b>
Save all changes
</b>
</button>
<br/>
<br/>
<!-- import icon -->
<span
class=
"glyphicon glyphicon-import"
></span>
<!-- save/import icon -->
<span
class=
"needsaveicon glyphicon glyphicon-import"
></span>
<button
id=
"ImportList"
class=
"btn btn-warning"
style=
"font-size:120%"
<!-- save/import button -->
<button
id=
"ImportListOrSaveAll"
class=
"btn btn-warning"
style=
"font-size:120%"
onclick=
"$('#csvimport').modal('show');"
>
<b>
Import a Termlist
</b>
</button>
...
...
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