Fix duplicate helper bugs in Lesion Tracker

This commit is contained in:
Erik Ziegler 2016-08-05 10:09:12 +02:00
parent 9bf96f24d7
commit f963fec586
19 changed files with 124 additions and 181 deletions

View File

@ -12,3 +12,4 @@ notices-for-facebook-graph-api-2
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.3.5-remove-old-dev-bundle-link
1.4.0-remove-old-dev-bundle-link

View File

@ -1 +0,0 @@
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle

46
LesionTracker/.meteor/packages Executable file → Normal file
View File

@ -4,16 +4,16 @@
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor's client-side reactive programming library
meteor-base@1.0.4 # Packages every Meteor app needs to have
mobile-experience@1.0.4 # Packages for a great mobile UX
mongo@1.1.10 # The database Meteor supports right now
blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views
session@1.1.6 # Client-side reactive dictionary for your app
jquery@1.11.9 # Helpful client-side library
tracker@1.1.0 # Meteor's client-side reactive programming library
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
es5-shim@4.6.13 # ECMAScript 5 compatibility for older browsers.
ecmascript@0.5.7 # Enable ECMAScript2015+ syntax in app code
clinical:router
clinical:extended-api
@ -27,37 +27,37 @@ clinical:hipaa-logger
design
ohif:core
insecure # Allow all DB writes from clients (for prototyping)
insecure@1.0.7 # Allow all DB writes from clients (for prototyping)
cornerstone
worklist
viewerbase
dicomweb
accounts-base
accounts-password
accounts-base@1.2.9
accounts-password@1.2.12
ian:accounts-ui-bootstrap-3
twbs:bootstrap
http
http@1.2.8
arsnebula:reactive-promise
promise
stylus
promise@0.8.3
stylus@2.513.4
fortawesome:fontawesome
random
reactive-var
reactive-dict
random@1.0.10
reactive-var@1.0.10
reactive-dict@1.1.8
lesiontracker
practicalmeteor:loglevel
momentjs:moment
anti:gagarin@=0.4.11
check
check@1.2.3
aldeed:template-extension@4.0.0
zuuk:stale-session
gilbertwat:bootstrap3-daterangepicker
email
email@1.1.16
peppelg:bootstrap-3-modal
simple:reactive-method
hangingprotocols
fastclick
standard-minifier-css
standard-minifier-js
fastclick@1.0.12
standard-minifier-css@1.1.8
standard-minifier-js@1.1.8

View File

@ -1 +1 @@
METEOR@1.3.5.1
METEOR@1.4.0.1

View File

