Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreafeccomandi committed Apr 30, 2019
2 parents 8b7a6ff + 88d64f2 commit b4025bb
Show file tree
Hide file tree
Showing 1,098 changed files with 126,097 additions and 2,127 deletions.
2 changes: 2 additions & 0 deletions bibisco/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
lib
5 changes: 3 additions & 2 deletions bibisco/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
/dist
app/temp
bibiscoenv
node_modules
temp
172 changes: 136 additions & 36 deletions bibisco/app/app.module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand All @@ -17,6 +17,7 @@
angular.module('bibiscoApp', ['ngRoute',
'cfp.hotkeys',
'chart.js',
'Chronicle',
'focus-if',
'mwl.confirm',
'ngSanitize',
Expand All @@ -39,47 +40,122 @@ angular.module('bibiscoApp', ['ngRoute',
$scope.theme = 'dark';
});

$rootScope.$on('OPEN_RICH_TEXT_EDITOR', function () {
$rootScope.richtexteditorSearchActiveOnOpen = false;
});

let ContextService = $injector.get('ContextService');
$rootScope.os = ContextService.getOs() === 'darwin' ? '_mac' : '';

// global variables
$rootScope.dirty = false;
$rootScope.fullscreen = false;
$rootScope.previouslyFullscreen = false;
$rootScope.previousPath = null;
$rootScope.actualPath = null;
$rootScope.richtexteditorSearchActiveOnOpen = false;
$rootScope.searchCasesensitiveactive = false;
$rootScope.searchOnlyscenes = false;
$rootScope.searchWholewordactive = false;
$rootScope.text2search = null;
$rootScope.showprojectexplorer = false;
$rootScope.projectExplorerCache = new Map();

$rootScope.$on('$locationChangeSuccess',
function (event, newUrl, oldUrl) {
$rootScope.actualPath = newUrl.split('!')[1];
if ($rootScope.projectExplorerCache.get($rootScope.actualPath)) {
$rootScope.showprojectexplorer = true;
} else {
$rootScope.showprojectexplorer = false;
}
if (oldUrl) {
$rootScope.previousPath = oldUrl.split('!')[1];
}
});

}).config(['$locationProvider', '$routeProvider',
function config($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');
$routeProvider.
when('/architectureitems/:id', {
when('/analysis', {
template: '<analysis></analysis>'
}).
when('/architecture', {
template: '<architecture></architecture>'
}).
when('/architecture/params/:params', {
template: '<architecture></architecture>'
}).
when('/architectureitems/:id/:mode', {
template: '<architecturedetail></architecturedetail>'
}).
when('/chapters', {
template: '<chapters></chapters>'
}).
when('/chapters/params/:params', {
template: '<chapters></chapters>'
}).
when('/chapters/new', {
template: '<chaptertitle></chaptertitle>'
}).
when('/chapters/:id', {
template: '<chapterdetail></chapterdetail>'
}).
when('/chapters/:id/params/:params', {
template: '<chapterdetail></chapterdetail>'
}).
when('/chapters/:id/title', {
template: '<chaptertitle></chaptertitle>'
}).
when('/chapters/:chapterid/chapterinfos/:type', {
when('/chapters/:chapterid/chapterinfos/:type/:mode', {
template: '<chapterinfodetail></chapterinfodetail>'
}).
when('/chapters/:chapterid/scenes/new', {
template: '<scenetitle></scenetitle>'
}).
when('/chapters/:chapterid/scenes/:sceneid', {
template: '<scenedetail></scenedetail>'
}).
when('/chapters/:chapterid/scenes/:sceneid/move', {
template: '<chapterselect></chapterselect>'
}).
when('/timeline/chapters/:chapterid/scenes/:sceneid/move', {
template: '<chapterselect></chapterselect>'
}).
when('/chapters/:chapterid/scenes/:sceneid/tags', {
template: '<scenetags></scenetags>'
}).
when('/timeline/chapters/:chapterid/scenes/:sceneid/tags', {
template: '<scenetags></scenetags>'
}).
when('/chapters/:chapterid/scenes/:sceneid/title', {
template: '<scenetitle></scenetitle>'
}).
when('/timeline/chapters/:chapterid/scenes/:sceneid/title', {
template: '<scenetitle></scenetitle>'
}).
when('/chapters/:chapterid/scenes/:sceneid/:mode', {
template: '<scenedetail></scenedetail>'
}).
when('/timeline/chapters/:chapterid/scenes/:sceneid/:mode', {
template: '<scenedetail></scenedetail>'
}).
when('/characters', {
template: '<characters></characters>'
}).
when('/characters/params/:params', {
template: '<characters></characters>'
}).
when('/createproject', {
template: '<createproject></createproject>'
}).
when('/createsequel', {
template: '<createsequel></createsequel>'
}).
when('/error', {
template: '<error></error>'
}).
when('/export', {
template: '<export></export>'
}).
when('/exporttoformat/:format', {
template: '<exporttoformat></exporttoformat>'
}).
Expand All @@ -89,30 +165,18 @@ angular.module('bibiscoApp', ['ngRoute',
when('/info', {
template: '<info></info>'
}).
when('/objects/new', {
template: '<itemtitle></itemtitle>'
}).
when('/objects/:id', {
template: '<itemdetail></itemdetail>'
}).
when('/objects/:id/images', {
template: '<itemimages></itemimages>'
}).
when('/objects/:id/images/new', {
template: '<itemaddimage></itemaddimage>'
}).
when('/objects/:id/title', {
template: '<itemtitle></itemtitle>'
}).
when('/loading', {
template: '<loading></loading>'
}).
when('/locations', {
template: '<locations></locations>'
}).
when('/locations/params/:params', {
template: '<locations></locations>'
}).
when('/locations/new', {
template: '<locationtitle></locationtitle>'
}).
when('/locations/:id', {
template: '<locationdetail></locationdetail>'
}).
when('/locations/:id/images', {
template: '<locationimages></locationimages>'
}).
Expand All @@ -122,6 +186,9 @@ angular.module('bibiscoApp', ['ngRoute',
when('/locations/:id/title', {
template: '<locationtitle></locationtitle>'
}).
when('/locations/:id/:mode', {
template: '<locationdetail></locationdetail>'
}).
when('/main', {
template: '<main></main>'
}).
Expand All @@ -131,10 +198,16 @@ angular.module('bibiscoApp', ['ngRoute',
when('/maincharacters/:id', {
template: '<maincharacterdetail></maincharacterdetail>'
}).
when('/maincharacters/:id/infowithoutquestion/:info', {
when('/maincharacters/:id/params/:params', {
template: '<maincharacterdetail></maincharacterdetail>'
}).
when('/maincharacters/:id/infowithoutquestion/:info/:mode', {
template: '<maincharacterinfowithoutquestion></maincharacterinfowithoutquestion>'
}).
when('/maincharacters/:id/infowithquestion/:info', {
when('/maincharacters/:id/infowithquestion/:info/:mode', {
template: '<maincharacterinfowithquestion></maincharacterinfowithquestion>'
}).
when('/maincharacters/:id/infowithquestion/:info/edit/question/:question', {
template: '<maincharacterinfowithquestion></maincharacterinfowithquestion>'
}).
when('/maincharacters/:id/images', {
Expand All @@ -146,24 +219,45 @@ angular.module('bibiscoApp', ['ngRoute',
when('/maincharacters/:id/title', {
template: '<maincharactertitle></maincharactertitle>'
}).
when('/objects', {
template: '<objects></objects>'
}).
when('/objects/params/:params', {
template: '<objects></objects>'
}).
when('/objects/new', {
template: '<itemtitle></itemtitle>'
}).
when('/objects/:id/images', {
template: '<itemimages></itemimages>'
}).
when('/objects/:id/images/new', {
template: '<itemaddimage></itemaddimage>'
}).
when('/objects/:id/title', {
template: '<itemtitle></itemtitle>'
}).
when('/objects/:id/:mode', {
template: '<itemdetail></itemdetail>'
}).
when('/openproject', {
template: '<openproject></openproject>'
}).
when('/project/tips', {
when('/tips', {
template: '<tips></tips>'
}).
when('/project/title', {
template: '<projecttitle></projecttitle>'
}).
when('/project/:item', {
template: '<project></project>'
when('/projecthome', {
template: '<projecthome></projecthome>'
}).
when('/search', {
template: '<search></search>'
}).
when('/secondarycharacters/new', {
template: '<secondarycharactertitle></secondarycharactertitle>'
}).
when('/secondarycharacters/:id', {
template: '<secondarycharacterdetail></secondarycharacterdetail>'
}).
when('/secondarycharacters/:id/images', {
template: '<secondarycharacterimages></secondarycharacterimages>'
}).
Expand All @@ -173,6 +267,9 @@ angular.module('bibiscoApp', ['ngRoute',
when('/secondarycharacters/:id/title', {
template: '<secondarycharactertitle></secondarycharactertitle>'
}).
when('/secondarycharacters/:id/:mode', {
template: '<secondarycharacterdetail></secondarycharacterdetail>'
}).
when('/settings', {
template: '<settings></settings>'
}).
Expand All @@ -182,12 +279,15 @@ angular.module('bibiscoApp', ['ngRoute',
when('/strands/new', {
template: '<strandtitle></strandtitle>'
}).
when('/strands/:id', {
template: '<stranddetail></stranddetail>'
}).
when('/strands/:id/title', {
template: '<strandtitle></strandtitle>'
}).
when('/strands/:id/:mode', {
template: '<stranddetail></stranddetail>'
}).
when('/timeline', {
template: '<timeline></timeline>'
}).
when('/welcome', {
template: '<welcome></welcome>'
}).
Expand Down Expand Up @@ -232,7 +332,7 @@ angular.module('bibiscoApp', ['ngRoute',
})
.config(function(tmhDynamicLocaleProvider) {
tmhDynamicLocaleProvider.localeLocationPattern(
'node_modules/angular-i18n/angular-locale_{{locale}}.js');
'lib/angular-i18n/angular-locale_{{locale}}.js');
})
.config(function($uibTooltipProvider) {
$uibTooltipProvider.options({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="panel panel-default analysis-chapter-length">
<div class="panel-heading">
<h3 class="panel-title">{{'jsp.analysis.thumbnail.analysisWordCountChapters.title' | translate}} ({{'common_total' | translate}}: <b>{{$ctrl.total}}</b> {{'common_words' | translate}})</h3>
<h3 class="panel-title">{{'jsp.analysis.thumbnail.analysisWordCountChapters.title' | translate}} ({{'common_total' | translate}}: <b>{{$ctrl.total}}</b> {{'common_words' | translate}}, <b>{{$ctrl.totalcharacters}}</b> {{'jsp.common.span.characters' | translate}})</h3>
</div>
<div class="panel-body">
<div ng-if="$ctrl.data.length > 0"
Expand Down
3 changes: 2 additions & 1 deletion bibisco/app/components/analysis/analysis-chapter-length.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -38,6 +38,7 @@ function AnalysisController($translate, AnalysisService) {
self.data = [];
let chaptersLength = AnalysisService.getChaptersLength();
self.total = chaptersLength.total;
self.totalcharacters = chaptersLength.totalcharacters;
let words = chaptersLength.words;
let max = 0;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand Down
10 changes: 8 additions & 2 deletions bibisco/app/components/analysis/analysis.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2018 Andrea Feccomandi
* Copyright (C) 2014-2019 Andrea Feccomandi
*
* Licensed under the terms of GNU GPL License;
* you may not use this file except in compliance with the License.
Expand All @@ -19,13 +19,19 @@ angular.
controller: AnalysisController
});

function AnalysisController($timeout) {
function AnalysisController($rootScope, $timeout, AnalysisService) {

var self = this;

self.$onInit = function () {
// show menu item
$rootScope.$emit('SHOW_PAGE', {
item: 'analysis'
});

self.loading = true;
$timeout(function () {
AnalysisService.init();
self.loading = false;
}, 250);
};
Expand Down
Loading

0 comments on commit b4025bb

Please sign in to comment.