mirror of
https://codeberg.org/scip/digiproof.git
synced 2025-12-17 04:30:59 +01:00
Added GPL disclaimers, some comments here and there, fixed dev/prod CSS.
This commit is contained in:
41
Makefile
41
Makefile
@@ -1,3 +1,44 @@
|
|||||||
|
#
|
||||||
|
# This file is part of the digital testament management program
|
||||||
|
# DigiProof.
|
||||||
|
#
|
||||||
|
# By accessing this software, DigiProof, you are duly informed
|
||||||
|
# of and agree to be bound by the conditions described below in this
|
||||||
|
# notice:
|
||||||
|
#
|
||||||
|
# This software product, DigiProof, is developed by T. Linden and
|
||||||
|
# copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
#
|
||||||
|
# There is no charge for DigiProof software. You can redistribute
|
||||||
|
# it and/or modify it under the terms of the GNU General Public
|
||||||
|
# License, which is incorporated by reference herein.
|
||||||
|
#
|
||||||
|
# DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
# OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
# the use of it will not infringe on any third party's intellectual
|
||||||
|
# property rights.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with DigiProof. Copies can also be obtained from:
|
||||||
|
#
|
||||||
|
# http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
#
|
||||||
|
# or by writing to:
|
||||||
|
#
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
# Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
# Boston, MA 02110-1301
|
||||||
|
# USA
|
||||||
|
#
|
||||||
|
# Or contact:
|
||||||
|
#
|
||||||
|
# "T. Linden" <tlinden@cpan.org>
|
||||||
|
#
|
||||||
|
# The sourcecode can be found on:
|
||||||
|
#
|
||||||
|
# https://github.com/TLINDEN/digiproof
|
||||||
|
#
|
||||||
|
|
||||||
ts != date +"%Y-%m-%d-%H%M%S"
|
ts != date +"%Y-%m-%d-%H%M%S"
|
||||||
dst = .backup/$(ts)
|
dst = .backup/$(ts)
|
||||||
src = js *.html css
|
src = js *.html css
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
48
index.html
48
index.html
@@ -1,6 +1,51 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<!--
|
||||||
|
--
|
||||||
|
-- This file is part of the digital testament management program
|
||||||
|
-- DigiProof.
|
||||||
|
--
|
||||||
|
-- By accessing this software, DigiProof, you are duly informed
|
||||||
|
-- of and agree to be bound by the conditions described below in this
|
||||||
|
-- notice:
|
||||||
|
--
|
||||||
|
-- This software product, DigiProof, is developed by T. Linden and
|
||||||
|
-- copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
--
|
||||||
|
-- There is no charge for DigiProof software. You can redistribute
|
||||||
|
-- it and/or modify it under the terms of the GNU General Public
|
||||||
|
-- License, which is incorporated by reference herein.
|
||||||
|
--
|
||||||
|
-- DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
-- OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
-- the use of it will not infringe on any third party's intellectual
|
||||||
|
-- property rights.
|
||||||
|
--
|
||||||
|
-- You should have received a copy of the GNU General Public License
|
||||||
|
-- along with DigiProof. Copies can also be obtained from:
|
||||||
|
--
|
||||||
|
-- http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
--
|
||||||
|
-- or by writing to:
|
||||||
|
--
|
||||||
|
-- Free Software Foundation, Inc.
|
||||||
|
-- Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
-- Boston, MA 02110-1301
|
||||||
|
-- USA
|
||||||
|
--
|
||||||
|
-- Or contact:
|
||||||
|
--
|
||||||
|
-- "T. Linden" <tlinden@cpan.org>
|
||||||
|
--
|
||||||
|
-- The sourcecode can be found on:
|
||||||
|
--
|
||||||
|
-- https://github.com/TLINDEN/digiproof
|
||||||
|
--
|
||||||
|
-- GIT Checksum for this file:
|
||||||
|
--
|
||||||
|
-- GITHASH
|
||||||
|
-->
|
||||||
<meta charset=utf-8 />
|
<meta charset=utf-8 />
|
||||||
<title>Digital Testament App</title>
|
<title>Digital Testament App</title>
|
||||||
<link rel="stylesheet" href="css/normalize.css">
|
<link rel="stylesheet" href="css/normalize.css">
|
||||||
@@ -823,12 +868,13 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script src="js/digiproof_dev.js"></script>
|
||||||
<script src="js/libs/globals.js"></script>
|
<script src="js/libs/globals.js"></script>
|
||||||
<script src="js/libs/jquery.js"></script>
|
<script src="js/libs/jquery.js"></script>
|
||||||
<script src="js/libs/handlebars.js"></script>
|
<script src="js/libs/handlebars.js"></script>
|
||||||
<script src="js/libs/ember.js"></script>
|
<script src="js/libs/ember.js"></script>
|
||||||
<script src="js/libs/ember-data.js"></script>
|
<script src="js/libs/ember-data.js"></script>
|
||||||
<script src="js/libs/localstorage_adapter_dev.js"></script>
|
<script src="js/libs/localstorage_adapter.js"></script>
|
||||||
<script src="js/libs/moment.js"></script>
|
<script src="js/libs/moment.js"></script>
|
||||||
|
|
||||||
<script src="js/libs/aes.js"></script>
|
<script src="js/libs/aes.js"></script>
|
||||||
|
|||||||
@@ -1,3 +1,48 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// tell if there have been anything done yet
|
||||||
function CheckForEmptyDB() {
|
function CheckForEmptyDB() {
|
||||||
var assets = App.Asset.find();
|
var assets = App.Asset.find();
|
||||||
var notempty = true;
|
var notempty = true;
|
||||||
|
|||||||
@@ -1,3 +1,55 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unused currently!
|
||||||
|
*
|
||||||
|
* The idea here was, if the user enters data and closes the page,
|
||||||
|
* check if there have been made an export and if not ask the user
|
||||||
|
* to do one.
|
||||||
|
*
|
||||||
|
* Howver, it doesn't work so far.
|
||||||
|
*/
|
||||||
|
|
||||||
function confirminit() {
|
function confirminit() {
|
||||||
window.onbeforeunload = function(e) {
|
window.onbeforeunload = function(e) {
|
||||||
|
|||||||
@@ -1,4 +1,48 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// only template stuff here, no action.
|
||||||
App.AboutController = Ember.Controller.extend({
|
App.AboutController = Ember.Controller.extend({
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,50 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* distribute those template vars app-wide
|
||||||
|
*/
|
||||||
App.ApplicationController = Ember.Controller.extend({
|
App.ApplicationController = Ember.Controller.extend({
|
||||||
isDevel: isDevel,
|
isDevel: isDevel,
|
||||||
VERSION: VERSION
|
VERSION: VERSION
|
||||||
|
|||||||
@@ -1,3 +1,47 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
App.AssetsAssetController = Ember.ObjectController.extend({
|
App.AssetsAssetController = Ember.ObjectController.extend({
|
||||||
|
|||||||
@@ -1,3 +1,52 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This controller is being used to data export and import.
|
||||||
|
* It handles the whole encryption/decryption of data.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
App.DataExportController = Ember.ArrayController.extend({
|
App.DataExportController = Ember.ArrayController.extend({
|
||||||
@@ -57,7 +106,7 @@ App.DataExportController = Ember.ArrayController.extend({
|
|||||||
hash = CryptoJS.SHA512(hash);
|
hash = CryptoJS.SHA512(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fix comma syntax
|
// fix handlebars generated json output comma syntax
|
||||||
raw = raw.replace(/,\],/g, '],');
|
raw = raw.replace(/,\],/g, '],');
|
||||||
// console.log("raw: %s", raw);
|
// console.log("raw: %s", raw);
|
||||||
var cr = CryptoJS.AES.encrypt(escape(raw), hash.toString(CryptoJS.enc.Base64));
|
var cr = CryptoJS.AES.encrypt(escape(raw), hash.toString(CryptoJS.enc.Base64));
|
||||||
@@ -94,7 +143,9 @@ App.DataExportController = Ember.ArrayController.extend({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Helper for file upload button in the data/import view.
|
||||||
|
*/
|
||||||
var UploadedImport = null;
|
var UploadedImport = null;
|
||||||
App.UploadFileView = Ember.TextField.extend({
|
App.UploadFileView = Ember.TextField.extend({
|
||||||
// WARN: this one gets fired as soon as the user selected a file
|
// WARN: this one gets fired as soon as the user selected a file
|
||||||
@@ -109,7 +160,7 @@ App.UploadFileView = Ember.TextField.extend({
|
|||||||
var that = this;
|
var that = this;
|
||||||
reader.onload = function(e) {
|
reader.onload = function(e) {
|
||||||
var targ;
|
var targ;
|
||||||
if (!e) var e = window.event;
|
if (!e) var e = window.event; // IE compatibility check
|
||||||
if (e.target) targ = e.target;
|
if (e.target) targ = e.target;
|
||||||
else if (e.srcElement) targ = e.srcElement;
|
else if (e.srcElement) targ = e.srcElement;
|
||||||
if (targ.nodeType == 3) // defeat Safari bug
|
if (targ.nodeType == 3) // defeat Safari bug
|
||||||
|
|||||||
@@ -1,4 +1,50 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Used for general navbar display and intro texts
|
||||||
|
*/
|
||||||
App.IndexController = Ember.Controller.extend({
|
App.IndexController = Ember.Controller.extend({
|
||||||
has_self: App.Self.find(),
|
has_self: App.Self.find(),
|
||||||
has_asset: App.Asset.find(),
|
has_asset: App.Asset.find(),
|
||||||
@@ -8,7 +54,10 @@ App.IndexController = Ember.Controller.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Make sure, a clicked menu item gets highlighted,
|
||||||
|
* so the user knows where he is.
|
||||||
|
*/
|
||||||
App.NavView = Ember.View.extend({
|
App.NavView = Ember.View.extend({
|
||||||
tagName: 'li',
|
tagName: 'li',
|
||||||
classNameBindings: 'active'.w(),
|
classNameBindings: 'active'.w(),
|
||||||
|
|||||||
@@ -1,3 +1,47 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
App.SelfController = Ember.ObjectController.extend({
|
App.SelfController = Ember.ObjectController.extend({
|
||||||
isEditing: false,
|
isEditing: false,
|
||||||
|
|||||||
@@ -1,7 +1,51 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// manage successors: create, edit and delete them.
|
||||||
App.SuccessorsSuccessorController = Ember.ObjectController.extend({
|
App.SuccessorsSuccessorController = Ember.ObjectController.extend({
|
||||||
isEditing: false,
|
isEditing: false,
|
||||||
errors: {},
|
errors: {},
|
||||||
|
|||||||
@@ -1,4 +1,52 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* plain simple controller, just spits out all our
|
||||||
|
* data, the acual testament generation happens in the
|
||||||
|
* template
|
||||||
|
*/
|
||||||
App.TestamentController = Ember.ArrayController.extend({
|
App.TestamentController = Ember.ArrayController.extend({
|
||||||
needs: "self",
|
needs: "self",
|
||||||
//self: Ember.computed.alias("controllers.self"),
|
//self: Ember.computed.alias("controllers.self"),
|
||||||
|
|||||||
45
js/digiproof_dev.js
Normal file
45
js/digiproof_dev.js
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// signal the app, we are running in development mode!
|
||||||
|
var isDevel = true;
|
||||||
61
js/digiproof_prod.js
Normal file
61
js/digiproof_prod.js
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// signal the app, we are running in productive mode!
|
||||||
|
var isDevel = false;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* in the production actual saving to browser
|
||||||
|
* storage on disk is disabled here by overwriting
|
||||||
|
* the setItem and getItem function of localStorage
|
||||||
|
* with dummies, which hold the data in memory only.
|
||||||
|
*/
|
||||||
|
localStorage.setItem = function(namespace, json) {
|
||||||
|
this.set('_fakestore') = { namespace: json };
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.getItem = function(namespace) {
|
||||||
|
return this.get('_fakestore').namespace;
|
||||||
|
}
|
||||||
|
|
||||||
48
js/fs.js
48
js/fs.js
@@ -1,3 +1,51 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* CURRENTLY UNUSED !!!!!
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
//--
|
//--
|
||||||
//-- Filesystem code from TiddlyWiki
|
//-- Filesystem code from TiddlyWiki
|
||||||
|
|||||||
@@ -1,5 +1,54 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
// https://gist.github.com/tracend/3261055
|
|
||||||
|
/*
|
||||||
|
* handlebars helper to translate strings.
|
||||||
|
* Those are defined in js/locale.js, see there. Called with
|
||||||
|
* {{loc _tag}} from any handlebars template.
|
||||||
|
*
|
||||||
|
* See https://gist.github.com/tracend/3261055
|
||||||
|
*/
|
||||||
Ember.Handlebars.registerBoundHelper('loc', function(keyword, options) {
|
Ember.Handlebars.registerBoundHelper('loc', function(keyword, options) {
|
||||||
// pick the right dictionary
|
// pick the right dictionary
|
||||||
var locale = window.locale[lang] || window.locale['en-US'];
|
var locale = window.locale[lang] || window.locale['en-US'];
|
||||||
@@ -31,10 +80,7 @@ Ember.Handlebars.registerBoundHelper('loc', function(keyword, options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Ember.Handlebars.registerBoundHelper('ifeq', function(v1, v2, options) {
|
// print a nice formatted date to the testament printout
|
||||||
return (this.get(v1) == v2) ? options.fn(this) : '';
|
|
||||||
});
|
|
||||||
|
|
||||||
Ember.Handlebars.registerBoundHelper('date', function(date) {
|
Ember.Handlebars.registerBoundHelper('date', function(date) {
|
||||||
moment().lang(lang);
|
moment().lang(lang);
|
||||||
return moment(date).format('LL');
|
return moment(date).format('LL');
|
||||||
|
|||||||
55
js/init.js
55
js/init.js
@@ -1,14 +1,59 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
// just the app object. put ember.js tuning, logging etc here.
|
||||||
App = Ember.Application.create({
|
App = Ember.Application.create({
|
||||||
//LOG_TRANSITIONS: true
|
//LOG_TRANSITIONS: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* make sure, only one popover appears at a time.
|
* Some trickery for help popovers:
|
||||||
* if the user hovers over another help button,
|
* make sure, only one popover appears at a time.
|
||||||
* hide other popovers and display the new. Hide
|
* if the user hovers over another help button,
|
||||||
* all if not above a help button at all.
|
* hide other popovers and display the new. Hide
|
||||||
*/
|
* all if not above a help button at all.
|
||||||
|
*/
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('.popup-marker').popover({
|
$('.popup-marker').popover({
|
||||||
html: true,
|
html: true,
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
var isDevel = true;
|
|
||||||
|
|
||||||
DS.LSSerializer = DS.JSONSerializer.extend({
|
DS.LSSerializer = DS.JSONSerializer.extend({
|
||||||
|
|
||||||
addBelongsTo: function(data, record, key, association) {
|
addBelongsTo: function(data, record, key, association) {
|
||||||
@@ -1,238 +0,0 @@
|
|||||||
var isDevel = false;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* in the production actual saving to browser
|
|
||||||
* storage on disk is disabled here by overwriting
|
|
||||||
* the setItem and getItem function with dummies,
|
|
||||||
* which hold the data in memory only.
|
|
||||||
*/
|
|
||||||
localStorage.setItem = function(namespace, json) {
|
|
||||||
this.set('_fakestore') = { namespace: json };
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
localStorage.getItem = function(namespace) {
|
|
||||||
return this.get('_fakestore').namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
DS.LSSerializer = DS.JSONSerializer.extend({
|
|
||||||
|
|
||||||
addBelongsTo: function(data, record, key, association) {
|
|
||||||
data[key] = record.get(key + '.id');
|
|
||||||
},
|
|
||||||
|
|
||||||
addHasMany: function(data, record, key, association) {
|
|
||||||
data[key] = record.get(key).map(function(record) {
|
|
||||||
return record.get('id');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// extract expects a root key, we don't want to save all these keys to
|
|
||||||
// localStorage so we generate the root keys here
|
|
||||||
extract: function(loader, json, type, record) {
|
|
||||||
this._super(loader, this.rootJSON(json, type), type, record);
|
|
||||||
},
|
|
||||||
|
|
||||||
extractMany: function(loader, json, type, records) {
|
|
||||||
this._super(loader, this.rootJSON(json, type, 'pluralize'), type, records);
|
|
||||||
},
|
|
||||||
|
|
||||||
rootJSON: function(json, type, pluralize) {
|
|
||||||
var root = this.rootForType(type);
|
|
||||||
if (pluralize == 'pluralize') { root = this.pluralize(root); }
|
|
||||||
var rootedJSON = {};
|
|
||||||
rootedJSON[root] = json;
|
|
||||||
return rootedJSON;
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
DS.LSAdapter = DS.Adapter.extend(Ember.Evented, {
|
|
||||||
|
|
||||||
init: function() {
|
|
||||||
this._loadData();
|
|
||||||
},
|
|
||||||
|
|
||||||
generateIdForRecord: function() {
|
|
||||||
return Math.random().toString(32).slice(2).substr(0,5);
|
|
||||||
},
|
|
||||||
|
|
||||||
serializer: DS.LSSerializer.create(),
|
|
||||||
|
|
||||||
find: function(store, type, id) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function(){
|
|
||||||
var copy = Ember.copy(namespace.records[id]);
|
|
||||||
this.didFindRecord(store, type, copy, id);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
findMany: function(store, type, ids) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function(){
|
|
||||||
var results = [];
|
|
||||||
for (var i = 0; i < ids.length; i++) {
|
|
||||||
results.push(Ember.copy(namespace.records[ids[i]]));
|
|
||||||
}
|
|
||||||
this.didFindMany(store, type, results);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// Supports queries that look like this:
|
|
||||||
//
|
|
||||||
// {
|
|
||||||
// <property to query>: <value or regex (for strings) to match>,
|
|
||||||
// ...
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// Every property added to the query is an "AND" query, not "OR"
|
|
||||||
//
|
|
||||||
// Example:
|
|
||||||
//
|
|
||||||
// match records with "complete: true" and the name "foo" or "bar"
|
|
||||||
//
|
|
||||||
// { complete: true, name: /foo|bar/ }
|
|
||||||
findQuery: function(store, type, query, recordArray) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function() {
|
|
||||||
var results = this.query(namespace.records, query);
|
|
||||||
this.didFindQuery(store, type, results, recordArray);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
query: function(records, query) {
|
|
||||||
var results = [];
|
|
||||||
var id, record, property, test, push;
|
|
||||||
for (id in records) {
|
|
||||||
record = records[id];
|
|
||||||
for (property in query) {
|
|
||||||
test = query[property];
|
|
||||||
push = false;
|
|
||||||
if (Object.prototype.toString.call(test) == '[object RegExp]') {
|
|
||||||
push = test.test(record[property]);
|
|
||||||
} else {
|
|
||||||
push = record[property] === test;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (push) {
|
|
||||||
results.push(record);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
},
|
|
||||||
|
|
||||||
findAll: function(store, type) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function() {
|
|
||||||
var results = [];
|
|
||||||
for (var id in namespace.records) {
|
|
||||||
results.push(Ember.copy(namespace.records[id]));
|
|
||||||
}
|
|
||||||
this.didFindAll(store, type, results);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
createRecords: function(store, type, records) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
records.forEach(function(record) {
|
|
||||||
this._addRecordToNamespace(namespace, record);
|
|
||||||
}, this);
|
|
||||||
this._async(function() {
|
|
||||||
this._didSaveRecords(store, type, records);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
updateRecords: function(store, type, records) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function() {
|
|
||||||
records.forEach(function(record) {
|
|
||||||
var id = record.get('id');
|
|
||||||
namespace.records[id] = record.serialize({includeId:true});
|
|
||||||
}, this);
|
|
||||||
this._didSaveRecords(store, type, records);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteRecords: function(store, type, records) {
|
|
||||||
var namespace = this._namespaceForType(type);
|
|
||||||
this._async(function() {
|
|
||||||
records.forEach(function(record) {
|
|
||||||
var id = record.get('id');
|
|
||||||
delete namespace.records[id];
|
|
||||||
});
|
|
||||||
this._didSaveRecords(store, type, records);
|
|
||||||
});
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
dirtyRecordsForHasManyChange: function(dirtySet, parent, relationship) {
|
|
||||||
dirtySet.add(parent);
|
|
||||||
},
|
|
||||||
|
|
||||||
dirtyRecordsForBelongsToChange: function(dirtySet, child, relationship) {
|
|
||||||
dirtySet.add(child);
|
|
||||||
},
|
|
||||||
|
|
||||||
// private
|
|
||||||
|
|
||||||
_getNamespace: function() {
|
|
||||||
return this.namespace || 'DS.LSAdapter';
|
|
||||||
},
|
|
||||||
|
|
||||||
_loadData: function() {
|
|
||||||
try {
|
|
||||||
var storage = localStorage.getItem(this._getNamespace());
|
|
||||||
this._data = storage ? JSON.parse(storage) : {};
|
|
||||||
}
|
|
||||||
catch(e) {
|
|
||||||
this._data = {};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_didSaveRecords: function(store, type, records) {
|
|
||||||
var success = this._saveData();
|
|
||||||
if (success) {
|
|
||||||
store.didSaveRecords(records);
|
|
||||||
} else {
|
|
||||||
records.forEach(function(record) {
|
|
||||||
store.recordWasError(record);
|
|
||||||
});
|
|
||||||
this.trigger('QUOTA_EXCEEDED_ERR', records);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_saveData: function() {
|
|
||||||
try {
|
|
||||||
localStorage.setItem(this._getNamespace(), JSON.stringify(this._data));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch(error) {
|
|
||||||
if (error.name == 'QUOTA_EXCEEDED_ERR') {
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
// IE, Ignore. throw new Error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_namespaceForType: function(type) {
|
|
||||||
var namespace = type.url || type.toString();
|
|
||||||
return this._data[namespace] || (
|
|
||||||
this._data[namespace] = {records: {}}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
_addRecordToNamespace: function(namespace, record) {
|
|
||||||
var data = record.serialize({includeId: true});
|
|
||||||
namespace.records[data.id] = data;
|
|
||||||
},
|
|
||||||
|
|
||||||
_async: function(callback) {
|
|
||||||
var _this = this;
|
|
||||||
setTimeout(function(){
|
|
||||||
Ember.run(_this, callback);
|
|
||||||
}, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
@@ -1 +1 @@
|
|||||||
var VERSION = "2013-09-13-155304"
|
var VERSION = "2013-09-15-120917"
|
||||||
|
|||||||
57
js/locale.js
57
js/locale.js
@@ -1,6 +1,61 @@
|
|||||||
var lang = (navigator.language) ? navigator.language : navigator.userLanguage;
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* All visible strings, that is, menus, help texts, form labels
|
||||||
|
* etc will be put here. The language to be used will be determined
|
||||||
|
* by what the browser tells us. If the language is known (that is,
|
||||||
|
* the locale is contained in our window.locale hash), it will just
|
||||||
|
* be used, otherwise a fallback to en-US will be done.
|
||||||
|
* Use from templates with {{loc _tag}} where tag is a key of the
|
||||||
|
* window.locale hash. 'loc' is a handlebars helper defined in
|
||||||
|
* handlebars_helpers.js
|
||||||
|
* Use from JS with translate(tag). translate() is defined here.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var lang = (navigator.language) ? navigator.language : navigator.userLanguage;
|
||||||
|
|
||||||
|
|
||||||
window.locale = {
|
window.locale = {
|
||||||
"en-US": {
|
"en-US": {
|
||||||
|
|||||||
59
js/mixins.js
59
js/mixins.js
@@ -1,16 +1,55 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Those mixins will be used to extend our models
|
||||||
|
* see models.js. In general we add validators,
|
||||||
|
* which will be called on edit or save of an instance.
|
||||||
|
*/
|
||||||
App.SelfMixin = Ember.Mixin.create({
|
App.SelfMixin = Ember.Mixin.create({
|
||||||
passwdset: null,
|
passwdset: null,
|
||||||
|
|
||||||
/*
|
|
||||||
didLoad: function() {
|
|
||||||
this._passwdset();
|
|
||||||
},
|
|
||||||
|
|
||||||
didUpdate: function() {
|
|
||||||
this.didLoad();
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
|
|
||||||
validate: function() {
|
validate: function() {
|
||||||
var valid = true;
|
var valid = true;
|
||||||
var errors = {valid: true};
|
var errors = {valid: true};
|
||||||
|
|||||||
44
js/models.js
44
js/models.js
@@ -1,3 +1,47 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var attr = DS.attr;
|
var attr = DS.attr;
|
||||||
|
|
||||||
|
|||||||
50
js/router.js
50
js/router.js
@@ -1,4 +1,50 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Router for all links/uris in the app
|
||||||
|
*/
|
||||||
App.Router.map(function() {
|
App.Router.map(function() {
|
||||||
this.resource('assets', function() {
|
this.resource('assets', function() {
|
||||||
this.route('asset', { path: ':asset_id' });
|
this.route('asset', { path: ':asset_id' });
|
||||||
@@ -29,6 +75,10 @@ App.AssetsRoute = Ember.Route.extend({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
* the Self controller operates on one instance
|
||||||
|
* only, since there are not many "selfes" required.
|
||||||
|
*/
|
||||||
App.SelfRoute = Ember.Route.extend({
|
App.SelfRoute = Ember.Route.extend({
|
||||||
setupController: function(controller) {
|
setupController: function(controller) {
|
||||||
controller.set('model', App.Self.find(0));
|
controller.set('model', App.Self.find(0));
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
/* crypto helpers */
|
|
||||||
|
|
||||||
|
|
||||||
function pwhash(pass) {
|
|
||||||
/* get the clear text password, generate a salt
|
|
||||||
and hash them together. return the hash */
|
|
||||||
var salt = CryptoJS.lib.WordArray.random(128/8);
|
|
||||||
console.log("key: %s, salt: %s", pass, salt);
|
|
||||||
var key512iter32 = CryptoJS.PBKDF2(pass, salt,{ keySize: 512/32, iterations: 32, hasher: CryptoJS.algo.SHA512 });
|
|
||||||
return key512iter32;
|
|
||||||
}
|
|
||||||
54
js/store.js
54
js/store.js
@@ -1,10 +1,63 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* This file is part of the digital testament management program
|
||||||
|
* DigiProof.
|
||||||
|
*
|
||||||
|
* By accessing this software, DigiProof, you are duly informed
|
||||||
|
* of and agree to be bound by the conditions described below in this
|
||||||
|
* notice:
|
||||||
|
*
|
||||||
|
* This software product, DigiProof, is developed by T. Linden and
|
||||||
|
* copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
*
|
||||||
|
* There is no charge for DigiProof software. You can redistribute
|
||||||
|
* it and/or modify it under the terms of the GNU General Public
|
||||||
|
* License, which is incorporated by reference herein.
|
||||||
|
*
|
||||||
|
* DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
* OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
* the use of it will not infringe on any third party's intellectual
|
||||||
|
* property rights.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with DigiProof. Copies can also be obtained from:
|
||||||
|
*
|
||||||
|
* http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
*
|
||||||
|
* or by writing to:
|
||||||
|
*
|
||||||
|
* Free Software Foundation, Inc.
|
||||||
|
* Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
* Boston, MA 02110-1301
|
||||||
|
* USA
|
||||||
|
*
|
||||||
|
* Or contact:
|
||||||
|
*
|
||||||
|
* "T. Linden" <tlinden@cpan.org>
|
||||||
|
*
|
||||||
|
* The sourcecode can be found on:
|
||||||
|
*
|
||||||
|
* https://github.com/TLINDEN/digiproof
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Ember.js store for our app. We're using localstorage,
|
||||||
|
* which is disabled in the production version though.
|
||||||
|
*/
|
||||||
App.store = DS.Store.createWithMixins({
|
App.store = DS.Store.createWithMixins({
|
||||||
revision: 12,
|
revision: 12,
|
||||||
adapter: DS.LSAdapter.create({
|
adapter: DS.LSAdapter.create({
|
||||||
namespace: 'digiproof'
|
namespace: 'digiproof'
|
||||||
}),
|
}),
|
||||||
init: function() {
|
init: function() {
|
||||||
|
/*
|
||||||
|
* initialize some default objects for successor and order.
|
||||||
|
* the latter cannot be maintained by the user (as of now).
|
||||||
|
*
|
||||||
|
* FIXME: put the strings into js/locale.js.
|
||||||
|
*/
|
||||||
this._super();
|
this._super();
|
||||||
this.loadMany(App.Import,[ { 'id': 0, 'importdata': '' }]);
|
this.loadMany(App.Import,[ { 'id': 0, 'importdata': '' }]);
|
||||||
if(lang === 'de') {
|
if(lang === 'de') {
|
||||||
@@ -29,6 +82,7 @@ App.store = DS.Store.createWithMixins({
|
|||||||
);
|
);
|
||||||
this.loadMany(App.Successor, [{ 'id': 0, 'name': 'My regular legal succesor(s)' }]);
|
this.loadMany(App.Successor, [{ 'id': 0, 'name': 'My regular legal succesor(s)' }]);
|
||||||
}
|
}
|
||||||
|
// commit the objects so that reverse relations get properly saved
|
||||||
this.commit();
|
this.commit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,4 +1,51 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# This file is part of the digital testament management program
|
||||||
|
# DigiProof.
|
||||||
|
#
|
||||||
|
# By accessing this software, DigiProof, you are duly informed
|
||||||
|
# of and agree to be bound by the conditions described below in this
|
||||||
|
# notice:
|
||||||
|
#
|
||||||
|
# This software product, DigiProof, is developed by T. Linden and
|
||||||
|
# copyrighted (C) 2013 by T. Linden, with all rights reserved.
|
||||||
|
#
|
||||||
|
# There is no charge for DigiProof software. You can redistribute
|
||||||
|
# it and/or modify it under the terms of the GNU General Public
|
||||||
|
# License, which is incorporated by reference herein.
|
||||||
|
#
|
||||||
|
# DigiProof is distributed WITHOUT ANY WARRANTY, IMPLIED OR EXPRESS,
|
||||||
|
# OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE or that
|
||||||
|
# the use of it will not infringe on any third party's intellectual
|
||||||
|
# property rights.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with DigiProof. Copies can also be obtained from:
|
||||||
|
#
|
||||||
|
# http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
#
|
||||||
|
# or by writing to:
|
||||||
|
#
|
||||||
|
# Free Software Foundation, Inc.
|
||||||
|
# Inc., 51 Franklin Street, Fifth Floor
|
||||||
|
# Boston, MA 02110-1301
|
||||||
|
# USA
|
||||||
|
#
|
||||||
|
# Or contact:
|
||||||
|
#
|
||||||
|
# "T. Linden" <tlinden@cpan.org>
|
||||||
|
#
|
||||||
|
# The sourcecode can be found on:
|
||||||
|
#
|
||||||
|
# https://github.com/TLINDEN/digiproof
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Used to build digiproof-prod.html and digiproof-dev.html
|
||||||
|
# from source files. It just creates a single html file from
|
||||||
|
# everything. JS and CSS will bin minified, comments removed,
|
||||||
|
# src-file and git hash added.
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use JavaScript::Minifier qw(minify);
|
use JavaScript::Minifier qw(minify);
|
||||||
use CSS::Compressor qw( css_compress );
|
use CSS::Compressor qw( css_compress );
|
||||||
@@ -38,14 +85,18 @@ foreach (@source) {
|
|||||||
}
|
}
|
||||||
elsif (/script src="([^"]*)"/) {
|
elsif (/script src="([^"]*)"/) {
|
||||||
my $jsfile = $1;
|
my $jsfile = $1;
|
||||||
if ($jsfile =~ /localstorage/) {
|
if ($jsfile =~ /digiproof/) {
|
||||||
$jsfile = "js/libs/localstorage_adapter_$type.js";
|
$jsfile = "js/digiproof_$type.js";
|
||||||
}
|
}
|
||||||
print STDERR "Inserting $jsfile\n";
|
print STDERR "Inserting $jsfile\n";
|
||||||
print qq(<script type="text/javascript">\n);
|
print qq(<script type="text/javascript">\n);
|
||||||
print &fetch($jsfile);
|
print &fetch($jsfile);
|
||||||
print qq(</script>\n);
|
print qq(</script>\n);
|
||||||
}
|
}
|
||||||
|
elsif (/GITHASH/) {
|
||||||
|
my $hash = &githash($index);
|
||||||
|
print " -- Source: $index, Githash: $hash\n";
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
print qq($_\n);
|
print qq($_\n);
|
||||||
}
|
}
|
||||||
@@ -57,9 +108,10 @@ foreach (@source) {
|
|||||||
sub fetch {
|
sub fetch {
|
||||||
my $file = shift;
|
my $file = shift;
|
||||||
open F, "<$file" or die "Could not open index: $file $!\n";
|
open F, "<$file" or die "Could not open index: $file $!\n";
|
||||||
|
my $hash = &githash($file);
|
||||||
if($file =~ /\.js/) {
|
if($file =~ /\.js/) {
|
||||||
my $js;
|
my $js;
|
||||||
my $from = "/* js from $file */\n";
|
my $from = "/* js from $file ($hash) */\n";
|
||||||
if ($type eq 'prod') {
|
if ($type eq 'prod') {
|
||||||
$js = minify(input => *F);
|
$js = minify(input => *F);
|
||||||
# ember.js (and probably others) contain strings which contain </script>
|
# ember.js (and probably others) contain strings which contain </script>
|
||||||
@@ -74,7 +126,7 @@ sub fetch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $from = "/* css from $file */\n";
|
my $from = "/* css from $file ($hash) */\n";
|
||||||
my $src = join "", <F>;
|
my $src = join "", <F>;
|
||||||
close F;
|
close F;
|
||||||
if ($prod) {
|
if ($prod) {
|
||||||
@@ -85,3 +137,10 @@ sub fetch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub githash {
|
||||||
|
my $file = shift;
|
||||||
|
my $hash = `git hash-object $file`;
|
||||||
|
chomp $hash;
|
||||||
|
return $hash;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user