@ -1,21 +1,21 @@
accounts-base@1.2.8
accounts-password@1.1.13
accounts-base@1.2.9
accounts-password@1.2.12
aldeed:simple-schema@1.5.3
aldeed:template-extension@4.0.0
allow-deny@1.0.5
anti:gagarin@0.4.11
anti:i18n@0.4.3
arsnebula:reactive-promise@0.9.1
autoupdate@1.2.11
babel-compiler@6.8.5
babel-runtime@0.1.9_1
autoupdate@1.3.11
babel-compiler@6.9.0
babel-runtime@0.1.10
base64@1.0.9
binary-heap@1.0.9
blaze@2.1.8
blaze-html-templates@1.0.4
blaze-tools@1.0.9
boilerplate-generator@1.0.9
caching-compiler@1.0.6
caching-compiler@1.1.6
caching-html-compiler@1.0.6
callback-hook@1.0.9
check@1.2.3
@ -31,23 +31,23 @@ clinical:router-location@2.1.0
clinical:router-middleware-stack@2.1.2
clinical:router-url@2.1.0
clinical:theming@0.4.10
coffeescript@1.1.4
coffeescript@1.2.3
cornerstone@0.0.1
ddp@1.2.5
ddp-client@1.2.9
ddp-client@1.3.0
ddp-common@1.2.6
ddp-rate-limiter@1.0.5
ddp-server@1.2.10
ddp-server@1.3.9
deps@1.0.12
design@0.0.1
dicomweb@0.0.1
diff-sequence@1.0.6
dimseservice@0.0.1
ecmascript@0.4.8
ecmascript-runtime@0.2.12
ecmascript@0.5.7
ecmascript-runtime@0.3.12
ejson@1.0.12
email@1.0.16
es5-shim@4.5.13
email@1.1.16
es5-shim@4.6.13
fastclick@1.0.12
fortawesome:fontawesome@4.5.0
geojson-utils@1.0.9
@ -57,7 +57,7 @@ hangingprotocols@0.0.1
hot-code-push@1.0.4
html-tools@1.0.10
htmljs@1.0.10
http@1.1.8
http@1.2.8
ian:accounts-ui-bootstrap-3@1.2.89
id-map@1.0.8
insecure@1.0.7
@ -70,25 +70,25 @@ launch-screen@1.0.12
lesiontracker@0.0.1
livedata@1.0.18
localstorage@1.0.11
logging@1.0.14
logging@1.1.14
mdg:validation-error@0.5.1
meteor@1.1.16
meteor@1.2.16
meteor-base@1.0.4
meteor-platform@1.2.6
minifier-css@1.1.13
minifier-js@1.1.13
minifier-css@1.2.13
minifier-js@1.2.13
minimongo@1.0.17
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.5
modules-runtime@0.6.5
modules@0.7.5
modules-runtime@0.7.5
momentjs:moment@2.14.4
mongo@1.1.9_1
mongo@1.1.10
mongo-id@1.0.5
mrt:moment@2.8.1
natestrauser:select2@4.0.2
npm-bcrypt@0.8.6_3
npm-mongo@1.4.45
npm-bcrypt@0.8.7
npm-mongo@1.5.45
observe-sequence@1.0.12
ohif:core@0.0.1
ordered-dict@1.0.8
@ -96,7 +96,7 @@ orthanc-remote@0.0.1
peppelg:bootstrap-3-modal@1.0.4
practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2
promise@0.7.3
promise@0.8.3
random@1.0.10
rate-limit@1.0.5
reactive-dict@1.1.8
@ -114,12 +114,12 @@ spacebars@1.0.12
spacebars-compiler@1.0.12
srp@1.0.9
standard-app-packages@1.0.9
standard-minifier-css@1.0.8
standard-minifier-js@1.0.8
stylus@2.512.5
templating@1.1.14
standard-minifier-css@1.1.8
standard-minifier-js@1.1.8
stylus@2.513.4
templating@1.2.13
templating-tools@1.0.4
tracker@1.0.15
tracker@1.1.0
twbs:bootstrap@3.3.6
typ:accounts-ldap@1.0.1
typ:ldapjs@0.7.3
@ -128,7 +128,7 @@ underscore@1.0.9
url@1.0.10
validatejs@0.0.1
viewerbase@0.0.1
webapp@1.2.11
webapp@1.3.10
webapp-hashing@1.0.9
worklist@0.0.1
zuuk:stale-session@1.0.8

View File

@ -12,3 +12,4 @@ notices-for-facebook-graph-api-2
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.3.5-remove-old-dev-bundle-link
1.4.0-remove-old-dev-bundle-link

View File

@ -1 +0,0 @@
/Users/Erik/.meteor/packages/meteor-tool/.1.3.4_4.1rrnj7l++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle

View File

@ -5,37 +5,37 @@
# but you can also edit it by hand.
twbs:bootstrap
http
http@1.2.8
arsnebula:reactive-promise
promise
stylus
promise@0.8.3
stylus@2.513.4
fortawesome:fontawesome
mrt:moment
meteor-base
mobile-experience
mongo
blaze-html-templates
session
jquery
tracker
logging
reload
random
ejson
spacebars
check
meteor-base@1.0.4
mobile-experience@1.0.4
mongo@1.1.10
blaze-html-templates@1.0.4
session@1.1.6
jquery@1.11.9
tracker@1.1.0
logging@1.1.14
reload@1.1.10
random@1.0.10
ejson@1.0.12
spacebars@1.0.12
check@1.2.3
cornerstone
dicomweb
design
ohif:core
ecmascript
ecmascript@0.5.7
viewerbase
worklist
reactive-var
reactive-var@1.0.10
practicalmeteor:loglevel
hangingprotocols
reactive-dict
reactive-dict@1.1.8
clinical:router
fastclick
standard-minifier-css
standard-minifier-js
fastclick@1.0.12
standard-minifier-css@1.1.8
standard-minifier-js@1.1.8

