{"action":"created","comment":{"url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments/36996785","id":36996785,"diff_hunk":"@@ -31,7 +31,144 @@\n             }\n             return retVal;\n         },\n-\n+        serializeTheme: function(widget,filter){\n+            return JSON.stringify(this.serializeThemeToObject(widget,filter));\n+        },\n+        serializeThemeToObject: function (widget,filter){\n+            var context = this;\n+            \n+            var propObj = {};\n+            _paramCrawler(widget,filter);\n+            return propObj;\n+            \n+            function _paramCrawler(widget,filter){\n+                var retArr = [];\n+                filter = typeof(filter) === \"undefined\" ? [\"surface\",\"Color\",\"Font\",\"palette\"] : filter;\n+                context.discover(widget).forEach(function (item) {\n+                    if (widget[item.id + \"_modified\"]() || typeof(widget[\"__meta_\"+item.id].trueDefaultValue) !== \"undefined\") {\n+                        switch (item.type) {\n+                            case \"widget\":\n+                                var tempArr = _paramCrawler(widget[item.id](),filter);\n+                                retArr = retArr.concat(tempArr);\n+                                break;\n+                            case \"widgetArray\":\n+                                var widgetArray = widget[item.id]();\n+                                widgetArray.forEach(function (widget) {\n+                                    var tempArr = _paramCrawler(widget,filter);\n+                                    retArr = retArr.concat(tempArr);\n+                                }, this);\n+                                break;\n+                            default:\n+                                if(_isFilterMatch(item.id,filter)){\n+                                    var paramIsIncluded = false;\n+                                    var classParts = widget._class.trim().split(\" \");\n+                                    classParts.forEach(function(c) { \n+                                        if(!paramIsIncluded){\n+                                            if(propObj[c] === undefined){\n+                                                propObj[c] = {};\n+                                            } \n+                                            if (propObj[c][item.id] === undefined) { \n+                                                propObj[c][item.id] = widget[item.id](); \n+                                                paramIsIncluded = true;\n+                                            } \n+                                            else if (propObj[c][item.id] === widget[item.id]()) {\n+                                                paramIsIncluded = true;","path":"src/other/Persist.js","position":46,"original_position":46,"commit_id":"606044c38de5b8790eaf6190b5814f806925d178","original_commit_id":"606044c38de5b8790eaf6190b5814f806925d178","user":{"login":"GordonSmith","id":966863,"avatar_url":"https://avatars.githubusercontent.com/u/966863?v=3","gravatar_id":"","url":"https://api.github.com/users/GordonSmith","html_url":"https://github.com/GordonSmith","followers_url":"https://api.github.com/users/GordonSmith/followers","following_url":"https://api.github.com/users/GordonSmith/following{/other_user}","gists_url":"https://api.github.com/users/GordonSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/GordonSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordonSmith/subscriptions","organizations_url":"https://api.github.com/users/GordonSmith/orgs","repos_url":"https://api.github.com/users/GordonSmith/repos","events_url":"https://api.github.com/users/GordonSmith/events{/privacy}","received_events_url":"https://api.github.com/users/GordonSmith/received_events","type":"User","site_admin":false},"body":"You can break out of the loop at this point?","created_at":"2015-08-13T16:49:19Z","updated_at":"2015-08-13T16:49:19Z","html_url":"https://github.com/hpcc-systems/Visualization/pull/686#discussion_r36996785","pull_request_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686","_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments/36996785"},"html":{"href":"https://github.com/hpcc-systems/Visualization/pull/686#discussion_r36996785"},"pull_request":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686"}}},"pull_request":{"url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686","id":42148805,"html_url":"https://github.com/hpcc-systems/Visualization/pull/686","diff_url":"https://github.com/hpcc-systems/Visualization/pull/686.diff","patch_url":"https://github.com/hpcc-systems/Visualization/pull/686.patch","issue_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/686","number":686,"state":"open","locked":false,"title":"Adds global theme string support","user":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"body":"Using a global variable, window.__hpcc_theme, to declare the theme string to be applied to any/all widgets.\r\n\r\nFixes GH-685\r\n\r\n@GordonSmith Please review\r\n\r\nIs this a preferable structure for the theme serial? If not, what do you suggest?\r\n\r\nSigned-off-by: Jay Brundage <jaman.brundage@lexisnexis.com>","created_at":"2015-08-11T16:25:11Z","updated_at":"2015-08-13T16:49:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0e9fd2ed77894483db7ebc4beb2071af110b92e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686/commits","review_comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686/comments","review_comment_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/686/comments","statuses_url":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/606044c38de5b8790eaf6190b5814f806925d178","head":{"label":"jbrundage:Theme_Global","ref":"Theme_Global","sha":"606044c38de5b8790eaf6190b5814f806925d178","user":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"repo":{"id":30040848,"name":"Visualization","full_name":"jbrundage/Visualization","owner":{"login":"jbrundage","id":1891935,"avatar_url":"https://avatars.githubusercontent.com/u/1891935?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrundage","html_url":"https://github.com/jbrundage","followers_url":"https://api.github.com/users/jbrundage/followers","following_url":"https://api.github.com/users/jbrundage/following{/other_user}","gists_url":"https://api.github.com/users/jbrundage/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrundage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrundage/subscriptions","organizations_url":"https://api.github.com/users/jbrundage/orgs","repos_url":"https://api.github.com/users/jbrundage/repos","events_url":"https://api.github.com/users/jbrundage/events{/privacy}","received_events_url":"https://api.github.com/users/jbrundage/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbrundage/Visualization","description":"Common Visualization Components","fork":true,"url":"https://api.github.com/repos/jbrundage/Visualization","forks_url":"https://api.github.com/repos/jbrundage/Visualization/forks","keys_url":"https://api.github.com/repos/jbrundage/Visualization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbrundage/Visualization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbrundage/Visualization/teams","hooks_url":"https://api.github.com/repos/jbrundage/Visualization/hooks","issue_events_url":"https://api.github.com/repos/jbrundage/Visualization/issues/events{/number}","events_url":"https://api.github.com/repos/jbrundage/Visualization/events","assignees_url":"https://api.github.com/repos/jbrundage/Visualization/assignees{/user}","branches_url":"https://api.github.com/repos/jbrundage/Visualization/branches{/branch}","tags_url":"https://api.github.com/repos/jbrundage/Visualization/tags","blobs_url":"https://api.github.com/repos/jbrundage/Visualization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbrundage/Visualization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbrundage/Visualization/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbrundage/Visualization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbrundage/Visualization/statuses/{sha}","languages_url":"https://api.github.com/repos/jbrundage/Visualization/languages","stargazers_url":"https://api.github.com/repos/jbrundage/Visualization/stargazers","contributors_url":"https://api.github.com/repos/jbrundage/Visualization/contributors","subscribers_url":"https://api.github.com/repos/jbrundage/Visualization/subscribers","subscription_url":"https://api.github.com/repos/jbrundage/Visualization/subscription","commits_url":"https://api.github.com/repos/jbrundage/Visualization/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbrundage/Visualization/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbrundage/Visualization/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbrundage/Visualization/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbrundage/Visualization/contents/{+path}","compare_url":"https://api.github.com/repos/jbrundage/Visualization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbrundage/Visualization/merges","archive_url":"https://api.github.com/repos/jbrundage/Visualization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbrundage/Visualization/downloads","issues_url":"https://api.github.com/repos/jbrundage/Visualization/issues{/number}","pulls_url":"https://api.github.com/repos/jbrundage/Visualization/pulls{/number}","milestones_url":"https://api.github.com/repos/jbrundage/Visualization/milestones{/number}","notifications_url":"https://api.github.com/repos/jbrundage/Visualization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbrundage/Visualization/labels{/name}","releases_url":"https://api.github.com/repos/jbrundage/Visualization/releases{/id}","created_at":"2015-01-29T20:55:48Z","updated_at":"2015-04-06T14:57:29Z","pushed_at":"2015-08-13T15:29:05Z","git_url":"git://github.com/jbrundage/Visualization.git","ssh_url":"git@github.com:jbrundage/Visualization.git","clone_url":"https://github.com/jbrundage/Visualization.git","svn_url":"https://github.com/jbrundage/Visualization","homepage":"","size":6496,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hpcc-systems:master","ref":"master","sha":"ae61a8de563e4751c464b9fb56685df30430e784","user":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"repo":{"id":22117259,"name":"Visualization","full_name":"hpcc-systems/Visualization","owner":{"login":"hpcc-systems","id":900867,"avatar_url":"https://avatars.githubusercontent.com/u/900867?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcc-systems","html_url":"https://github.com/hpcc-systems","followers_url":"https://api.github.com/users/hpcc-systems/followers","following_url":"https://api.github.com/users/hpcc-systems/following{/other_user}","gists_url":"https://api.github.com/users/hpcc-systems/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcc-systems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcc-systems/subscriptions","organizations_url":"https://api.github.com/users/hpcc-systems/orgs","repos_url":"https://api.github.com/users/hpcc-systems/repos","events_url":"https://api.github.com/users/hpcc-systems/events{/privacy}","received_events_url":"https://api.github.com/users/hpcc-systems/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcc-systems/Visualization","description":"Common Visualization Components","fork":false,"url":"https://api.github.com/repos/hpcc-systems/Visualization","forks_url":"https://api.github.com/repos/hpcc-systems/Visualization/forks","keys_url":"https://api.github.com/repos/hpcc-systems/Visualization/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcc-systems/Visualization/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcc-systems/Visualization/teams","hooks_url":"https://api.github.com/repos/hpcc-systems/Visualization/hooks","issue_events_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/events{/number}","events_url":"https://api.github.com/repos/hpcc-systems/Visualization/events","assignees_url":"https://api.github.com/repos/hpcc-systems/Visualization/assignees{/user}","branches_url":"https://api.github.com/repos/hpcc-systems/Visualization/branches{/branch}","tags_url":"https://api.github.com/repos/hpcc-systems/Visualization/tags","blobs_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcc-systems/Visualization/languages","stargazers_url":"https://api.github.com/repos/hpcc-systems/Visualization/stargazers","contributors_url":"https://api.github.com/repos/hpcc-systems/Visualization/contributors","subscribers_url":"https://api.github.com/repos/hpcc-systems/Visualization/subscribers","subscription_url":"https://api.github.com/repos/hpcc-systems/Visualization/subscription","commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcc-systems/Visualization/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcc-systems/Visualization/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcc-systems/Visualization/contents/{+path}","compare_url":"https://api.github.com/repos/hpcc-systems/Visualization/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcc-systems/Visualization/merges","archive_url":"https://api.github.com/repos/hpcc-systems/Visualization/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcc-systems/Visualization/downloads","issues_url":"https://api.github.com/repos/hpcc-systems/Visualization/issues{/number}","pulls_url":"https://api.github.com/repos/hpcc-systems/Visualization/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcc-systems/Visualization/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcc-systems/Visualization/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcc-systems/Visualization/labels{/name}","releases_url":"https://api.github.com/repos/hpcc-systems/Visualization/releases{/id}","created_at":"2014-07-22T19:13:04Z","updated_at":"2015-07-14T11:49:09Z","pushed_at":"2015-08-13T15:59:12Z","git_url":"git://github.com/hpcc-systems/Visualization.git","ssh_url":"git@github.com:hpcc-systems/Visualization.git","clone_url":"https://github.com/hpcc-systems/Visualization.git","svn_url":"https://github.com/hpcc-systems/Visualization","homepage":"","size":15262,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":84,"forks":20,"open_issues":84,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686"},"html":{"href":"https://github.com/hpcc-systems/Visualization/pull/686"},"issue":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/issues/686"},"comments":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/issues/686/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/pulls/686/commits"},"statuses":{"href":"https://api.github.com/repos/hpcc-systems/Visualization/statuses/606044c38de5b8790eaf6190b5814f806925d178"}}}}