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
a099b3dc
Commit
a099b3dc
authored
May 04, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove collapsible buttons in corpora view
parent
806eb8f8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
80 additions
and
154 deletions
+80
-154
Docs_dyna_chart_and_table.js
static/js/gargantext/Docs_dyna_chart_and_table.js
+2
-14
Journals_dyna_chart_and_table.js
static/js/gargantext/Journals_dyna_chart_and_table.js
+2
-21
NGrams_dyna_chart_and_table.js
static/js/gargantext/NGrams_dyna_chart_and_table.js
+5
-26
journals.html
templates/pages/corpora/journals.html
+23
-30
terms.html
templates/pages/corpora/terms.html
+15
-22
titles.html
templates/pages/corpora/titles.html
+33
-41
No files found.
static/js/gargantext/Docs_dyna_chart_and_table.js
View file @
a099b3dc
...
...
@@ -69,18 +69,10 @@ function Push2Buffer( NewVal ) {
}
function
Final_UpdateTable
(
action
)
{
// (1) Identifying if the button is collapsed:
var
isCollapsed
=
false
;
var
accordiontext
=
$
(
"#collapseOne"
).
attr
(
"class"
)
if
(
accordiontext
.
indexOf
(
"collapse in"
)
>-
1
)
isCollapsed
=
true
;
var
UpdateTable
=
false
if
(
(
action
==
"click"
&&
!
isCollapsed
)
||
(
action
==
"changerange"
&&
isCollapsed
)
)
{
if
(
action
==
"changerange"
)
{
UpdateTable
=
true
;
$
(
"#corpusdisplayer"
).
html
(
"View by titles"
)
}
else
$
(
"#corpusdisplayer"
).
html
(
"View by titles"
)
}
pr
(
"update table??: "
+
UpdateTable
)
...
...
@@ -522,8 +514,6 @@ function Main_test(Data) {
return
"OK"
}
$
(
"#corpusdisplayer"
).
hide
()
// FIRST portion of code to be EXECUTED:
// (3) Get records and hyperdata for paginator
$
.
ajax
({
...
...
@@ -556,9 +546,7 @@ $.ajax({
var
result
=
Main_test
(
data
.
records
)
$
(
"#corpusdisplayer"
).
show
()
$
(
"#content_loader"
).
remove
()
$
(
"#corpusdisplayer"
).
click
()
console
.
log
(
result
)
},
...
...
static/js/gargantext/Journals_dyna_chart_and_table.js
View file @
a099b3dc
...
...
@@ -100,27 +100,15 @@ function Push2Buffer( NewVal ) {
}
function
Final_UpdateTable
(
action
)
{
// (1) Identifying if the button is collapsed:
var
isCollapsed
=
false
;
var
tableClass
=
$
(
"#journal_table"
).
attr
(
"class"
)
//\bcollapse\b
if
(
tableClass
.
indexOf
(
" collapse "
)
>-
1
)
{
isCollapsed
=
true
;
}
var
UpdateTable
=
false
if
(
(
action
==
"click"
&&
!
isCollapsed
)
||
(
action
==
"changerange"
&&
isCollapsed
)
)
{
if
(
action
==
"changerange"
)
{
UpdateTable
=
true
;
$
(
"#corpusdisplayer"
).
html
(
"Close Folder"
)
}
else
$
(
"#corpusdisplayer"
).
html
(
"View by journals"
)
}
pr
(
"update table??: "
+
UpdateTable
)
if
(
!
UpdateTable
)
return
false
;
//stop whatever you wanted to do.
var
TimeRange
=
AjaxRecords
;
var
dataini
=
(
TheBuffer
[
0
])?
TheBuffer
[
0
]:
oldest
;
...
...
@@ -502,8 +490,6 @@ function Main_test( data , initial) {
$
(
"#corpusdisplayer"
).
hide
()
console
.
log
(
window
.
location
.
href
)
// match corpus_id in the url
...
...
@@ -525,13 +511,8 @@ if (rematch) {
var
result
=
Main_test
(
data
.
by
.
journal
,
"FirstScore"
)
console
.
log
(
result
)
$
(
"#corpusdisplayer"
).
show
()
$
(
"#content_loader"
).
remove
()
$
(
"#corpusdisplayer"
).
click
()
}
});
}
else
{
}
static/js/gargantext/NGrams_dyna_chart_and_table.js
View file @
a099b3dc
...
...
@@ -27,8 +27,10 @@
* Romain Loth
* - minor 2016 modifications + doc
* - unify table ids with ngram ids
* - new api routes + prefetch maplist terms
* - simplify UpdateTable
*
* @version 1.
0 beta
* @version 1.
1
*
* @requires jquery.dynatable
* @requires d3
...
...
@@ -304,27 +306,14 @@ function Final_UpdateTable( action ) {
// console.log("AjaxRecords")
// console.log(AjaxRecords)
// (1) Identifying if the button is collapsed:
var
isCollapsed
=
false
;
var
tableClass
=
$
(
"#terms_table"
).
attr
(
"class"
)
//\bcollapse\b
if
(
tableClass
.
indexOf
(
" collapse "
)
>-
1
)
{
isCollapsed
=
true
;
}
var
UpdateTable
=
false
if
(
(
action
==
"click"
&&
!
isCollapsed
)
||
(
action
==
"changerange"
&&
isCollapsed
)
)
{
if
(
action
==
"changerange"
)
{
UpdateTable
=
true
;
$
(
"#corpusdisplayer"
).
html
(
"Close Term List"
)
}
else
$
(
"#corpusdisplayer"
).
html
(
"View by terms"
)
}
pr
(
"update table??: "
+
UpdateTable
)
if
(
!
UpdateTable
)
return
false
;
//stop whatever you wanted to do.
var
TimeRange
=
AjaxRecords
;
var
dataini
=
(
TheBuffer
[
0
])?
TheBuffer
[
0
]:
oldest
;
...
...
@@ -1893,13 +1882,6 @@ var NGrams = {
"scores"
:
{}
}
$
(
"#corpusdisplayer"
).
hide
()
// if( $("#share_button").length==0 ) {
// $("#ImportList").remove()
// }
// NEW AJAX x 2
...
...
@@ -2071,10 +2053,7 @@ function AfterAjax() {
//
// });
$
(
"#corpusdisplayer"
).
show
()
$
(
"#content_loader"
).
remove
()
$
(
"#corpusdisplayer"
).
click
()
$
(
".nav-tabs a"
).
click
(
function
(
e
){
e
.
preventDefault
();
...
...
templates/pages/corpora/journals.html
View file @
a099b3dc
...
...
@@ -51,36 +51,29 @@
<div
class=
"container"
>
<div
class=
"jumbotron"
>
<div
class=
"row"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
<a
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseOne"
>
<!-- Final_UpdateTable redraws the dynatable if necessary -->
<p
id=
"corpusdisplayer"
onclick=
'Final_UpdateTable("click")'
class=
"btn btn-primary btn-lg"
>
Journals
</p>
</a>
</h4>
</div>
<div
id=
"journal_table"
class=
"panel-collapse collapse in no-transition"
role=
"tabpanel"
>
<div
class=
"panel-body"
>
<div
id=
"div-table"
>
<!-- (table id="my-ajax-table") dynamically set by Journals_dyna_chart_and_table -->
</div>
</div>
</div>
<!-- /div panel-collapse -->
</div>
<!-- /div panel -->
</div>
<!-- /row with the dynatable panels -->
</div>
<!-- /jumbotron -->
<!--
</div> Alignment
</div> (these divs are closed by the menu)
/container -->
<div
class=
"jumbotron"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
Publications by source
</h4>
</div>
<div
class=
"panel-body"
>
<div
id=
"div-table"
>
<!-- (table id="my-ajax-table") dynamically set by Journals_dyna_chart_and_table -->
</div>
</div>
</div>
<!-- /div panel -->
</div>
<!-- /jumbotron -->
</div>
...
...
templates/pages/corpora/terms.html
View file @
a099b3dc
...
...
@@ -49,16 +49,11 @@
<input
type=
"hidden"
id=
"scores_id"
value=
""
></input>
<div
class=
"jumbotron"
>
<div
class=
"row"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
<a
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseOne"
>
<!-- Final_UpdateTable redraws the dynatable if necessary -->
<p
id=
"corpusdisplayer"
onclick=
'Final_UpdateTable("click")'
class=
"btn btn-primary btn-lg"
>
Close term list
</p>
Extracted terms
<!-- <button title='run test function' onclick="doATest()">
TEST
</button> -->
...
...
@@ -79,30 +74,28 @@
</div>
<div
id=
"terms_table"
class=
"panel-collapse collapse in no-transition"
role=
"tabpanel"
>
<div
class=
"panel-body"
>
<div
id=
"div-table"
>
<!-- (table id="my-ajax-table") dynamically set by Ngrams_dyna_chart_and_table -->
</div>
<!-- under the table -->
<p
align=
"right"
>
<button
id=
"Save_All"
class=
"btn btn-primary"
>
Save changes permanently
</button>
</p>
</div>
</div>
<!-- /div panel-collapse -->
<div
id=
"terms_table"
class=
"panel-body"
>
<div
id=
"div-table"
>
<!-- (table id="my-ajax-table") dynamically set by Ngrams_dyna_chart_and_table -->
</div>
<!-- under the table -->
<p
align=
"right"
>
<button
id=
"Save_All"
class=
"btn btn-primary"
>
Save changes permanently
</button>
</p>
</div>
</div>
<!-- /div panel -->
</div>
<!-- /row with the dynatable panels -->
</div>
<!-- /jumbotron -->
<!-- Divs closed by the menu
</div> Alignment
<!--
<button id="ImportList" onclick="GetUserPortfolio();" class="btn btn-warning">
Import a Corpus-List
</button>
</div> container
--!>
-->
</div>
...
...
templates/pages/corpora/titles.html
View file @
a099b3dc
...
...
@@ -51,50 +51,42 @@
<div
class=
"container"
>
<div
class=
"jumbotron"
>
<div
class=
"panel-group"
id=
"accordion"
role=
"tablist"
aria-multiselectable=
"true"
>
<div
class=
"panel panel-body"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
<a
data-toggle=
"collapse"
data-parent=
"#accordion"
href=
"#collapseOne"
>
<p
id=
"corpusdisplayer"
onclick=
'Final_UpdateTable("click")'
class=
"btn btn-primary btn-lg"
style=
"width:200px; margin:0 auto; display:block;"
>
Titles
</h2></p>
</a>
</h4>
<!-- search box with custom function in Docs_dyna_chart_and_tables.js -->
<div
class=
"pull-left"
style=
"margin-top:1.85em; font-size: 16px;"
>
<span
class=
"glyphicon glyphicon-search"
aria-hidden=
"true"
></span>
Search:
<input
type=
"search"
id=
"doubleSearch"
/>
<span
style=
"font-size:70%;"
>
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<!-- Used by the #doubleSearch associated function -->
<input
title=
"Search in Titles"
id=
"searchTI"
name=
"searchTI"
type=
"checkbox"
checked
onclick=
"return false"
>
TI
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<input
title=
"Search in Abstracts"
id=
"searchAB"
name=
"searchAB"
type=
"checkbox"
>
AB
</span>
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<select
id=
"dupFilter"
name=
"dupFilter"
>
<option
value=
"filter_all"
>
All
</option>
<option
value=
"filter_dupl"
>
Duplicates by Title
</option>
</select>
</div>
</div>
<div
id=
"collapseOne"
class=
"panel-collapse collapse no-transition"
role=
"tabpanel"
>
<div
class=
"panel-body"
>
<div
id=
"div-table"
></div>
<p
align=
"right"
>
<button
id=
"move2trash"
class=
"btn btn-primary btn-lg"
>
<span
class=
"glyphicon glyphicon-trash"
aria-hidden=
"true"
></span>
Trash It!
</button>
</p>
</div>
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h4
class=
"panel-title"
>
Publications by title
</h4>
<!-- search box with custom function in Docs_dyna_chart_and_tables.js -->
<div
class=
"pull-left"
style=
"margin-top:1.85em; font-size: 16px;"
>
<span
class=
"glyphicon glyphicon-search"
aria-hidden=
"true"
></span>
Search:
<input
type=
"search"
id=
"doubleSearch"
/>
<span
style=
"font-size:70%;"
>
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<!-- Used by the #doubleSearch associated function -->
<input
title=
"Search in Titles"
id=
"searchTI"
name=
"searchTI"
type=
"checkbox"
checked
onclick=
"return false"
>
TI
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<input
title=
"Search in Abstracts"
id=
"searchAB"
name=
"searchAB"
type=
"checkbox"
>
AB
</span>
<span
class=
"glyphicon glyphicon-filter"
aria-hidden=
"true"
></span>
<select
id=
"dupFilter"
name=
"dupFilter"
>
<option
value=
"filter_all"
>
All
</option>
<option
value=
"filter_dupl"
>
Duplicates by Title
</option>
</select>
</div>
</div>
<div
class=
"panel-body"
>
<div
id=
"div-table"
></div>
<p
align=
"right"
>
<button
id=
"move2trash"
class=
"btn btn-primary btn-lg"
>
<span
class=
"glyphicon glyphicon-trash"
aria-hidden=
"true"
></span>
Trash It!
</button>
</p>
</div>
</div>
</div>
</div>
<!-- here goes import script js/bootstrap/bootstrap-multiselect.js, mais ca marche pas-->
<script
type=
"text/javascript"
src=
"{% static "
js
/
jquery
/
jquery
.
dynatable
.
js
"
%}"
></script>
...
...
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