View File

@ -1 +1 @@
METEOR@1.3.5.1
METEOR@1.4.0.1

View File

@ -1,15 +1,15 @@
allow-deny@1.0.5
arsnebula:reactive-promise@0.9.1
autoupdate@1.2.11
babel-compiler@6.8.5
babel-runtime@0.1.9_1
autoupdate@1.3.11
babel-compiler@6.9.0
babel-runtime@0.1.10
base64@1.0.9
binary-heap@1.0.9
blaze@2.1.8
blaze-html-templates@1.0.4
blaze-tools@1.0.9
boilerplate-generator@1.0.9
caching-compiler@1.0.6
caching-compiler@1.1.6
caching-html-compiler@1.0.6
callback-hook@1.0.9
check@1.2.3
@ -17,19 +17,19 @@ clinical:router@2.0.19
clinical:router-location@2.1.0
clinical:router-middleware-stack@2.1.2
clinical:router-url@2.1.0
coffeescript@1.1.4
coffeescript@1.2.3
cornerstone@0.0.1
ddp@1.2.5
ddp-client@1.2.9
ddp-client@1.3.0
ddp-common@1.2.6
ddp-server@1.2.10
ddp-server@1.3.9
deps@1.0.12
design@0.0.1
dicomweb@0.0.1
diff-sequence@1.0.6
dimseservice@0.0.1
ecmascript@0.4.8
ecmascript-runtime@0.2.12
ecmascript@0.5.7
ecmascript-runtime@0.3.12
ejson@1.0.12
fastclick@1.0.12
fortawesome:fontawesome@4.5.0
@ -39,7 +39,7 @@ hangingprotocols@0.0.1
hot-code-push@1.0.4
html-tools@1.0.10
htmljs@1.0.10
http@1.1.8
http@1.2.8
id-map@1.0.8
iron:controller@1.0.12
iron:core@1.0.11
@ -48,30 +48,30 @@ iron:layout@1.0.12
jquery@1.11.9
launch-screen@1.0.12
livedata@1.0.18
logging@1.0.14
meteor@1.1.16
logging@1.1.14
meteor@1.2.16
meteor-base@1.0.4
meteor-platform@1.2.6
minifier-css@1.1.13
minifier-js@1.1.13
minifier-css@1.2.13
minifier-js@1.2.13
minimongo@1.0.17
mobile-experience@1.0.4
mobile-status-bar@1.0.12
modules@0.6.5
modules-runtime@0.6.5
modules@0.7.5
modules-runtime@0.7.5
momentjs:moment@2.14.4
mongo@1.1.9_1
mongo@1.1.10
mongo-id@1.0.5
mrt:moment@2.8.1
natestrauser:select2@4.0.2
npm-mongo@1.4.45
npm-mongo@1.5.45
observe-sequence@1.0.12
ohif:core@0.0.1
ordered-dict@1.0.8
orthanc-remote@0.0.1
practicalmeteor:chai@2.1.0_1
practicalmeteor:loglevel@1.2.0_2
promise@0.7.3
promise@0.8.3
random@1.0.10
reactive-dict@1.1.8
reactive-var@1.0.10
@ -84,18 +84,18 @@ silentcicero:jszip@0.0.4
spacebars@1.0.12
spacebars-compiler@1.0.12
standard-app-packages@1.0.9
standard-minifier-css@1.0.8
standard-minifier-js@1.0.8
stylus@2.512.5
templating@1.1.14
standard-minifier-css@1.1.8
standard-minifier-js@1.1.8
stylus@2.513.4
templating@1.2.13
templating-tools@1.0.4
tracker@1.0.15
tracker@1.1.0
twbs:bootstrap@3.3.6
ui@1.0.11
underscore@1.0.9
url@1.0.10
validatejs@0.0.1
viewerbase@0.0.1
webapp@1.2.11
webapp@1.3.10
webapp-hashing@1.0.9
worklist@0.0.1

