{"action":"created","comment":{"url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/comments/63833512","id":63833512,"diff_hunk":"@@ -0,0 +1,112 @@\n+(ns lomake-editori.editor.component\n+  (:require [lomake-editori.soresu.component :as component]\n+            [reagent.ratom :refer-macros [reaction]]\n+            [re-frame.core :refer [subscribe dispatch]]))\n+\n+(defn language [lang]\n+  (fn [lang]\n+    [:div.language\n+     [:div (clojure.string/upper-case (name lang))]]))\n+\n+(defn text-field [path]\n+  (let [languages (subscribe [:editor/languages])\n+        value     (subscribe [:editor/get-component-value path])]\n+    (fn [path]\n+      (into [:div.form__form-element\n+             [:h1.form__form-element--header \"Tekstikenttä\"]\n+             [:p.form__form-element--help-text \"Otsikko\"]]\n+        (for [lang @languages]\n+          [:div\n+           [:input.form__input {:value     (get-in @value [:label lang])\n+                    :on-change #(dispatch [:editor/set-component-value (-> % .-target .-value) path :label lang])}]\n+           #_[:p \"Aputeksti\"]\n+           #_[:input {:value     (get-in @value [:helpText lang])\n+                      :on-change #(dispatch [:editor/set-component-value (-> % .-target .-value) path :helpText lang])}]\n+           #_[language lang]])))))\n+\n+(defn link-info [{:keys [params] :as content} path]\n+  (let [languages (subscribe [:editor/languages])\n+        value     (subscribe [:editor/get-component-value path])]\n+    (fn [{:keys [params] :as content} path]\n+      (into\n+        [:div.link-info\n+         [:p \"Linkki\"]]\n+        (for [lang @languages]","path":"src/cljs/lomake_editori/editor/component.cljs","position":34,"original_position":34,"commit_id":"8d967726aa4a4317b47122faac92952e0fca4141","original_commit_id":"8d967726aa4a4317b47122faac92952e0fca4141","user":{"login":"auramo","id":278371,"avatar_url":"https://avatars.githubusercontent.com/u/278371?v=3","gravatar_id":"","url":"https://api.github.com/users/auramo","html_url":"https://github.com/auramo","followers_url":"https://api.github.com/users/auramo/followers","following_url":"https://api.github.com/users/auramo/following{/other_user}","gists_url":"https://api.github.com/users/auramo/gists{/gist_id}","starred_url":"https://api.github.com/users/auramo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auramo/subscriptions","organizations_url":"https://api.github.com/users/auramo/orgs","repos_url":"https://api.github.com/users/auramo/repos","events_url":"https://api.github.com/users/auramo/events{/privacy}","received_events_url":"https://api.github.com/users/auramo/received_events","type":"User","site_admin":false},"body":"Sisennys","created_at":"2016-05-19T07:31:30Z","updated_at":"2016-05-19T07:31:30Z","html_url":"https://github.com/Opetushallitus/ataru/pull/13#discussion_r63833512","pull_request_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/comments/63833512"},"html":{"href":"https://github.com/Opetushallitus/ataru/pull/13#discussion_r63833512"},"pull_request":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13","id":70647295,"html_url":"https://github.com/Opetushallitus/ataru/pull/13","diff_url":"https://github.com/Opetushallitus/ataru/pull/13.diff","patch_url":"https://github.com/Opetushallitus/ataru/pull/13.patch","issue_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/13","number":13,"state":"open","locked":false,"title":"Fine-tuned version of text field and container elements","user":{"login":"elahti","id":3083043,"avatar_url":"https://avatars.githubusercontent.com/u/3083043?v=3","gravatar_id":"","url":"https://api.github.com/users/elahti","html_url":"https://github.com/elahti","followers_url":"https://api.github.com/users/elahti/followers","following_url":"https://api.github.com/users/elahti/following{/other_user}","gists_url":"https://api.github.com/users/elahti/gists{/gist_id}","starred_url":"https://api.github.com/users/elahti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elahti/subscriptions","organizations_url":"https://api.github.com/users/elahti/orgs","repos_url":"https://api.github.com/users/elahti/repos","events_url":"https://api.github.com/users/elahti/events{/privacy}","received_events_url":"https://api.github.com/users/elahti/received_events","type":"User","site_admin":false},"body":"This feature adds fine-tuned versions of text field and container elements that can be added to a form. They aren't yet responsive, though.","created_at":"2016-05-19T07:26:16Z","updated_at":"2016-05-19T07:31:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9beca5e7303d1d031ed3818e7b2feff29311a6a5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13/commits","review_comments_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13/comments","review_comment_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/13/comments","statuses_url":"https://api.github.com/repos/Opetushallitus/ataru/statuses/8d967726aa4a4317b47122faac92952e0fca4141","head":{"label":"Opetushallitus:text_field_element","ref":"text_field_element","sha":"8d967726aa4a4317b47122faac92952e0fca4141","user":{"login":"Opetushallitus","id":2628558,"avatar_url":"https://avatars.githubusercontent.com/u/2628558?v=3","gravatar_id":"","url":"https://api.github.com/users/Opetushallitus","html_url":"https://github.com/Opetushallitus","followers_url":"https://api.github.com/users/Opetushallitus/followers","following_url":"https://api.github.com/users/Opetushallitus/following{/other_user}","gists_url":"https://api.github.com/users/Opetushallitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Opetushallitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Opetushallitus/subscriptions","organizations_url":"https://api.github.com/users/Opetushallitus/orgs","repos_url":"https://api.github.com/users/Opetushallitus/repos","events_url":"https://api.github.com/users/Opetushallitus/events{/privacy}","received_events_url":"https://api.github.com/users/Opetushallitus/received_events","type":"Organization","site_admin":false},"repo":{"id":54475848,"name":"ataru","full_name":"Opetushallitus/ataru","owner":{"login":"Opetushallitus","id":2628558,"avatar_url":"https://avatars.githubusercontent.com/u/2628558?v=3","gravatar_id":"","url":"https://api.github.com/users/Opetushallitus","html_url":"https://github.com/Opetushallitus","followers_url":"https://api.github.com/users/Opetushallitus/followers","following_url":"https://api.github.com/users/Opetushallitus/following{/other_user}","gists_url":"https://api.github.com/users/Opetushallitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Opetushallitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Opetushallitus/subscriptions","organizations_url":"https://api.github.com/users/Opetushallitus/orgs","repos_url":"https://api.github.com/users/Opetushallitus/repos","events_url":"https://api.github.com/users/Opetushallitus/events{/privacy}","received_events_url":"https://api.github.com/users/Opetushallitus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Opetushallitus/ataru","description":"Generic form generation service","fork":false,"url":"https://api.github.com/repos/Opetushallitus/ataru","forks_url":"https://api.github.com/repos/Opetushallitus/ataru/forks","keys_url":"https://api.github.com/repos/Opetushallitus/ataru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Opetushallitus/ataru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Opetushallitus/ataru/teams","hooks_url":"https://api.github.com/repos/Opetushallitus/ataru/hooks","issue_events_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/events{/number}","events_url":"https://api.github.com/repos/Opetushallitus/ataru/events","assignees_url":"https://api.github.com/repos/Opetushallitus/ataru/assignees{/user}","branches_url":"https://api.github.com/repos/Opetushallitus/ataru/branches{/branch}","tags_url":"https://api.github.com/repos/Opetushallitus/ataru/tags","blobs_url":"https://api.github.com/repos/Opetushallitus/ataru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Opetushallitus/ataru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Opetushallitus/ataru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Opetushallitus/ataru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Opetushallitus/ataru/statuses/{sha}","languages_url":"https://api.github.com/repos/Opetushallitus/ataru/languages","stargazers_url":"https://api.github.com/repos/Opetushallitus/ataru/stargazers","contributors_url":"https://api.github.com/repos/Opetushallitus/ataru/contributors","subscribers_url":"https://api.github.com/repos/Opetushallitus/ataru/subscribers","subscription_url":"https://api.github.com/repos/Opetushallitus/ataru/subscription","commits_url":"https://api.github.com/repos/Opetushallitus/ataru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Opetushallitus/ataru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Opetushallitus/ataru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Opetushallitus/ataru/contents/{+path}","compare_url":"https://api.github.com/repos/Opetushallitus/ataru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Opetushallitus/ataru/merges","archive_url":"https://api.github.com/repos/Opetushallitus/ataru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Opetushallitus/ataru/downloads","issues_url":"https://api.github.com/repos/Opetushallitus/ataru/issues{/number}","pulls_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls{/number}","milestones_url":"https://api.github.com/repos/Opetushallitus/ataru/milestones{/number}","notifications_url":"https://api.github.com/repos/Opetushallitus/ataru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Opetushallitus/ataru/labels{/name}","releases_url":"https://api.github.com/repos/Opetushallitus/ataru/releases{/id}","deployments_url":"https://api.github.com/repos/Opetushallitus/ataru/deployments","created_at":"2016-03-22T13:07:32Z","updated_at":"2016-05-10T05:31:50Z","pushed_at":"2016-05-19T07:26:17Z","git_url":"git://github.com/Opetushallitus/ataru.git","ssh_url":"git@github.com:Opetushallitus/ataru.git","clone_url":"https://github.com/Opetushallitus/ataru.git","svn_url":"https://github.com/Opetushallitus/ataru","homepage":"","size":603,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Opetushallitus:master","ref":"master","sha":"d10896b0448d072095fbfe2fbab8e03634e52a9b","user":{"login":"Opetushallitus","id":2628558,"avatar_url":"https://avatars.githubusercontent.com/u/2628558?v=3","gravatar_id":"","url":"https://api.github.com/users/Opetushallitus","html_url":"https://github.com/Opetushallitus","followers_url":"https://api.github.com/users/Opetushallitus/followers","following_url":"https://api.github.com/users/Opetushallitus/following{/other_user}","gists_url":"https://api.github.com/users/Opetushallitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Opetushallitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Opetushallitus/subscriptions","organizations_url":"https://api.github.com/users/Opetushallitus/orgs","repos_url":"https://api.github.com/users/Opetushallitus/repos","events_url":"https://api.github.com/users/Opetushallitus/events{/privacy}","received_events_url":"https://api.github.com/users/Opetushallitus/received_events","type":"Organization","site_admin":false},"repo":{"id":54475848,"name":"ataru","full_name":"Opetushallitus/ataru","owner":{"login":"Opetushallitus","id":2628558,"avatar_url":"https://avatars.githubusercontent.com/u/2628558?v=3","gravatar_id":"","url":"https://api.github.com/users/Opetushallitus","html_url":"https://github.com/Opetushallitus","followers_url":"https://api.github.com/users/Opetushallitus/followers","following_url":"https://api.github.com/users/Opetushallitus/following{/other_user}","gists_url":"https://api.github.com/users/Opetushallitus/gists{/gist_id}","starred_url":"https://api.github.com/users/Opetushallitus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Opetushallitus/subscriptions","organizations_url":"https://api.github.com/users/Opetushallitus/orgs","repos_url":"https://api.github.com/users/Opetushallitus/repos","events_url":"https://api.github.com/users/Opetushallitus/events{/privacy}","received_events_url":"https://api.github.com/users/Opetushallitus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Opetushallitus/ataru","description":"Generic form generation service","fork":false,"url":"https://api.github.com/repos/Opetushallitus/ataru","forks_url":"https://api.github.com/repos/Opetushallitus/ataru/forks","keys_url":"https://api.github.com/repos/Opetushallitus/ataru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Opetushallitus/ataru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Opetushallitus/ataru/teams","hooks_url":"https://api.github.com/repos/Opetushallitus/ataru/hooks","issue_events_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/events{/number}","events_url":"https://api.github.com/repos/Opetushallitus/ataru/events","assignees_url":"https://api.github.com/repos/Opetushallitus/ataru/assignees{/user}","branches_url":"https://api.github.com/repos/Opetushallitus/ataru/branches{/branch}","tags_url":"https://api.github.com/repos/Opetushallitus/ataru/tags","blobs_url":"https://api.github.com/repos/Opetushallitus/ataru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Opetushallitus/ataru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Opetushallitus/ataru/git/refs{/sha}","trees_url":"https://api.github.com/repos/Opetushallitus/ataru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Opetushallitus/ataru/statuses/{sha}","languages_url":"https://api.github.com/repos/Opetushallitus/ataru/languages","stargazers_url":"https://api.github.com/repos/Opetushallitus/ataru/stargazers","contributors_url":"https://api.github.com/repos/Opetushallitus/ataru/contributors","subscribers_url":"https://api.github.com/repos/Opetushallitus/ataru/subscribers","subscription_url":"https://api.github.com/repos/Opetushallitus/ataru/subscription","commits_url":"https://api.github.com/repos/Opetushallitus/ataru/commits{/sha}","git_commits_url":"https://api.github.com/repos/Opetushallitus/ataru/git/commits{/sha}","comments_url":"https://api.github.com/repos/Opetushallitus/ataru/comments{/number}","issue_comment_url":"https://api.github.com/repos/Opetushallitus/ataru/issues/comments{/number}","contents_url":"https://api.github.com/repos/Opetushallitus/ataru/contents/{+path}","compare_url":"https://api.github.com/repos/Opetushallitus/ataru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Opetushallitus/ataru/merges","archive_url":"https://api.github.com/repos/Opetushallitus/ataru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Opetushallitus/ataru/downloads","issues_url":"https://api.github.com/repos/Opetushallitus/ataru/issues{/number}","pulls_url":"https://api.github.com/repos/Opetushallitus/ataru/pulls{/number}","milestones_url":"https://api.github.com/repos/Opetushallitus/ataru/milestones{/number}","notifications_url":"https://api.github.com/repos/Opetushallitus/ataru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Opetushallitus/ataru/labels{/name}","releases_url":"https://api.github.com/repos/Opetushallitus/ataru/releases{/id}","deployments_url":"https://api.github.com/repos/Opetushallitus/ataru/deployments","created_at":"2016-03-22T13:07:32Z","updated_at":"2016-05-10T05:31:50Z","pushed_at":"2016-05-19T07:26:17Z","git_url":"git://github.com/Opetushallitus/ataru.git","ssh_url":"git@github.com:Opetushallitus/ataru.git","clone_url":"https://github.com/Opetushallitus/ataru.git","svn_url":"https://github.com/Opetushallitus/ataru","homepage":"","size":603,"stargazers_count":0,"watchers_count":0,"language":"Clojure","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13"},"html":{"href":"https://github.com/Opetushallitus/ataru/pull/13"},"issue":{"href":"https://api.github.com/repos/Opetushallitus/ataru/issues/13"},"comments":{"href":"https://api.github.com/repos/Opetushallitus/ataru/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Opetushallitus/ataru/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/Opetushallitus/ataru/statuses/8d967726aa4a4317b47122faac92952e0fca4141"}}}}