X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=portal%2Fstatic%2Fjs%2Fcommon.functions.js;fp=portal%2Fstatic%2Fjs%2Fcommon.functions.js;h=3fe31c44ed2ce939087c3db948935c2beb5262f8;hb=2f4f816b579ec2fd97dff5a318fe638ed26ebf3c;hp=0000000000000000000000000000000000000000;hpb=4dfd873aec658a5f2a22983c7221f8b7006aa475;p=myslice.git diff --git a/portal/static/js/common.functions.js b/portal/static/js/common.functions.js new file mode 100644 index 00000000..3fe31c44 --- /dev/null +++ b/portal/static/js/common.functions.js @@ -0,0 +1,62 @@ +/* + * This file is included in tophat_render.php + */ + +function getKeySplitId(id,separator){ + // id of elements must respect this rule + // split_id[0] = plugin_uuid + // split_id[1] = element + // split_id[2] = field or key + + var split_id = id.split(separator); + var key = split_id[2]; + + return key; +} + +function errorDisplay(error){ + var out = '
Notice
  • ' + error + '
'; + return out; +} + +function arrays_equal(a,b) { return !(a B ? 1 : 0)) * [1,-1][+!!reverse]; + //return ((A < B) ? -1 : + // (A > B) ? +1 : 0)) * [-1,1][+!!reverse]; + } +}