OHIF-157 Support OHIF.utils.absoluteUrl on both client and server

This commit is contained in:
Evren Ozkan committed 2017-03-01 17:27:54 -05:00
1 parent 82876ddbe7
commit a159c105b0
4 files changed
+15 -8

No files matched your search

@@ -0,0 +1,11 @@
import { OHIF } from 'meteor/ohif:core';
// Return an absolute URL with the given path by supporting the leading "/"
OHIF.utils.absoluteUrl = function(path) {
if (path) {
// Remove the leading "/"
path = path.replace(/^\//, '');
}
return Meteor.absoluteUrl(path);
};
+1
View File
@@ -1 +1,2 @@
import './absoluteUrl';
import './objectPath';
-6
View File
@@ -1,11 +1,5 @@
import { OHIF } from 'meteor/ohif:core';
// Return an absolute URL with the given path by supporting the leading "/"
OHIF.utils.absoluteUrl = function(path) {
path = path.replace(/^\//, '');
return Meteor.absoluteUrl(path);
};
// Return the array sorting function for its object's properties
OHIF.utils.sortBy = function() {
var fields = [].slice.call(arguments),