Skip to content

Commit

Permalink
Merge branch 'hotfix/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
andreafeccomandi committed May 5, 2018
2 parents d874d05 + 1ebda44 commit 1d51cd6
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 14 deletions.
19 changes: 14 additions & 5 deletions bibisco/app/components/chapters/scene-tags.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,19 @@ function SceneTagsController($location, $routeParams, $scope, $translate,
self.initObjects();

// init date time
if (ChapterService.getLastScenetime() !== '') {
self.lastscenetime = new Date(ChapterService.getLastScenetime());
self.scenetime = self.scenerevision.time;
}
if (ChapterService.getLastScenetime() !== '') {
self.lastscenetime = new Date(ChapterService.getLastScenetime());
} else {
self.lastscenetime = new Date();
}
// check if is valid gregorian date
if (self.scenerevision.timegregorian) {
let testDate = new Date(self.scenerevision.time);
if (isNaN(testDate.getTime())) {
self.scenerevision.time = null;
}
}
self.scenetime = self.scenerevision.time;

// init narrative strands
self.initStrands();
Expand Down Expand Up @@ -286,7 +295,7 @@ function SceneTagsController($location, $routeParams, $scope, $translate,
$routeParams.sceneid);
};

$scope.$on('SCENE_TIME_SELECTED', function (event, data) {
$scope.$on('SCENE_TIME_SELECTED', function (event, data) {
self.scenerevision.time = data;
});
}
2 changes: 1 addition & 1 deletion bibisco/app/db/bibisco.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
{
"name": "version",
"value": "2.0.1-CE",
"value": "2.0.2-CE",
"meta": {
"revision": 0,
"created": 1487541445279,
Expand Down
2 changes: 1 addition & 1 deletion bibisco/app/db/clean/bibisco.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
{
"name": "version",
"value": "2.0.1-CE",
"value": "2.0.2-CE",
"meta": {
"revision": 0,
"created": 1487541445279,
Expand Down
4 changes: 1 addition & 3 deletions bibisco/app/directives/datetimepicker/datetimepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,7 @@
var tempMoment = getMoment(modelValue);
if (tempMoment.isValid()) {
tempDate = tempMoment.toDate();
} else {
throw new Error('Invalid date: ' + modelValue);
}
}
}
return tempDate.getTime() - (tempDate.getTimezoneOffset() * 60000);
}
Expand Down
6 changes: 3 additions & 3 deletions bibisco/app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bibisco",
"productName": "bibisco",
"version": "2.0.1",
"version": "2.0.2",
"description": "writing novel application",
"license": "GPL v3",
"repository": "https://github.com/andreafeccomandi/bibisco",
Expand All @@ -19,8 +19,8 @@
"package-win32": "electron-packager . bibisco --overwrite --platform=win32 --arch=ia32 --icon=assets/icons/win/bibisco_circle_hr_MYa_icon.ico --prune=true --out=/Users/andreafeccomandi/VM/transfer_folder --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"bibisco\"",
"package-win64": "electron-packager . bibisco --overwrite --platform=win32 --arch=x64 --icon=assets/icons/win/bibisco_circle_hr_MYa_icon.ico --prune=true --out=/Users/andreafeccomandi/VM/transfer_folder --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"bibisco\"",
"package-linux": "electron-packager . --overwrite --platform=linux --arch=x64 --icon=assets/icons/linux/bibisco-circle-hr.png --prune=true --out=/Users/andreafeccomandi/VM/transfer_folder",
"create-installer-mac-ce": "electron-installer-dmg /Users/andreafeccomandi/work/release-builds/bibisco-mac-x64-2.0.1-CE/bibisco.app bibisco-mac-x64-2.0.1-CE --background=assets/icons/mac/background.png --icon=assets/icons/mac/icon.icns --debug --out=/Users/andreafeccomandi/work/release-builds --overwrite",
"create-installer-mac-se": "electron-installer-dmg /Users/andreafeccomandi/work/release-builds/bibisco-mac-x64-2.0.1-SE/bibisco.app bibisco-mac-x64-2.0.1-SE --background=assets/icons/mac/background.png --icon=assets/icons/mac/icon.icns --debug --out=/Users/andreafeccomandi/work/release-builds --overwrite",
"create-installer-mac-ce": "electron-installer-dmg /Users/andreafeccomandi/work/release-builds/bibisco-mac-x64-2.0.2-CE/bibisco.app bibisco-mac-x64-2.0.2-CE --background=assets/icons/mac/background.png --icon=assets/icons/mac/icon.icns --debug --out=/Users/andreafeccomandi/work/release-builds --overwrite",
"create-installer-mac-se": "electron-installer-dmg /Users/andreafeccomandi/work/release-builds/bibisco-mac-x64-2.0.2-SE/bibisco.app bibisco-mac-x64-2.0.2-SE --background=assets/icons/mac/background.png --icon=assets/icons/mac/icon.icns --debug --out=/Users/andreafeccomandi/work/release-builds --overwrite",
"export-mac-ce": "npm run package-mac-ce && create-installer-mac-ce",
"export-mac-se": "npm run package-mac-se && create-installer-mac-se"
},
Expand Down
3 changes: 3 additions & 0 deletions bibisco/app/services/AnalysisService.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ angular.module('bibiscoApp').service('AnalysisService', function ($translate,
let timegregorian = scenes[i].revisions[scenes[i].revision].timegregorian;
if (time && timegregorian) {
time = new Date(time);
if (isNaN(time.getTime())) {
time = null;
}
}

appearances.push({
Expand Down
6 changes: 5 additions & 1 deletion bibisco/app/services/TimelineService.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ angular.module('bibiscoApp').service('TimelineService', function (
timelineitem.time = scenes[i].revisions[scenes[i].revision].time;
if (timelineitem.time && timelineitem.timegregorian) {
timelineitem.time = new Date(timelineitem.time);
timelineitem.sceneyear = DatetimeService.calculateSceneYear(timelineitem.time);
if (isNaN(timelineitem.time.getTime())) {
timelineitem.time = null;
} else {
timelineitem.sceneyear = DatetimeService.calculateSceneYear(timelineitem.time);
}
} else {
timelineitem.sceneyear = null;
}
Expand Down

0 comments on commit 1d51cd6

Please sign in to comment.