View File

@ -24,10 +24,10 @@
</div>
</div>
<hr>
{{#if equals this.serverType.get "dicomWeb"}}
{{#if eq this.serverType.get "dicomWeb"}}
{{>serverInformationDicomWeb this}}
{{/if}}
{{#if equals this.serverType.get "dimse"}}
{{#if eq this.serverType.get "dimse"}}
{{>serverInformationDimse this}}
{{/if}}
{{#if this.serverType.get}}

View File

@ -2,7 +2,7 @@
<div class="modal" id="serverInformationModal" tabindex="-1" role="dialog" aria-labelledby="serverInformationModalLabel">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
{{#let isList=(equals instance.container.mode.get "list")}}
{{#let isList=(eq instance.container.mode.get "list")}}
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="serverInformationModalLabel">Server Information</h4>

View File

@ -1,17 +0,0 @@
Template.registerHelper('instance', function() {
return Template.instance();
});
Template.registerHelper('extend', function() {
const result = {};
const kw = arguments.pop();
_.each(arguments, function(current) {
if (typeof current !== 'object') {
return;
}
_.extend(result, current);
});
_.extend(result, kw.hash);
return result;
});

View File

@ -1,35 +0,0 @@
Template.registerHelper('choose', function() {
let result;
_.each(_.initial(arguments, 1), function(value) {
return value && (result = value);
});
return result;
});
Template.registerHelper('bool', function(value) {
return !!value;
});
Template.registerHelper('equals', function(a, b) {
return a === b;
});
Template.registerHelper('not', function(value) {
return !value;
});
Template.registerHelper('and', function() {
let result = true;
_.each(_.initial(arguments, 1), function(value) {
return value || (result = false);
});
return result;
});
Template.registerHelper('or', function() {
let result = false;
_.each(_.initial(arguments, 1), function(value) {
return value && (result = true);
});
return result;
});

View File

@ -1,7 +0,0 @@
Template.registerHelper('concat', function() {
let result = '';
_.each(_.initial(arguments, 1), function(value) {
result += value;
});
return result;
});

View File

@ -39,18 +39,15 @@ class Form {
var propertyArray = key.split('.');
var currentObject = nestedObject;
while (propertyArray.length) {
var property = propertyArray.shift();
var isArray = property.slice(-2) === '[]';
var key = isArray ? property.slice(0, -2) : property;
var currentProperty = propertyArray.shift();
if (!propertyArray.length) {
currentObject[key] = value;
currentObject[currentProperty] = value;
} else {
if (!currentObject[key]) {
var dataStructure = isArray ? [] : {};
currentObject[key] = dataStructure;
if (!currentObject[currentProperty]) {
currentObject[currentProperty] = {};
}
currentObject = currentObject[key];
currentObject = currentObject[currentProperty];
}
}
}

View File

@ -58,11 +58,6 @@ Package.onUse(function(api) {
api.addFiles('client/tools.js', 'client');
// Spacebars helpers
api.addFiles('client/helpers/blaze.js', 'client');
api.addFiles('client/helpers/logical.js', 'client');
api.addFiles('client/helpers/string.js', 'client');
// Utility classes
api.addFiles('client/utils/form.js', 'client');

View File

@ -9,6 +9,10 @@ Template.baseComponent.constructView = function(contentFunc, elseFunc) {
// Get the data passed to the template
const data = Template.currentData();
if (!data) {
return;
}
// Check the base template. If it's not informed set as the custom base
data.base || (data.base = 'baseCustom');

View File

@ -48,14 +48,20 @@ Template.registerHelper('not', value => {
// Check if all the given values are true
Template.registerHelper('and', (...values) => {
let result = true;
_.each(_.initial(values, 1), value => value || (result = false));
_.each(arguments, value => value || (result = false));
return result;
});
// Check if one of the given values is true
Template.registerHelper('or', (...values) => {
let result = false;
_.each(_.initial(values, 1), value => value && (result = true));
_.each(_.initial(values, 1), value => {
if (value instanceof Spacebars.kw) {
return;
}
return value && (result = true);
});
return result;
});