{"action":"created","comment":{"url":"https://api.github.com/repos/mavxg/clay/pulls/comments/28590264","id":28590264,"diff_hunk":"@@ -276,23 +295,44 @@ function _csv(headers, rows) {\n \treturn str;\n }\n \n+function datenum(v, date1904) {\n+\tif(date1904) v+=1462;\n+\tvar epoch = Date.parse(v);\n+\treturn (epoch - new Date(Date.UTC(1899, 11, 30))) / (24 * 60 * 60 * 1000);\n+}\n+\n+function Boolean(val, fallback){\n+\tif(typeof val === 'boolean') return val;\n+\tif(typeof val === 'number') {\n+\t\tif(val % 1 == 0 && val <= 1 && val >= 0){\n+\t\t\treturn Boolean(val);\n+\t\t}\n+\t}\n+\tif(val != undefined){\n+\t\tvar str = val.toLowerCase();\n+\t\tif(str == \"true\" || str == \"1\") return true;\n+\t\tif(str == \"false\" || str == \"0\") return false;\n+\t}\n+\treturn fallback;\n+}\n+\n function File(name, f, type, displayName) {\n \tvar a = document.createElement('a');\n \ta.appendChild(document.createTextNode(displayName || name));\n-\ta.href = '#';\n-\ta.className = \"table-download-link\";\n-\ta.onclick = function() {\n-\t\tsaveAs(new Blob([f()], {type: type}), name);\n+\ta.href = '#';\t","path":"public/js/functions.js","position":241,"original_position":241,"commit_id":"fb33c418f7f694dc2fb0917d02b7cea8ca304c17","original_commit_id":"fb33c418f7f694dc2fb0917d02b7cea8ca304c17","user":{"login":"nikk1e","id":5040111,"avatar_url":"https://avatars.githubusercontent.com/u/5040111?v=3","gravatar_id":"","url":"https://api.github.com/users/nikk1e","html_url":"https://github.com/nikk1e","followers_url":"https://api.github.com/users/nikk1e/followers","following_url":"https://api.github.com/users/nikk1e/following{/other_user}","gists_url":"https://api.github.com/users/nikk1e/gists{/gist_id}","starred_url":"https://api.github.com/users/nikk1e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikk1e/subscriptions","organizations_url":"https://api.github.com/users/nikk1e/orgs","repos_url":"https://api.github.com/users/nikk1e/repos","events_url":"https://api.github.com/users/nikk1e/events{/privacy}","received_events_url":"https://api.github.com/users/nikk1e/received_events","type":"User","site_admin":false},"body":"Moved data out of the function so that URL only renders after function has evaluated.","created_at":"2015-04-17T12:45:41Z","updated_at":"2015-04-17T12:45:41Z","html_url":"https://github.com/mavxg/clay/pull/4#discussion_r28590264","pull_request_url":"https://api.github.com/repos/mavxg/clay/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/mavxg/clay/pulls/comments/28590264"},"html":{"href":"https://github.com/mavxg/clay/pull/4#discussion_r28590264"},"pull_request":{"href":"https://api.github.com/repos/mavxg/clay/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/mavxg/clay/pulls/4","id":33540433,"html_url":"https://github.com/mavxg/clay/pull/4","diff_url":"https://github.com/mavxg/clay/pull/4.diff","patch_url":"https://github.com/mavxg/clay/pull/4.patch","issue_url":"https://api.github.com/repos/mavxg/clay/issues/4","number":4,"state":"open","locked":false,"title":"Excel templated download.","user":{"login":"nikk1e","id":5040111,"avatar_url":"https://avatars.githubusercontent.com/u/5040111?v=3","gravatar_id":"","url":"https://api.github.com/users/nikk1e","html_url":"https://github.com/nikk1e","followers_url":"https://api.github.com/users/nikk1e/followers","following_url":"https://api.github.com/users/nikk1e/following{/other_user}","gists_url":"https://api.github.com/users/nikk1e/gists{/gist_id}","starred_url":"https://api.github.com/users/nikk1e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikk1e/subscriptions","organizations_url":"https://api.github.com/users/nikk1e/orgs","repos_url":"https://api.github.com/users/nikk1e/repos","events_url":"https://api.github.com/users/nikk1e/events{/privacy}","received_events_url":"https://api.github.com/users/nikk1e/received_events","type":"User","site_admin":false},"body":"* Tidied up functions.  Changed case for most to keep them consistent.\r\n* Excel templated download working. \r\n* Toggle for empty rows.\r\n* Added function descriptions.\r\n* Added moment.js reference.\r\n* Added xmlToJSON reference.\r\n* Web.config to disable caching\r\n* Removed user permission check as failing on prod.  (+ editor will change soon)","created_at":"2015-04-17T12:41:46Z","updated_at":"2015-04-17T12:45:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd28493872b2cea901953b707d263ef94f583245","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mavxg/clay/pulls/4/commits","review_comments_url":"https://api.github.com/repos/mavxg/clay/pulls/4/comments","review_comment_url":"https://api.github.com/repos/mavxg/clay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavxg/clay/issues/4/comments","statuses_url":"https://api.github.com/repos/mavxg/clay/statuses/fb33c418f7f694dc2fb0917d02b7cea8ca304c17","head":{"label":"nikk1e:master","ref":"master","sha":"fb33c418f7f694dc2fb0917d02b7cea8ca304c17","user":{"login":"nikk1e","id":5040111,"avatar_url":"https://avatars.githubusercontent.com/u/5040111?v=3","gravatar_id":"","url":"https://api.github.com/users/nikk1e","html_url":"https://github.com/nikk1e","followers_url":"https://api.github.com/users/nikk1e/followers","following_url":"https://api.github.com/users/nikk1e/following{/other_user}","gists_url":"https://api.github.com/users/nikk1e/gists{/gist_id}","starred_url":"https://api.github.com/users/nikk1e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikk1e/subscriptions","organizations_url":"https://api.github.com/users/nikk1e/orgs","repos_url":"https://api.github.com/users/nikk1e/repos","events_url":"https://api.github.com/users/nikk1e/events{/privacy}","received_events_url":"https://api.github.com/users/nikk1e/received_events","type":"User","site_admin":false},"repo":{"id":24321346,"name":"clay","full_name":"nikk1e/clay","owner":{"login":"nikk1e","id":5040111,"avatar_url":"https://avatars.githubusercontent.com/u/5040111?v=3","gravatar_id":"","url":"https://api.github.com/users/nikk1e","html_url":"https://github.com/nikk1e","followers_url":"https://api.github.com/users/nikk1e/followers","following_url":"https://api.github.com/users/nikk1e/following{/other_user}","gists_url":"https://api.github.com/users/nikk1e/gists{/gist_id}","starred_url":"https://api.github.com/users/nikk1e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikk1e/subscriptions","organizations_url":"https://api.github.com/users/nikk1e/orgs","repos_url":"https://api.github.com/users/nikk1e/repos","events_url":"https://api.github.com/users/nikk1e/events{/privacy}","received_events_url":"https://api.github.com/users/nikk1e/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nikk1e/clay","description":"","fork":true,"url":"https://api.github.com/repos/nikk1e/clay","forks_url":"https://api.github.com/repos/nikk1e/clay/forks","keys_url":"https://api.github.com/repos/nikk1e/clay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nikk1e/clay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nikk1e/clay/teams","hooks_url":"https://api.github.com/repos/nikk1e/clay/hooks","issue_events_url":"https://api.github.com/repos/nikk1e/clay/issues/events{/number}","events_url":"https://api.github.com/repos/nikk1e/clay/events","assignees_url":"https://api.github.com/repos/nikk1e/clay/assignees{/user}","branches_url":"https://api.github.com/repos/nikk1e/clay/branches{/branch}","tags_url":"https://api.github.com/repos/nikk1e/clay/tags","blobs_url":"https://api.github.com/repos/nikk1e/clay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nikk1e/clay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nikk1e/clay/git/refs{/sha}","trees_url":"https://api.github.com/repos/nikk1e/clay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nikk1e/clay/statuses/{sha}","languages_url":"https://api.github.com/repos/nikk1e/clay/languages","stargazers_url":"https://api.github.com/repos/nikk1e/clay/stargazers","contributors_url":"https://api.github.com/repos/nikk1e/clay/contributors","subscribers_url":"https://api.github.com/repos/nikk1e/clay/subscribers","subscription_url":"https://api.github.com/repos/nikk1e/clay/subscription","commits_url":"https://api.github.com/repos/nikk1e/clay/commits{/sha}","git_commits_url":"https://api.github.com/repos/nikk1e/clay/git/commits{/sha}","comments_url":"https://api.github.com/repos/nikk1e/clay/comments{/number}","issue_comment_url":"https://api.github.com/repos/nikk1e/clay/issues/comments{/number}","contents_url":"https://api.github.com/repos/nikk1e/clay/contents/{+path}","compare_url":"https://api.github.com/repos/nikk1e/clay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nikk1e/clay/merges","archive_url":"https://api.github.com/repos/nikk1e/clay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nikk1e/clay/downloads","issues_url":"https://api.github.com/repos/nikk1e/clay/issues{/number}","pulls_url":"https://api.github.com/repos/nikk1e/clay/pulls{/number}","milestones_url":"https://api.github.com/repos/nikk1e/clay/milestones{/number}","notifications_url":"https://api.github.com/repos/nikk1e/clay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nikk1e/clay/labels{/name}","releases_url":"https://api.github.com/repos/nikk1e/clay/releases{/id}","created_at":"2014-09-22T08:55:03Z","updated_at":"2015-04-17T12:43:33Z","pushed_at":"2015-04-17T12:43:31Z","git_url":"git://github.com/nikk1e/clay.git","ssh_url":"git@github.com:nikk1e/clay.git","clone_url":"https://github.com/nikk1e/clay.git","svn_url":"https://github.com/nikk1e/clay","homepage":null,"size":1609,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mavxg:master","ref":"master","sha":"d0ac1682f77d36d4d79e64428062eb730cb19cff","user":{"login":"mavxg","id":323293,"avatar_url":"https://avatars.githubusercontent.com/u/323293?v=3","gravatar_id":"","url":"https://api.github.com/users/mavxg","html_url":"https://github.com/mavxg","followers_url":"https://api.github.com/users/mavxg/followers","following_url":"https://api.github.com/users/mavxg/following{/other_user}","gists_url":"https://api.github.com/users/mavxg/gists{/gist_id}","starred_url":"https://api.github.com/users/mavxg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavxg/subscriptions","organizations_url":"https://api.github.com/users/mavxg/orgs","repos_url":"https://api.github.com/users/mavxg/repos","events_url":"https://api.github.com/users/mavxg/events{/privacy}","received_events_url":"https://api.github.com/users/mavxg/received_events","type":"User","site_admin":false},"repo":{"id":21230065,"name":"clay","full_name":"mavxg/clay","owner":{"login":"mavxg","id":323293,"avatar_url":"https://avatars.githubusercontent.com/u/323293?v=3","gravatar_id":"","url":"https://api.github.com/users/mavxg","html_url":"https://github.com/mavxg","followers_url":"https://api.github.com/users/mavxg/followers","following_url":"https://api.github.com/users/mavxg/following{/other_user}","gists_url":"https://api.github.com/users/mavxg/gists{/gist_id}","starred_url":"https://api.github.com/users/mavxg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavxg/subscriptions","organizations_url":"https://api.github.com/users/mavxg/orgs","repos_url":"https://api.github.com/users/mavxg/repos","events_url":"https://api.github.com/users/mavxg/events{/privacy}","received_events_url":"https://api.github.com/users/mavxg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavxg/clay","description":"","fork":false,"url":"https://api.github.com/repos/mavxg/clay","forks_url":"https://api.github.com/repos/mavxg/clay/forks","keys_url":"https://api.github.com/repos/mavxg/clay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavxg/clay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavxg/clay/teams","hooks_url":"https://api.github.com/repos/mavxg/clay/hooks","issue_events_url":"https://api.github.com/repos/mavxg/clay/issues/events{/number}","events_url":"https://api.github.com/repos/mavxg/clay/events","assignees_url":"https://api.github.com/repos/mavxg/clay/assignees{/user}","branches_url":"https://api.github.com/repos/mavxg/clay/branches{/branch}","tags_url":"https://api.github.com/repos/mavxg/clay/tags","blobs_url":"https://api.github.com/repos/mavxg/clay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavxg/clay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavxg/clay/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavxg/clay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavxg/clay/statuses/{sha}","languages_url":"https://api.github.com/repos/mavxg/clay/languages","stargazers_url":"https://api.github.com/repos/mavxg/clay/stargazers","contributors_url":"https://api.github.com/repos/mavxg/clay/contributors","subscribers_url":"https://api.github.com/repos/mavxg/clay/subscribers","subscription_url":"https://api.github.com/repos/mavxg/clay/subscription","commits_url":"https://api.github.com/repos/mavxg/clay/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavxg/clay/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavxg/clay/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavxg/clay/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavxg/clay/contents/{+path}","compare_url":"https://api.github.com/repos/mavxg/clay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavxg/clay/merges","archive_url":"https://api.github.com/repos/mavxg/clay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavxg/clay/downloads","issues_url":"https://api.github.com/repos/mavxg/clay/issues{/number}","pulls_url":"https://api.github.com/repos/mavxg/clay/pulls{/number}","milestones_url":"https://api.github.com/repos/mavxg/clay/milestones{/number}","notifications_url":"https://api.github.com/repos/mavxg/clay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavxg/clay/labels{/name}","releases_url":"https://api.github.com/repos/mavxg/clay/releases{/id}","created_at":"2014-06-26T06:09:11Z","updated_at":"2015-02-18T08:13:33Z","pushed_at":"2015-04-17T12:43:32Z","git_url":"git://github.com/mavxg/clay.git","ssh_url":"git@github.com:mavxg/clay.git","clone_url":"https://github.com/mavxg/clay.git","svn_url":"https://github.com/mavxg/clay","homepage":null,"size":1735,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavxg/clay/pulls/4"},"html":{"href":"https://github.com/mavxg/clay/pull/4"},"issue":{"href":"https://api.github.com/repos/mavxg/clay/issues/4"},"comments":{"href":"https://api.github.com/repos/mavxg/clay/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/mavxg/clay/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/mavxg/clay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavxg/clay/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/mavxg/clay/statuses/fb33c418f7f694dc2fb0917d02b7cea8ca304c17"}}}}