Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
145d39af
Commit
145d39af
authored
Jul 13, 2017
by
Piotr Gawron
Browse files
css is generated via build process (it also includes dependeent css)
parent
6ffbd459
Changes
9
Hide whitespace changes
Inline
Side-by-side
frontend-js/package.json
View file @
145d39af
...
...
@@ -4,9 +4,13 @@
"description"
:
"frontentd for minerva google maps interface"
,
"main"
:
"minerva.js"
,
"scripts"
:
{
"build"
:
"rm -rf dist & rmdir /q /s dist & mkdir dist & browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js "
,
"build:css"
:
"cleancss -o dist/minerva.css src/main/css/*.css node_modules/dual-listbox/dist/*.css "
,
"build:js"
:
"browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js "
,
"//"
:
"rm -rf dist & rmdir /q /s dist & mkdir dist & browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js & uglifyjs --compress --mangle --in-source-map dist/minerva.js.map --source-map-include-sources --source-map dist/minerva.min.js.map -o dist/minerva.min.js dist/minerva.js"
,
"build-deploy"
:
"rm -rf dist & rmdir /q /s dist & mkdir dist & browserify --debug --standalone minerva src/main/js/minerva.js | exorcist dist/minerva.js.map > dist/minerva.js & copy /Y
\"
dist
\\
*
\"
\"
C:/Program Files/apache-tomcat-7.0.72/webapps/minerva/resources/js
\"
"
,
"build-deploy"
:
"npm run build && npm run deploy"
,
"build"
:
"npm run clean && npm run build:css && npm run build:js"
,
"clean"
:
"rm -rf dist & rmdir /q /s dist & mkdir dist"
,
"deploy"
:
"copy /Y
\"
dist
\\
*.js*
\"
\"
C:/Program Files/apache-tomcat-7.0.72/webapps/minerva/resources/js
\"
&& copy /Y
\"
dist
\\
*.css
\"
\"
C:/Program Files/apache-tomcat-7.0.72/webapps/minerva/resources/css
\"
"
,
"lint"
:
"jshint src/."
,
"test"
:
"istanbul cover node_modules/mocha/bin/_mocha -- --recursive src/test/js"
},
...
...
@@ -17,6 +21,7 @@
"bootstrap"
:
"^3.3.7"
,
"browserify"
:
"^13.1.1"
,
"chai"
:
"^3.5.0"
,
"clean-css-cli"
:
"^4.1.6"
,
"datatables.net"
:
"^1.10.13"
,
"exorcist"
:
"^0.4.0"
,
"file-url"
:
"^2.0.0"
,
...
...
web/src/main/webapp/resources
/css/global.css
→
frontend-js/src/main
/css/global.css
View file @
145d39af
File moved
frontend-js/src/main/js/gui/export/ElementExportPanel.js
View file @
145d39af
...
...
@@ -4,6 +4,7 @@
var
Panel
=
require
(
'
../Panel
'
);
var
DualListbox
=
require
(
'
dual-listbox
'
).
DualListbox
;
var
GuiConnector
=
require
(
'
../../GuiConnector
'
);
var
logger
=
require
(
'
../../logger
'
);
var
Functions
=
require
(
'
../../Functions
'
);
...
...
@@ -29,10 +30,18 @@ ElementExportPanel.prototype._createGui = function() {
ElementExportPanel
.
prototype
.
init
=
function
()
{
var
self
=
this
;
var
element
=
self
.
getElement
();
return
ServerConnector
.
getConfiguration
().
then
(
function
(
configuration
)
{
var
configuration
;
return
ServerConnector
.
getConfiguration
().
then
(
function
(
result
)
{
configuration
=
result
;
var
typeDiv
=
self
.
_createSelectTypeDiv
(
configuration
.
getElementTypes
());
element
.
appendChild
(
typeDiv
);
element
.
appendChild
(
self
.
_createSelectColumnDiv
());
return
ServerConnector
.
getProjectStatistics
(
self
.
getProject
().
getProjectId
());
}).
then
(
function
(
statistics
)
{
var
miriamDiv
=
self
.
_createMiriamTypeDiv
(
statistics
);
element
.
appendChild
(
miriamDiv
);
new
DualListbox
(
"
.minerva-multi-select
"
);
$
(
window
).
trigger
(
'
resize
'
);
});
}
...
...
@@ -66,6 +75,33 @@ ElementExportPanel.prototype._createSelectTypeDiv = function(elementTypes) {
return
typeDiv
;
}
ElementExportPanel
.
prototype
.
_createMiriamTypeDiv
=
function
(
statistics
)
{
var
typeDiv
=
Functions
.
createElement
({
type
:
"
div
"
,
name
:
"
miriamSelectDiv
"
,
});
var
annotations
=
statistics
.
getElementAnnotations
();
var
selectElement
=
Functions
.
createElement
({
type
:
"
select
"
,
className
:
"
minerva-multi-select
"
});
typeDiv
.
appendChild
(
selectElement
);
for
(
var
i
=
0
;
i
<
annotations
.
length
;
i
++
)
{
var
miriamType
=
annotations
[
i
].
miriamType
;
var
count
=
annotations
[
i
].
count
;
var
option
=
new
Option
();
option
.
value
=
miriamType
.
getName
();
option
.
text
=
miriamType
.
getName
()
+
"
"
+
count
;
selectElement
.
appendChild
(
option
);
}
logger
.
debug
(
DualListbox
);
return
typeDiv
;
};
ElementExportPanel
.
prototype
.
_createSelectColumnDiv
=
function
()
{
var
self
=
this
;
var
columnDiv
=
Functions
.
createElement
({
...
...
frontend-js/src/main/js/map/data/ProjectStatistics.js
View file @
145d39af
...
...
@@ -8,8 +8,6 @@ function ProjectStatistics(data, configuration) {
// call super constructor
ObjectWithListeners
.
call
(
this
);
logger
.
debug
(
data
);
this
.
setReactionAnnotations
(
data
.
reactionAnnotations
,
configuration
);
this
.
setElementAnnotations
(
data
.
elementAnnotations
,
configuration
);
}
...
...
@@ -45,4 +43,8 @@ ProjectStatistics.prototype.setElementAnnotations = function(elementAnnotations,
}
};
ProjectStatistics
.
prototype
.
getElementAnnotations
=
function
()
{
return
this
.
_elementAnnotations
;
};
module
.
exports
=
ProjectStatistics
;
frontend-js/src/main/js/minerva.js
View file @
145d39af
...
...
@@ -585,6 +585,7 @@ var minerva = {
createExport
:
createExport
,
ServerConnector
:
OriginalServerConnector
,
GuiConnector
:
OriginalGuiConnector
,
DualListbox
:
require
(
'
dual-listbox
'
).
DualListbox
,
};
module
.
exports
=
minerva
;
frontend-js/src/test/js/mocha-config.js
View file @
145d39af
...
...
@@ -24,6 +24,17 @@ global.window.$ = $;
// additions to jsdom implementations:
global
.
Option
=
window
.
Option
;
var
originalCreateElement
=
document
.
createElement
;
document
.
createElement
=
function
(
arg
)
{
var
result
=
originalCreateElement
.
call
(
this
,
arg
);
//woraround for: https://github.com/tmpvar/jsdom/issues/961
if
(
"
li
"
===
arg
)
{
result
.
dataset
=
[];
}
return
result
;
};
window
.
open
=
function
()
{
var
result
=
{};
result
.
focus
=
function
()
{
...
...
web/src/main/webapp/WEB-INF/components/admin/header.xhtml
View file @
145d39af
...
...
@@ -4,7 +4,7 @@
xmlns:ui=
"http://java.sun.com/jsf/facelets"
xmlns:p=
"http://primefaces.org/ui"
>
<h:outputStylesheet
library=
"css"
name=
"
global
.css"
/>
<h:outputStylesheet
library=
"css"
name=
"
minerva
.css"
/>
<div
class=
"minerva-header"
>
<a
href=
"#{request.contextPath}/?id=#{mapMB.currentMapId}"
class=
"mainTitle"
><i
class=
"fa fa-home"
style=
"font-size:17px"
></i>
#{mapMB.currentProject.name}
</a>
...
...
web/src/main/webapp/export-new.xhtml
View file @
145d39af
...
...
@@ -45,7 +45,7 @@ function initMap(){
</h:head>
<h:body
onload=
"initMap();"
>
<h:outputStylesheet
library=
"css"
name=
"style.css"
/>
<h:outputStylesheet
library=
"css"
name=
"
global
.css"
/>
<h:outputStylesheet
library=
"css"
name=
"
minerva
.css"
/>
<h:outputStylesheet
library=
"css"
name=
"pileup.css"
/>
<h:outputStylesheet
library=
"css"
name=
"bootstrap.min.css"
/>
...
...
web/src/main/webapp/index.xhtml
View file @
145d39af
...
...
@@ -48,7 +48,7 @@ function initMap(){
</h:head>
<h:body
onload=
"initMap();"
>
<h:outputStylesheet
library=
"css"
name=
"style.css"
/>
<h:outputStylesheet
library=
"css"
name=
"
global
.css"
/>
<h:outputStylesheet
library=
"css"
name=
"
minerva
.css"
/>
<h:outputStylesheet
library=
"css"
name=
"pileup.css"
/>
<h:outputStylesheet
library=
"css"
name=
"bootstrap.min.css"
/>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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