--------------------------------------------------------------------------------
/src/main/designs/blue_users/lists.json:
--------------------------------------------------------------------------------
1 | {
2 | "_id": "_design/lists",
3 | "language": "javascript",
4 | "views": {
5 | "emails": {
6 | "map": "function(doc) { if(doc.email && doc.name) { emit(doc.name, doc.email); } }"
7 | }
8 | "names": {
9 | "map": "function(doc) { if(doc.name) { emit(doc.name, null); } }"
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/blue-dist/src/jsvc/blue-stop.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | /usr/bin/jsvc \
4 | -wait 10 \
5 | -java-home /usr/lib/jvm/default-java \
6 | -cp $install_dir/bin/blue-launcher.jar \
7 | -user $blue_user \
8 | -pidfile /var/run/bluelatex.pid \
9 | -outfile $log_dir/bluelatex.out \
10 | -errfile $log_dir/bluelatex.err \
11 | -stop \
12 | org.gnieh.blue.launcher.Main
13 |
--------------------------------------------------------------------------------
/blue-dist/src/systemd/bluelatex.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=\\BlueLaTeX Server
3 | After=network.target
4 |
5 | [Service]
6 | ExecStart=/usr/bin/java -Dfelix.config.properties=file:$conf_dir/config.properties -cp $install_dir/bin/blue-launcher.jar org.apache.felix.main.Main
7 | Restart=on-failure
8 | User=$blue_user
9 |
10 | [Install]
11 | WantedBy=multi-user.target
12 |
--------------------------------------------------------------------------------
/src/main/configuration/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | ./blue-server.log
4 | true
5 |
6 | %level [%d] %logger: %msg%n%ex
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/blue-dist/src/configuration/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $log_dir/bluelatex.log
4 | true
5 |
6 | %level [%d] %logger: %msg%n%ex
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/blue-dist/src/configuration/org.gnieh.blue.common/application.conf:
--------------------------------------------------------------------------------
1 | http {
2 |
3 | port = 8080
4 |
5 | host = "127.0.0.1"
6 |
7 | }
8 |
9 | blue {
10 |
11 | data = $data_dir
12 |
13 | }
14 |
15 | couch {
16 |
17 | admin-name = "admin"
18 |
19 | admin-password = "admin"
20 |
21 | }
22 |
23 | mail {
24 |
25 | smtp {
26 |
27 | host = "127.0.0.1"
28 |
29 | port = 25
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/blue-dist/src/jsvc/blue-start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | /usr/bin/jsvc \
4 | -wait 10 \
5 | -java-home /usr/lib/jvm/default-java \
6 | -cp $install_dir/bin/blue-launcher.jar \
7 | -user $blue_user \
8 | -pidfile /var/run/bluelatex.pid \
9 | -outfile $log_dir/bluelatex.out \
10 | -errfile $log_dir/bluelatex.err \
11 | -Dfelix.config.properties="file:$conf_dir/config.properties" \
12 | org.gnieh.blue.launcher.Main
13 |
--------------------------------------------------------------------------------
/src/main/configuration/org.gnieh.blue.common/application.conf:
--------------------------------------------------------------------------------
1 | http {
2 |
3 | port = 18080
4 |
5 | }
6 |
7 | blue {
8 |
9 | data = "./data"
10 |
11 | }
12 |
13 | couch {
14 |
15 | port = $couchPort
16 |
17 | admin-name = $couchAdmin
18 |
19 | admin-password = $couchPassword
20 |
21 | }
22 |
23 | mail {
24 |
25 | smtp {
26 |
27 | host = "127.0.0.1"
28 |
29 | port = 12525
30 |
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/templates/emails/reset.mustache:
--------------------------------------------------------------------------------
1 | Hi,
2 |
3 | We received a password reset request for your account {{name}}.
4 |
5 | To actually change your password, please follow this link:
6 | {{baseUrl}}/index.html#/{{name}}/reset/{{token}}
7 |
8 | This link is valid during {{validity}} days.
9 |
10 | If you did not request a password reset, you can just ignore this email.
11 |
12 | Thank you for using \BlueLaTeX
13 |
14 | Your \BlueLaTeX team
15 |
--------------------------------------------------------------------------------
/bnd/blue-common.bnd:
--------------------------------------------------------------------------------
1 | Bundle-Activator: gnieh.blue.common.impl.BlueCommonActivator
2 | Bundle-SymbolicName: org.gnieh.blue.common
3 | Bundle-Name: Common bundle allowing other bundles to load configuration, log event and use utilities
4 |
5 | Private-Package=gnieh.blue.common.impl, gnieh.blue.couch.impl, gnieh.blue.http.impl
6 | Import-Package=*
7 |
8 | Export-Package=gnieh.blue.common, gnieh.blue.couch, gnieh.blue.http, gnieh.blue.permission
9 |
10 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/lib/GravatarDirective.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 | /**
3 | * A directive bl-gravatar witch display the gravatar of email
4 | */
5 | angular.module('bluelatex.Gravatar', ['angular-md5','gdi2290.gravatar-filter'])
6 | .directive('blGravatar', [function () {
7 | return {
8 | scope: {
9 | email: '=email'
10 | },
11 | template: ''
12 | };
13 | }]);
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: scala
2 |
3 | scala:
4 | - 2.10.6
5 |
6 | # only trigger builds on master
7 | branches:
8 | only:
9 | - master
10 | - v1.0.x
11 |
12 | script:
13 | - "sbt test blue-test/scenario:test"
14 |
15 | services:
16 | - couchdb
17 |
18 | before_install:
19 | - sudo apt-get update -qq
20 | - sudo apt-get install -qq jsvc
21 |
22 | before_script:
23 | - "echo \"couchdb := None\n\ncouchPort := 5984\n\" > build.sbt"
24 |
25 | after_script:
26 | - "cat /tmp/bluelatex.err"
27 |
--------------------------------------------------------------------------------
/src/main/templates/emails/register-confirm.mustache:
--------------------------------------------------------------------------------
1 | Hi {{firstName}},
2 |
3 | You just registered to the \BlueLaTeX service.
4 |
5 | Your login is: {{name}}
6 | Your registration email address is: {{email}}
7 |
8 | To activate your account and set your password, please follow this link:
9 | {{baseUrl}}/index.html#/{{name}}/reset/{{token}}
10 |
11 | This link is valid during {{validity}} days.
12 |
13 | If you did not register to the \Blue service, you can just ignore this email.
14 |
15 | Thank you for using \BlueLaTeX
16 |
17 | Your \BlueLaTeX team
18 |
--------------------------------------------------------------------------------
/project/plugins.sbt:
--------------------------------------------------------------------------------
1 | scalacOptions += "-deprecation"
2 |
3 | resolvers += "Sonatype Snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"
4 |
5 | resolvers += Resolver.typesafeRepo("releases")
6 |
7 | libraryDependencies += "biz.aQute.bnd" % "bndlib" % "2.2.0"
8 |
9 | libraryDependencies += "org.gnieh" %% "sohva-testing" % "0.4"
10 |
11 | addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.2.5")
12 |
13 | addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2")
14 |
15 | addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.1.0")
16 |
17 | addSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0")
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # use glob syntax.
2 | syntax: glob
3 | *.ser
4 | *.class
5 | *~
6 | *.bak
7 | #*.off
8 | *.old
9 | *.pyc
10 | *.swp
11 |
12 | # eclipse conf file
13 | .cache
14 | .settings
15 | .classpath
16 | .project
17 | .manager
18 | .scala_dependencies
19 |
20 | # idea
21 | .idea
22 | *.iml
23 |
24 | # building
25 | target
26 | build
27 | null
28 | tmp*
29 | #temp*
30 | dist
31 | test-output
32 | build.log
33 | build.sbt
34 |
35 | # other scm
36 | .svn
37 | .CVS
38 | .hg*
39 |
40 | # switch to regexp syntax.
41 | # syntax: regexp
42 | # ^\.pc/
43 |
44 | #SHITTY output not in target directory
45 | build.log
46 |
47 | # macos files
48 | .DS_Store
49 | .Trashes
50 |
51 |
--------------------------------------------------------------------------------
/src/main/templates/generic.tex.mustache:
--------------------------------------------------------------------------------
1 | {{=<% %>=}}
2 | \documentclass{<% class %>}
3 |
4 | \usepackage[T1]{fontenc} %% to get Type 1 fonts
5 | \usepackage[utf8]{inputenc} %% to enable non ASCII characters
6 | \usepackage[margin=2cm]{geometry} %% to change the margins
7 |
8 | \title{<% title %>}
9 |
10 | \author{
11 | <% author %>\\
12 | <% email %>\\
13 | <% affiliation %>
14 | \and
15 | Your Co-Author\\
16 | second@email.com\\
17 | Institute
18 | }
19 |
20 | \begin{document}
21 | \maketitle
22 |
23 | \section{First Section}
24 | Some text
25 |
26 | \section{Second Section}
27 |
28 | % to add the bibliography, uncomment the following lines
29 | %\bibliography{references}{}
30 | %\bibliographystyle{plain}
31 | \end{document}
32 |
--------------------------------------------------------------------------------
/src/main/designs/blue_papers/lists.json:
--------------------------------------------------------------------------------
1 | {
2 | "_id": "_design/lists",
3 | "language": "javascript",
4 | "views": {
5 | "by_author": {
6 | "map": "function(doc) {\n if(doc.authors) {\n for(var i = 0; i < doc.authors.length ; i++) {\n emit(doc.authors[i], {\"_id\": doc._id, \"title\": doc.title});\n }\n }\n}"
7 | },
8 | "title": {
9 | "map": "function(doc) {\n if(doc.title) {\n emit(doc._id, doc.title);\n }\n}"
10 | },
11 | "by_keyword": {
12 | "map": "function(doc) {\n if(doc.keywords) {\n for(var i = 0; i < doc.keywords.length ; i++) {\n emit(doc.keywords[i], {\"_id\": doc._id, \"title\": doc.title});\n }\n }\n}"
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/lib/angular-autoFillSync.js:
--------------------------------------------------------------------------------
1 | /**
2 | * autoFillSync
3 | * autoFillSync directive for AngularJS
4 | * By Ben Lesh
5 | * From http://stackoverflow.com/questions/14965968/angularjs-browser-autofill-workaround-by-using-a-directive
6 | */
7 |
8 | angular.module('autoFillSync', [] )
9 | .directive('autoFillSync', function($timeout) {
10 | return {
11 | require: 'ngModel',
12 | link: function(scope, elem, attrs, ngModel) {
13 | var origVal = elem.val();
14 | $timeout(function () {
15 | var newVal = elem.val();
16 | if(ngModel.$pristine && origVal !== newVal) {
17 | ngModel.$setViewValue(newVal);
18 | }
19 | }, 500);
20 | }
21 | }
22 | });
--------------------------------------------------------------------------------
/blue-test/src/main/scala/gnieh/blue/UserRole.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 |
18 | case class UserRole(id: String, name: String, role: String)
19 |
--------------------------------------------------------------------------------
/blue-test/src/main/scala/gnieh/blue/CompilerSettings.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 |
18 | case class CompilerSettings(compiler: String, timeout: Int, interval: Int)
19 |
20 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/couch/impl/BlueSerializers.scala:
--------------------------------------------------------------------------------
1 | package gnieh.blue
2 | package couch
3 | package impl
4 |
5 | import net.liftweb.json._
6 |
7 | import gnieh.sohva.SohvaSerializer
8 |
9 | import permission._
10 |
11 | object PermissionSerializer extends Serializer[Permission] {
12 |
13 | val PermissionClass = classOf[Permission]
14 |
15 | def deserialize(implicit format: Formats): PartialFunction[(TypeInfo, JValue), Permission] = {
16 | case (TypeInfo(PermissionClass, _), JString(name)) =>
17 | Permission(name)
18 | }
19 |
20 | def serialize(implicit format: Formats): PartialFunction[Any, JValue] = {
21 | case Permission(name) => JString(name)
22 | }
23 |
24 | }
25 |
26 | object BluePermissionSerializer extends SohvaSerializer[Permission] {
27 | def serializer(v: String) =
28 | PermissionSerializer
29 | }
30 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/ace/ext-linking.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})});
2 | (function() {
3 | ace.require(["ace/ext/linking"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/ReCaptcha.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | import tiscaf.HTalk
20 |
21 | trait ReCaptcha {
22 |
23 | def verify(talk: HTalk): Boolean
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/blue-sync/src/main/scala/gnieh/blue/sync/impl/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package sync
18 |
19 | package object impl {
20 | type PeerId = String
21 | type PaperId = String
22 | type Filepath = String
23 | }
24 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/MailAgent.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | trait MailAgent {
20 |
21 | /** Sends an email to the given user */
22 | def send(username: String, subject: String, text: String): Unit
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/templates/beamer.tex.mustache:
--------------------------------------------------------------------------------
1 | {{=<% %>=}}
2 | \documentclass{beamer}
3 |
4 | \usepackage[T1]{fontenc} %% to get Type 1 fonts
5 | \usepackage[utf8]{inputenc} %% to enable non ASCII characters
6 |
7 | \title{<% title %>}
8 |
9 | \institute{%
10 | \inst{1}%
11 | <% email %>\\
12 | <% affiliation %>
13 | }
14 |
15 | \author{<% author %>\inst{1}}
16 |
17 | \subject{\LaTeX}
18 |
19 | \AtBeginSection[]{
20 | \begin{frame}
21 | \frametitle{Table of Contents}
22 | \tableofcontents[currentsection]
23 | \end{frame}
24 | }
25 |
26 | \begin{document}
27 |
28 | \frame{\titlepage}
29 |
30 | \begin{frame}
31 | \frametitle{This is the first slide}
32 | %Content goes here
33 | \end{frame}
34 |
35 | \begin{frame}
36 | \frametitle{This is the second slide}
37 | \framesubtitle{A bit more information about this}
38 | %More content goes here
39 | \end{frame}
40 |
41 | % etc
42 | \end{document}
43 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/CompilerSettings.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 |
19 | import gnieh.sohva.IdRev
20 |
21 | case class CompilerSettings(_id: String, compiler: String, synctex: Boolean, timeout: Int, interval: Int) extends IdRev
22 |
23 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/couch/Paper.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue.couch
17 |
18 | import gnieh.sohva.IdRev
19 |
20 | import java.util.Date
21 |
22 | case class Paper(_id: String,
23 | name: String,
24 | creation_date: Date) extends IdRev
25 |
26 |
--------------------------------------------------------------------------------
/src/main/templates/llncs.tex.mustache:
--------------------------------------------------------------------------------
1 | {{=<% %>=}}
2 | % template for Lecture Notes in Computer Science
3 | % for more explanations look at http://www.springer.com/computer/lncs?SGWID=0-164-6-793341-0
4 |
5 | \documentclass{llncs}
6 |
7 | \begin{document}
8 |
9 | \title{<% title %>}
10 |
11 | \author{<% author %>\inst{1} \and Your Co-Author\inst{2}}
12 |
13 | \institute{<%email %>, <% affiliation %>, Street, City, Country
14 | \and
15 | Institute, Street, City, Country}
16 |
17 | \maketitle
18 | %
19 | \begin{abstract}
20 | This is the abstract.
21 | \end{abstract}
22 | %
23 | \section{Introduction}
24 | Your wonderful introduction
25 |
26 | \section{Remainder of Your Paper}
27 |
28 | blablabla
29 |
30 | %
31 | % The following two commands are all you need in the
32 | % initial runs of your .tex file to
33 | % produce the bibliography for the citations in your paper.
34 | %\bibliography{references}
35 |
36 | \end{document}
37 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/shared/directives/MenuDirective.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /*
18 | * A directive used to display the menu
19 | */
20 | angular.module('bluelatex.Shared.Directives.Menu', [])
21 | .directive('blMenu', function() {
22 | return {
23 | templateUrl: 'partials/menu.html'
24 | };
25 | });
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/shared/directives/MessagesDirective.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /*
18 | * A directive used to display messages
19 | */
20 | angular.module('bluelatex.Shared.Directives.Messages', [])
21 | .directive('blMessages', function() {
22 | return {
23 | templateUrl: 'partials/messages.html'
24 | };
25 | });
--------------------------------------------------------------------------------
/blue-web/src/main/scala/gnieh/blue/web/AppConfig.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package web
18 |
19 | case class AppConfig(api_prefix: String,
20 | require_validation: Boolean,
21 | recaptcha_public_key: Option[String],
22 | compilation_type: Option[String],
23 | issues_url: Option[String],
24 | clone_url: Option[String])
25 |
--------------------------------------------------------------------------------
/blue-sync/src/main/scala/gnieh/blue/sync/impl/Document.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package sync
18 | package impl
19 |
20 | import java.io.File
21 |
22 | /** Server-side document
23 | *
24 | * @author Lucas Satabin
25 | */
26 | class Document(val path: String, var text: String) {
27 | lazy val filename = new File(path).getName()
28 | }
29 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/permission/Group.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package permission
18 |
19 | import gnieh.sohva.IdRev
20 |
21 | /** A group of users may be created to factorize some permissions.
22 | *
23 | * @author Lucas Satabin
24 | */
25 | case class Group(_id: String, name: String, users: List[String]) extends IdRev
26 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/shared/directives/AutoFocusDirective.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | 'use strict';
18 | // A directive witch give the focus on an element
19 | angular.module('bluelatex.Shared.Directives.Autofocus', [])
20 | .directive('autofocus', function() {
21 | return function(scope, elem, attr) {
22 | elem[0].focus();
23 | };
24 | });
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/http/ErrorResponse.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package http
18 |
19 | /** An error response with an error name and a description.
20 | * All API should return an error response when something went wrong.
21 | *
22 | * @author Lucas Satabin
23 | */
24 | case class ErrorResponse(name: String, description: String)
25 |
26 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/SetUtils.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | object SingletonSet {
20 | def unapply[T](set: Set[T]): Option[T] =
21 | if(set.size == 1)
22 | set.headOption
23 | else
24 | None
25 | }
26 |
27 | object EmptySet {
28 | def unapply[T](set: Set[T]): Boolean =
29 | set.isEmpty
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/templates/index.html.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | publications.li - {{title}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/permission/Permission.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package permission
18 |
19 | /** A permission on paper that defines how certain user may interact on the paper
20 | *
21 | * @author Lucas Satabin
22 | */
23 | final case class Permission(val name: String) {
24 | def unapply(permissions: Set[Permission]): Boolean =
25 | permissions.contains(this)
26 | }
27 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 |
19 | import common._
20 |
21 | import java.io.File
22 |
23 | package object impl {
24 | implicit class CompileConfiguration(val config: PaperConfiguration) extends AnyVal {
25 |
26 | def buildDir(paperId: String) =
27 | new File(config.paperDir(paperId), "build")
28 |
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/couch/UserPermissions.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue.couch
17 |
18 | import gnieh.sohva._
19 |
20 | /** Users may define their own set of permissions and save them so
21 | * that he can reuse them later on.
22 | *
23 | * @author Lucas Satabin
24 | *
25 | */
26 | case class UserPermissions(_id: String,
27 | permissions: Map[String, Map[String, Set[String]]]) extends IdRev
28 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/permission/Phase.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package permission
18 |
19 | import gnieh.sohva.IdRev
20 |
21 | /** A `Phase` defines the different permission for each role that are allowed.
22 | * By putting a paper into a specific phase, one can restrict allowed operations.
23 | *
24 | * @author Lucas Satabin
25 | */
26 | case class Phase(_id: String, name: String, permissions: Map[Role, Set[Permission]]) extends IdRev
27 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/ace/ext-statusbar.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("ace/lib/dom"),i=e("ace/lib/lang"),s=function(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)};(function(){this.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")}}).call(s.prototype),t.StatusBar=s});
2 | (function() {
3 | ace.require(["ace/ext/statusbar"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/blue-web/src/main/assets/less/css.less:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | // Global variables
4 | @url_images: "../img";
5 | @url_fonts: "fonts";
6 |
7 | @pageBackground: #FFF;
8 | @pageWidth: 724px;
9 | @loginPageWidth: 275px;
10 | @loginPageHeight: 425px;
11 | @placeholderColor: #999;
12 | @selectionColor: #A6CBF3;
13 | @font: Helvetica,Arial, sans-serif;
14 | @linkColor: #415FBE;
15 | @fontColor: #333;
16 | @backgroundColor: #EEE;
17 | @headerColor: #FFF;
18 | @headerBackground: #373942;
19 | @headerHeight: 42px;
20 | @headerLinkColor: #F3F3F3;
21 | @buttonColor: #FFF;
22 | @buttonBackground: #50638B;
23 | @buttonStartBackground: #5F7C3A;
24 | @buttonDeleteBackground: #BB4545;
25 | @errorBackground: #BB4545;
26 | @warningBackground: #D68100;
27 | @messageBackground: #6E99F5;
28 | @messageColor: #FFF;
29 | @topMenuBackground: #FAFAFA;
30 | @topMenuColor: #333;
31 |
32 | // Imports all files
33 | @import "ngdialog.css";
34 | @import "normalize.css";
35 | @import "main.less";
36 | @import "login.less";
37 | @import "paper.less";
38 | @import "papers.less";
39 | @import "form_page.less";
40 | @import "icon.less";
41 | @import "mobile.less";
42 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/CompilationStatus.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 | package impl
19 |
20 | sealed trait CompilationStatus
21 |
22 | case object CompilationSucceeded extends CompilationStatus
23 |
24 | final case class CompilationFailed(pdfProduced: Boolean) extends CompilationStatus
25 |
26 | case object CompilationAborted extends CompilationStatus
27 |
28 | case object CompilationUnnecessary extends CompilationStatus
29 |
30 |
--------------------------------------------------------------------------------
/blue-test/src/main/scala/gnieh/blue/Person.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 |
18 | case class Person(username: String, first_name: String, last_name: String, email_address: String, affiliation: Option[String]) {
19 | def toMap = Map(
20 | "username" -> username,
21 | "first_name" -> first_name,
22 | "last_name" -> last_name,
23 | "email_address" -> email_address
24 | ) ++ affiliation.map(a => "affiliation" -> a).toMap
25 |
26 | val password = username
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/impl/TemplatesImpl.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 | package impl
19 |
20 | import gnieh.mustache._
21 |
22 | class TemplatesImpl(configuration: BlueConfiguration) extends Templates {
23 |
24 | val engine =
25 | new MustacheProcessor(new FileSystemLoader(configuration.templateDir), true)
26 |
27 | def layout(name: String, params: (String, Any)*) =
28 | engine.render(s"$name.mustache", Map(params: _*))
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/lib/ngStorage.min.js:
--------------------------------------------------------------------------------
1 | /*! ngStorage 0.3.0 | Copyright (c) 2013 Gias Kay Lee | MIT License */"use strict";!function(){function a(a){return["$rootScope","$window",function(b,c){for(var d,e,f,g=c[a]||(console.warn("This browser does not support Web Storage!"),{}),h={$default:function(a){for(var b in a)angular.isDefined(h[b])||(h[b]=a[b]);return h},$reset:function(a){for(var b in h)"$"===b[0]||delete h[b];return h.$default(a)}},i=0;i v }
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/partials/reset.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | To reset your password, enter the username you use to sign in.
6 |
7 |
28 |
--------------------------------------------------------------------------------
/blue-dist/src/shell/install.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Run this to install \BlueLaTeX distribution.
4 |
5 | # Where the \BlueLaTeX binaries are installed
6 | INSTALL_DIR=$install_dir
7 |
8 | # Where the \BlueLaTeX configuration files are installed
9 | CONF_DIR=$conf_dir
10 |
11 | # Where the paper data will be stored
12 | DATA_DIR=$data_dir
13 |
14 | # Where the log files are created
15 | LOG_DIR=$log_dir
16 |
17 | # The user under which \BlueLaTeX will run
18 | BLUE_USER=$blue_user
19 |
20 | if [[ -d "$INSTALL_DIR" || -d "$CONF_DIR" || -d "$DATA_DIR" ]]
21 | then
22 | echo "Another version of \\BlueLaTeX seems to be already installed. Please consider using 'update.sh' instead"
23 | exit 1
24 | fi
25 |
26 | # Create directories
27 | mkdir -p $INSTALL_DIR
28 | mkdir -p $CONF_DIR
29 | mkdir -p $DATA_DIR
30 | mkdir -p $LOG_DIR
31 |
32 | # Copy stuffs
33 | cp -r bin bundle $INSTALL_DIR
34 | cp -r conf/* $CONF_DIR
35 | cp -r data/* $DATA_DIR
36 |
37 | # Create the user if needed
38 | id -u $BLUE_USER &>/dev/null
39 | if [ $? -ne 0 ]
40 | then
41 | adduser --system --group --disabled-password --disabled-login --no-create-home $BLUE_USER
42 | fi
43 |
44 | # Set correct ownership
45 | chown -R $BLUE_USER:$BLUE_USER $DATA_DIR $LOG_DIR
46 |
47 | echo "\\BlueLaTeX was successfully installed"
48 |
--------------------------------------------------------------------------------
/src/main/designs/blue_papers/papers.json:
--------------------------------------------------------------------------------
1 | {
2 | "_id": "_design/papers",
3 | "language": "javascript",
4 | "views": {
5 | "authors": {
6 | "map": "function(doc) { if(doc.authors) { emit(doc._id, doc.authors.users); }}"
7 | },
8 | "reviewers": {
9 | "map": "function(doc) { if(doc.reviewers) { emit(doc._id, doc.reviewers.users); }}"
10 | }
11 | "people": {
12 | "map": "function(doc) { if(doc.authors) { for(i in doc.authors.users) { emit(doc._id, {'role': 'author', '_id': doc.authors.users[i]}); } } if(doc.reviewers) { for(i in doc.reviewers.users) { emit(doc._id, {'_id': doc.reviewers.users[i], 'role': 'reviewer'}); } }}"
13 | }
14 | "for": {
15 | "map": "function(doc) { if(doc.authors) { for(i in doc.authors.users) { emit(doc.authors.users[i], { 'id': doc['sohva-entities-entity'], 'role': 'author' }); } } if(doc.reviewers) { for(i in doc.reviewers.users) { emit(doc.reviewers.users[i], { 'id': doc['sohva-entities-entity'], 'role': 'reviewer' }); } }}"
16 | }
17 | },
18 | "validate_doc_update": "function(newDoc, oldDoc, userCtx, secObj) { if(oldDoc && oldDoc.authors && oldDoc.authors.length > 0 && userCtx.roles.indexOf('_admin') == -1 && oldDoc.authors.indexOf(userCtx.name) == -1) { throw 'only authors may modify a paper'; } }"
19 | }
20 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/impl/LogServiceFactory.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common.impl
18 |
19 | import org.osgi.framework.{
20 | Bundle,
21 | ServiceRegistration,
22 | ServiceFactory
23 | }
24 | import org.osgi.service.log.LogService
25 |
26 | class LogServiceFactory extends ServiceFactory[LogService] {
27 |
28 | def getService(bundle: Bundle, registration: ServiceRegistration[LogService]): LogService =
29 | new LogServiceImpl(bundle)
30 |
31 | def ungetService(bundle: Bundle, registration: ServiceRegistration[LogService], service: LogService): Unit =
32 | () // nothing to do
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/permission/Role.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package permission
18 |
19 | /** The different roles for a paper:
20 | * - an author is simply an user listed as such for the paper,
21 | * - a reviewer is an user authenticated user listed as such for the paper,
22 | * - other authenticated users have other role,
23 | * - unauthenticated user get the anonymous role.
24 | *
25 | * @author Lucas Satabin
26 | *
27 | */
28 | sealed trait Role
29 | case object Author extends Role
30 | case object Reviewer extends Role
31 | case object Other extends Role
32 | case object Guest extends Role
33 | case object Anonymous extends Role
34 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/permission/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 |
18 | package object permission {
19 |
20 | // some widely used 'built-in' permissions
21 |
22 | val Publish = Permission("publish")
23 | val Configure = Permission("configure")
24 | val Edit = Permission("edit")
25 | val Delete = Permission("delete")
26 | val Compile = Permission("compile")
27 | val Download = Permission("download")
28 | val Read = Permission("read")
29 | val View = Permission("view")
30 | val Comment = Permission("comment")
31 | val Chat = Permission("chat")
32 | val Fork = Permission("fork")
33 | val ChangePhase = Permission("change-phase")
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/couch/User.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue.couch
17 |
18 | import gnieh.sohva._
19 |
20 | /** A user of blue has the standard fields of couchdb users
21 | * but also contains extra information, specific to blue.
22 | *
23 | * @author Lucas Satabin
24 | *
25 | */
26 | case class User(name: String,
27 | first_name: String,
28 | last_name: String,
29 | email: String,
30 | affiliation: Option[String] = None) extends IdRev {
31 |
32 | val _id = s"org.couchdb.user:$name:blue"
33 |
34 | def fullName = s"$first_name $last_name"
35 |
36 | }
37 |
38 | case class UserRole(id: String, role: String)
39 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/partials/messages.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/project/Tests.scala:
--------------------------------------------------------------------------------
1 | package blue
2 |
3 | import sbt._
4 | import Keys._
5 |
6 | trait Tests {
7 | this: BlueBuild =>
8 |
9 | val Scenario = config("scenario") extend(IntegrationTest)
10 |
11 | lazy val testing =
12 | (Project(id = "blue-test",
13 | base = file("blue-test"))
14 | configs(IntegrationTest, Scenario)
15 | settings(
16 | inConfig(Scenario)(Defaults.itSettings): _*
17 | )
18 | settings(
19 | inConfig(IntegrationTest)(Defaults.itSettings): _*
20 | )
21 | settings(
22 | libraryDependencies ++= testDeps,
23 | fork in IntegrationTest := true,
24 | parallelExecution in IntegrationTest := false,
25 | testOptions in IntegrationTest <+= (couchPort in bluelatex, couchAdmin in bluelatex, couchPassword in bluelatex) map { (port, admin, password) =>
26 | Tests.Argument(s"-DcouchPort=$port", s"-Dadmin=$admin", s"-Dpassword=$password")
27 | },
28 | test in Scenario <<= (blueStop in bluelatex) dependsOn ((test in IntegrationTest) dependsOn (blueStart in bluelatex))
29 | )
30 | ) dependsOn(blueCommon)
31 |
32 | lazy val testDeps = Seq(
33 | "org.subethamail" % "subethasmtp" % "3.1.7",
34 | "org.scala-stm" %% "scala-stm" % "0.7",
35 | "net.databinder.dispatch" %% "dispatch-core" % "0.11.0",
36 | "org.scalatest" %% "scalatest" % "2.2.0" % "scenario,test,it"
37 | )
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/blue-core/src/main/scala/gnieh/blue/core/impl/session/GetSessionDataLet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package core
18 | package impl
19 | package session
20 |
21 | import com.typesafe.config.Config
22 |
23 | import http._
24 | import common._
25 |
26 | import tiscaf._
27 |
28 | import gnieh.sohva.control.CouchClient
29 |
30 | import scala.util.{
31 | Try,
32 | Success
33 | }
34 |
35 | /** Get the session data if the request is authenticated.
36 | *
37 | * @author Lucas Satabin
38 | */
39 | class GetSessionDataLet(val couch: CouchClient, config: Config, logger: Logger) extends SyncBlueLet(config, logger) with SyncAuthenticatedLet {
40 |
41 | def authenticatedAct(user: UserInfo)(implicit talk: HTalk): Try[Unit] =
42 | Success(talk.writeJson(user))
43 |
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/ace/ext-spellcheck.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){console.log(e,a,n.selectionStart,n.selectionEnd);if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})});
2 | (function() {
3 | ace.require(["ace/ext/spellcheck"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/ace/ext-themelist.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"],function(e,t,n){"use strict";e("ace/lib/fixoldbrowsers");var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Cobalt","cobalt","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})});
2 | (function() {
3 | ace.require(["ace/ext/themelist"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/blue-sync/src/main/scala/gnieh/blue/sync/impl/SyncApi.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package sync
18 | package impl
19 |
20 | import http._
21 | import common._
22 | import let._
23 |
24 | import com.typesafe.config.Config
25 |
26 | import gnieh.sohva.control.CouchClient
27 |
28 | /** The synchronization service API exposes an interface for clients
29 | * to synchronize their paper
30 | *
31 | * @author Lucas Satabin
32 | */
33 | class SyncApi(couch: CouchClient, val config: Config, synchroServer: SynchroServer, logger: Logger) extends RestApi {
34 |
35 | POST {
36 | case p"papers/$paperid/q" =>
37 | new QLet(paperid, synchroServer, couch, config, logger)
38 | case p"papers/$paperid/sync" =>
39 | new SynchronizePaperLet(paperid, synchroServer, couch, config, logger)
40 | }
41 |
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/Logging.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | import org.osgi.service.log.LogService
20 |
21 | /** Mixin this trait in any class you want to have support for logging
22 | *
23 | * @author Lucas Satabin
24 | *
25 | */
26 | trait Logging {
27 |
28 | import LogService._
29 |
30 | val logger: Logger
31 |
32 | @inline
33 | def logDebug(msg: String): Unit =
34 | logger.log(LOG_DEBUG, msg)
35 |
36 | @inline
37 | def logInfo(msg: String): Unit =
38 | logger.log(LOG_INFO, msg)
39 |
40 | @inline
41 | def logWarn(msg: String): Unit =
42 | logger.log(LOG_WARNING, msg)
43 |
44 | @inline
45 | def logError(msg: String, exn: Throwable): Unit =
46 | logger.log(LOG_ERROR, msg, exn)
47 |
48 | @inline
49 | def logError(msg: String): Unit =
50 | logger.log(LOG_ERROR, msg)
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/shared/controllers/MessagesController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | 'use strict';
18 |
19 | angular.module('bluelatex.Shared.Controllers.Messages', ['bluelatex.Shared.Services.Messages'])
20 | .controller('MessagesController', [
21 | '$rootScope',
22 | '$scope',
23 | 'MessagesService',
24 | function ($rootScope,
25 | $scope,
26 | MessagesService) {
27 | // give access to messages, warnings and errors
28 | $scope.messages = MessagesService.messages;
29 | $scope.warnings = MessagesService.warnings;
30 | $scope.errors = MessagesService.errors;
31 |
32 | $scope.messagesSession = MessagesService.messagesSession;
33 | $scope.warningsSession = MessagesService.warningsSession;
34 | $scope.errorsSession = MessagesService.errorsSession;
35 |
36 | $scope.close = MessagesService.close;
37 | }
38 | ]);
--------------------------------------------------------------------------------
/blue-sync/src/main/scala/gnieh/blue/sync/impl/store/Store.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package sync
18 | package impl
19 | package store
20 |
21 | /** Describes the interface that all stores must implement.
22 | * A store allows user to persist a document. It may be e.g. a file on the file system,
23 | * a database, ...
24 | *
25 | * @author Lucas Satabin
26 | */
27 | trait Store {
28 |
29 | /** Persists the document in the store. Create it if it does not exist yet. */
30 | def save(document: Document)
31 |
32 | /** Loads the document from the store, if it does not exist, returns empty Document. */
33 | def load(documentId: String): Document
34 |
35 | /** Delete the document from the store. */
36 | def delete(document: Document)
37 |
38 | }
39 |
40 | class StoreException(msg: String, inner: Throwable) extends Exception(msg, inner) {
41 | def this(msg: String) = this(msg, null)
42 | }
43 |
--------------------------------------------------------------------------------
/blue-sync/src/main/scala/gnieh/blue/sync/impl/EditCommandParser.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package sync
18 | package impl
19 |
20 | import scala.util.parsing.combinator._
21 |
22 | /** A simple parser for Edit commands.
23 | * @author Lucas Satabin
24 | *
25 | */
26 | object EditCommandParsers extends RegexParsers {
27 |
28 | override def skipWhitespace = false
29 |
30 | /** Parse unencoded string into Edit object */
31 | def parseEdit(input: String): Option[Edit] =
32 | parseAll(edit, input) match {
33 | case Success(res, _) => Some(res)
34 | case f => None
35 | }
36 |
37 | lazy val edit: Parser[Edit] =
38 | ("+" ~> data ^^ Add
39 | | "-" ~> number ^^ Delete
40 | | "=" ~> number ^^ Equality)
41 |
42 | private lazy val number: Parser[Int] =
43 | "[0-9]+".r ^^ (_.toInt)
44 |
45 | private lazy val data: Parser[String] =
46 | "(?s).*".r
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/partials/paper/latex/reviewer.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Download
6 |
7 |
8 |
9 |
10 |
19 |
20 |
21 |
22 |
23 | /
24 |
{{totalPage}}
25 |
26 |
27 |
28 |
29 |
30 |
40 |
41 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/PaperConfiguration.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | import com.typesafe.config.Config
20 |
21 | import java.io.File
22 |
23 | class PaperConfiguration(val config: Config) {
24 |
25 | import FileUtils._
26 |
27 | def paperDir(paperId: String): File =
28 | new File(config.getString("blue.paper.directory")) / paperId
29 |
30 | def paperFile(paperId: String): File =
31 | paperDir(paperId) / "main.tex"
32 |
33 | def resource(paperId: String, resourceName: String): File =
34 | paperDir(paperId) / resourceName
35 |
36 | def bibFile(paperId: String): File =
37 | paperDir(paperId) / "references.bib"
38 |
39 | def clsDir: File =
40 | new File(config.getString("blue.paper.classes"))
41 |
42 | def clsFiles: List[File] =
43 | clsDir.filter(_.getName.endsWith(".cls"))
44 |
45 | def cls(name: String): File =
46 | clsDir / s"$name.cls"
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/blue-mobwrite/src/main/scala/gnieh/blue/mobwrite/MobwriteActivator.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package mobwrite
18 |
19 | import org.osgi.framework._
20 |
21 | import common._
22 |
23 | /** Registers the mobwrite service that delegates synchronization
24 | * to a standalone process
25 | *
26 | * @author Lucas Satabin
27 | */
28 | class MobwriteActivator extends BundleActivator {
29 |
30 | import common.OsgiUtils._
31 |
32 | def start(context: BundleContext): Unit = {
33 | for(loader <- context.get[ConfigurationLoader]) {
34 | // instantiate the mobwrite server as synchronization server
35 | val server = new MobwriteServer(loader.load(context.getBundle.getSymbolicName, getClass.getClassLoader))
36 | // register this as the synchronization server
37 | context.registerService(classOf[SynchroServer], server, null)
38 | }
39 | }
40 |
41 | def stop(context: BundleContext): Unit = {
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/let/GetCompilersLet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 | package impl
19 | package let
20 |
21 | import http._
22 | import common._
23 |
24 | import tiscaf._
25 |
26 | import com.typesafe.config.Config
27 |
28 | import org.osgi.framework.BundleContext
29 |
30 | import scala.util.Try
31 |
32 | import gnieh.sohva.control.CouchClient
33 |
34 | /** Returns the list of compilers that are currently available in \BlueLaTeX
35 | * and that can be used to compile the papers
36 | *
37 | * @author Lucas Satabin
38 | */
39 | class GetCompilersLet(context: BundleContext, val couch: CouchClient, config: Config, logger: Logger) extends SyncBlueLet(config, logger) with SyncAuthenticatedLet {
40 |
41 | import OsgiUtils._
42 |
43 | def authenticatedAct(user: UserInfo)(implicit talk: HTalk): Try[Any] =
44 | Try(talk.writeJson(context.getAll[Compiler].map(_.name).toList.sorted))
45 |
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/shared/directives/LocalizeTooltipDirective.js:
--------------------------------------------------------------------------------
1 | angular.module('bluelatex.Shared.Directives.tooltip', ['ngTooltip'])
2 | .directive('i18nTooltip',[ '$tooltip', 'localize',
3 | function($tooltip, localize) {
4 | return {
5 | restrict: 'EA',
6 | scope: {
7 | content: '@i18nTooltip',
8 | },
9 | link: function(scope, elem, attr) {
10 | /**
11 | * Translate the message
12 | */
13 | var getMessageLocalized = function (m) {
14 | var tempMessage = localize.getLocalizedString(m);
15 | if(tempMessage == '' || tempMessage == null) {
16 | tempMessage = m.replace(/_/g,' ').trim();
17 | }
18 | return tempMessage;
19 | };
20 |
21 | var tooltip = $tooltip({
22 | target: elem,
23 | scope: scope,
24 | tether: {
25 | attachment: 'middle left',
26 | targetAttachment: 'middle right',
27 | constraints: [
28 | {
29 | to: document.getElementById('page'),
30 | attachment: 'together',
31 | pin: true
32 | }
33 | ]
34 | }
35 | });
36 |
37 | var displayTimeout = null;
38 | elem[0].onmouseover = function() {
39 | displayTimeout = setTimeout(function () {
40 | scope.content = getMessageLocalized(scope.content);
41 | scope.$apply(tooltip.open);
42 | }, 250);
43 | };
44 | elem[0].onmouseout = function() {
45 | clearTimeout(displayTimeout);
46 | scope.$apply(tooltip.close);
47 | };
48 | }
49 | };
50 | }]);
--------------------------------------------------------------------------------
/blue-compile/src/main/resources/application.conf:
--------------------------------------------------------------------------------
1 | # The *TeX system process configuration keys
2 | tex {
3 |
4 | # compilation processes are launched in a pool of available processes.
5 | # the size of the available process pool is configurable here.
6 |
7 | # the minimum amount of available processes in the process pool
8 | min-process = 5
9 |
10 | # the maximum amount of *TeX processes that can run in parallel
11 | max-process = 100
12 |
13 | }
14 |
15 | # The default compiler configuration keys
16 | compiler {
17 |
18 | # whether the compilation task is started in background, or
19 | # started explicitly by people.
20 | # Possible values are:
21 | # - `background` means that papers are compiled regularly with a background
22 | # task started.
23 | # - `explicit` means that paper compilation must be triggered explicitly by
24 | # users to be performed.
25 | compilation-type = explicit
26 |
27 | # the default compiler used when creating \LaTeX paper
28 | default = pdflatex
29 |
30 | # whether SyncTeX data are generated by default for newly created papers
31 | synctex = true
32 |
33 | # the timeout after which compilation process for the paper must be aborted
34 | timeout = 30 seconds
35 |
36 | # interval of time to wait between two runs of the compiler
37 | # if the `compilation-type` is `background`, this is the time the background
38 | # task waits between the end of a compilation run and the next one to start.
39 | # if the `compilation-type` is `explicit`, this is the minimum amount of time
40 | # a user must wait between two compilation requests.
41 | interval = 1 second
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/templates/sigproc-sp.tex.mustache:
--------------------------------------------------------------------------------
1 | {{=<% %>=}}
2 | % template for Strict Adherence to SIGS style.
3 | % for more explanations look at http://www.acm.org/sigs/publications/proceedings-templates#aL1
4 |
5 | \documentclass{sigproc-sp}
6 |
7 | \begin{document}
8 |
9 | \title{<% title %>}
10 |
11 | \numberofauthors{2}
12 |
13 | \author{
14 | % 1st. author
15 | \alignauthor
16 | <% author %>\\
17 | \affaddr{<% affiliation %>}\\
18 | \affaddr{Street}\\
19 | \affaddr{City, Country}\\
20 | \email{<% email %>}
21 | % 2nd. author
22 | \alignauthor
23 | Your Co-Author\\
24 | \affaddr{Institute}\\
25 | \affaddr{Street}\\
26 | \affaddr{City, Country}\\
27 | \email{second.author@email.com}
28 | }
29 |
30 | \maketitle
31 | \begin{abstract}
32 | This is the abstract.
33 | \end{abstract}
34 |
35 | % A category with the (minimum) three required fields
36 | \category{H.4}{Information Systems Applications}{Miscellaneous}
37 | %A category including the fourth, optional field follows...
38 | \category{D.2.8}{Software Engineering}{Metrics}[complexity measures, performance measures]
39 |
40 | \terms{Template}
41 |
42 | \keywords{ACM proceedings, \LaTeX, text tagging}
43 |
44 | \section{Introduction}
45 | Your wonderful introduction
46 |
47 | \section{Remainder of Your Paper}
48 |
49 | blablabla
50 |
51 | %
52 | % The following two commands are all you need in the
53 | % initial runs of your .tex file to
54 | % produce the bibliography for the citations in your paper.
55 | %\bibliographystyle{abbrv}
56 | %\bibliography{references}
57 |
58 | \end{document}
59 |
--------------------------------------------------------------------------------
/blue-core/src/main/scala/gnieh/blue/core/impl/session/LogoutLet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package core
18 | package impl
19 | package session
20 |
21 | import com.typesafe.config.Config
22 |
23 | import http._
24 | import common._
25 |
26 | import tiscaf._
27 |
28 | import scala.util.Try
29 |
30 | import gnieh.sohva.control.CouchClient
31 |
32 | /** Log the user in.
33 | * It delegates to the CouchDB login system and keeps track of the CouchDB cookie
34 | *
35 | * @author Lucas Satabin
36 | */
37 | class LogoutLet(val couch: CouchClient, config: Config, logger: Logger) extends SyncBlueLet(config, logger) {
38 |
39 | def act(talk: HTalk): Try[Unit] =
40 | couchSession(talk).logout map {
41 | case true =>
42 | talk.ses.invalidate
43 | talk.writeJson(true)
44 | case false =>
45 | talk
46 | .setStatus(HStatus.InternalServerError)
47 | .writeJson(ErrorResponse("unable_to_logout", "Unable to log user out"))
48 | }
49 |
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/compiler/XelatexCompiler.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 | package impl
19 | package compiler
20 |
21 | import common._
22 |
23 | import akka.actor.ActorSystem
24 | import akka.util.Timeout
25 |
26 | import scala.concurrent._
27 |
28 | import scala.util.Try
29 |
30 | import java.io.File
31 |
32 | import com.typesafe.config.Config
33 |
34 | /** Compiles a project with `xelatex` and `bibtex`
35 | *
36 | * @author Lucas Satabin
37 | */
38 | class XelatexCompiler(system: ActorSystem, config: Config, configDir: File) extends SystemCompiler(system, config, configDir) {
39 |
40 | val name: String = "xelatex"
41 |
42 | def compile(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean] =
43 | exec(s"xelatex -interaction nonstopmode -synctex=${if(settings.synctex) 1 else 0} -output-directory ${buildDir(paperId)} ${paperFile(paperId)}",
44 | configuration.paperDir(paperId)) //, List("TEXINPUT" -> ".:tex/:resources/:$TEXINPUTS"))
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/compiler/LualatexCompiler.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 | package impl
19 | package compiler
20 |
21 | import common._
22 |
23 | import akka.actor.ActorSystem
24 | import akka.util.Timeout
25 |
26 | import scala.concurrent._
27 |
28 | import scala.util.Try
29 |
30 | import java.io.File
31 |
32 | import com.typesafe.config.Config
33 |
34 | /** Compiles a project with `lualatex` and `bibtex`
35 | *
36 | * @author Lucas Satabin
37 | */
38 | class LualatexCompiler(system: ActorSystem, config: Config, configDir: File) extends SystemCompiler(system, config, configDir) {
39 |
40 | val name: String = "lualatex"
41 |
42 | def compile(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean] =
43 | exec(s"lualatex -interaction nonstopmode -synctex=${if(settings.synctex) 1 else 0} -output-directory ${buildDir(paperId)} ${paperFile(paperId)}",
44 | configuration.paperDir(paperId)) //, List("TEXINPUT" -> ".:tex/:resources/:$TEXINPUTS"))
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/blue-compile/src/main/scala/gnieh/blue/compile/impl/compiler/PdflatexCompiler.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package compile
18 | package impl
19 | package compiler
20 |
21 | import common._
22 |
23 | import akka.actor.ActorSystem
24 | import akka.util.Timeout
25 |
26 | import scala.concurrent._
27 |
28 | import scala.util.Try
29 |
30 | import java.io.File
31 |
32 | import com.typesafe.config.Config
33 |
34 | /** Compiles a project with `pdflatex` and `bibtex`
35 | *
36 | * @author Lucas Satabin
37 | */
38 | class PdflatexCompiler(system: ActorSystem, config: Config, configDir: File) extends SystemCompiler(system, config, configDir) {
39 |
40 | val name: String = "pdflatex"
41 |
42 | def compile(paperId: String, settings: CompilerSettings)(implicit timeout: Timeout): Try[Boolean] =
43 | exec(s"pdflatex -interaction nonstopmode -synctex=${if(settings.synctex) 1 else 0} -output-directory ${buildDir(paperId)} ${paperFile(paperId)}",
44 | configuration.paperDir(paperId)) //, List("TEXINPUT" -> ".:tex/:resources/:$TEXINPUTS"))
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/partials/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
32 |
33 |
--------------------------------------------------------------------------------
/blue-web/src/main/scala/gnieh/blue/web/WebApp.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package web
18 |
19 | import tiscaf._
20 |
21 | import org.osgi.framework.BundleContext
22 |
23 | import com.typesafe.config.Config
24 |
25 | /** This web application serves static web client
26 | *
27 | * @author Lucas Satabin
28 | */
29 | class WebApp(context: BundleContext, config: Config) extends HApp {
30 |
31 | // this is required by the resource let used to serve static content
32 | override val buffered = true
33 |
34 | private val Prefix = "/*(.*)/*".r
35 |
36 | private val prefix = config.getString("blue.client.path-prefix") match {
37 | case Prefix(prefix) => prefix
38 | case _ => ""
39 | }
40 |
41 | private val configLet = new ConfigLet(context, config)
42 | private val webLet = new WebLet(context, prefix)
43 |
44 | private val configPath =
45 | s"${if(prefix.nonEmpty) prefix + "/" else ""}configuration"
46 |
47 | def resolve(req: HReqData) =
48 | if(req.uriPath == configPath)
49 | Some(configLet)
50 | else
51 | Some(webLet)
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/lib/angular/angular-loader.min.js:
--------------------------------------------------------------------------------
1 | /*
2 | AngularJS v1.5.6
3 | (c) 2010-2016 Google, Inc. http://angularjs.org
4 | License: MIT
5 | */
6 | (function(){'use strict';function d(b){return function(){var a=arguments[0],e;e="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.5.6/"+(b?b+"/":"")+a;for(a=1;a
49 | logger.log(LogService.LOG_ERROR, s"Unable to start the web client bundle", e)
50 | throw e
51 | }
52 |
53 | def stop(context: BundleContext): Unit = {
54 | }
55 |
56 | }
57 |
58 |
59 |
--------------------------------------------------------------------------------
/blue-common/src/main/scala/gnieh/blue/common/SynchroServer.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package common
18 |
19 | import scala.util.Try
20 |
21 | import java.util.Date
22 |
23 | /** Synchronization server interface
24 | *
25 | * @author Lucas Satabin
26 | */
27 | trait SynchroServer {
28 |
29 | /** Starts a new session with the data and returns
30 | * the result data for the client
31 | */
32 | def session(data: String): Try[String]
33 |
34 | /** Persists the synchronized files for the given paper
35 | * This call is synchronous and only returns when all files
36 | * are synchronized
37 | */
38 | def persist(paperId: String): Unit
39 |
40 | /** Retrieve the last modification date of a paper.
41 | * This date is updated every time a synchronized file of a paper
42 | * (ie, associated to `paperId`) is updated.
43 | * This call is synchronous.
44 | */
45 | def lastModificationDate(paperId: String): Date
46 | }
47 |
48 | /** Exception used in case of failure of the session() method.
49 | */
50 | class SynchroFailureException(msg: String, inner: Throwable) extends Exception(msg, inner) {
51 | def this(msg: String) = this(msg, null)
52 | }
53 |
--------------------------------------------------------------------------------
/blue-core/src/main/scala/gnieh/blue/core/impl/user/GetUserInfoLet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package core
18 | package impl
19 | package user
20 |
21 | import http._
22 | import couch.User
23 | import common._
24 |
25 | import com.typesafe.config.Config
26 |
27 | import tiscaf._
28 |
29 | import gnieh.sohva.control.CouchClient
30 |
31 | import scala.io.Source
32 |
33 | import scala.util.Try
34 |
35 | /** Returns the user data
36 | *
37 | * @author Lucas Satabin
38 | */
39 | class GetUserInfoLet(username: String, val couch: CouchClient, config: Config, logger: Logger) extends SyncBlueLet(config, logger) with SyncAuthenticatedLet {
40 |
41 | def authenticatedAct(user: UserInfo)(implicit talk: HTalk): Try[Unit] =
42 | // only authenticated users may see other people information
43 | entityManager("blue_users").getComponent[User](s"org.couchdb.user:$username") map {
44 | // we are sure that the user has a revision because it comes from the database
45 | case Some(user) => talk.writeJson(user, user._rev.get)
46 | case None => talk.setStatus(HStatus.NotFound).writeJson(ErrorResponse("not_found", s"No user named $username found"))
47 | }
48 |
49 | }
50 |
51 |
--------------------------------------------------------------------------------
/blue-core/src/main/scala/gnieh/blue/core/impl/user/GetUsersLet.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package gnieh.blue
17 | package core
18 | package impl
19 | package user
20 |
21 | import http._
22 | import couch.User
23 | import common._
24 |
25 | import com.typesafe.config.Config
26 |
27 | import tiscaf._
28 |
29 | import gnieh.sohva.UserInfo
30 |
31 | import scala.io.Source
32 |
33 | import scala.util.Try
34 |
35 | import gnieh.sohva.control.CouchClient
36 |
37 | /** Return a (potentially filtered) list of user names.
38 | *
39 | * @author Lucas Satabin
40 | */
41 | class GetUsersLet(val couch: CouchClient, config: Config, logger: Logger) extends SyncBlueLet(config, logger) with SyncAuthenticatedLet {
42 |
43 | def authenticatedAct(user: UserInfo)(implicit talk: HTalk): Try[Any] = {
44 | val userNames = view(blue_users, "lists", "names")
45 | // get the filter parameter if any
46 | val filter = talk.req.param("name")
47 | val startkey = filter.map(_.toLowerCase)
48 | val endkey = startkey.map(_.toLowerCase + "Z")
49 | for(users <- userNames.query[String, String, Any](startkey = startkey, endkey = endkey))
50 | yield talk.writeJson(users.rows.map(_.key))
51 | }
52 |
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/js/user/controllers/LogoutUserController.js:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of the \BlueLaTeX project.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | angular.module("bluelatex.User.Controllers.Logout",['bluelatex.User.Services.Session','bluelatex.User.Services.User'])
18 | .controller('LogoutController', [
19 | '$rootScope',
20 | 'SessionService',
21 | 'UserService',
22 | '$location',
23 | 'MessagesService',
24 | function ($rootScope,
25 | SessionService,
26 | UserService,
27 | $location,
28 | MessagesService) {
29 |
30 | MessagesService.clear();
31 | /*
32 | * Logout the user
33 | */
34 | SessionService.logout().then(function (data) {
35 | $rootScope.loggedUser = {};
36 | UserService.clearCache();
37 | $location.path("/login");
38 | }, function (err) {
39 | switch (err.status) {
40 | case 401:
41 | MessagesService.error('_Logout_Not_connected_',err);
42 | break;
43 | case 500:
44 | MessagesService.error('_Logout_Something_wrong_happened_',err);
45 | break;
46 | default:
47 | MessagesService.error('_Logout_Something_wrong_happened_',err);
48 | }
49 | });
50 | }
51 | ]);
--------------------------------------------------------------------------------
/blue-web/src/main/resources/webapp/partials/menu.html:
--------------------------------------------------------------------------------
1 |
2 |