{"action":"created","comment":{"url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/comments/50418374","id":50418374,"diff_hunk":"@@ -0,0 +1,141 @@\n+<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n+<!--\n+ * See the NOTICE file distributed with this work for additional\n+ * information regarding copyright ownership.\n+ *\n+ * This is free software; you can redistribute it and/or modify it\n+ * under the terms of the GNU Lesser General Public License as\n+ * published by the Free Software Foundation; either version 2.1 of\n+ * the License, or (at your option) any later version.\n+ *\n+ * This software is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n+ * Lesser General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU Lesser General Public\n+ * License along with this software; if not, write to the Free\n+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA\n+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.\n+-->\n+\n+<xwikidoc>\n+  <web>TourCode</web>\n+  <name>AjaxActions</name>\n+  <language/>\n+  <defaultLanguage/>\n+  <translation>0</translation>\n+  <parent>TourCode.WebHome</parent>\n+  <creator>xwiki:XWiki.Admin</creator>\n+  <author>xwiki:XWiki.Admin</author>\n+  <customClass/>\n+  <contentAuthor>xwiki:XWiki.Admin</contentAuthor>\n+  <creationDate>1443708279000</creationDate>\n+  <date>1445246463000</date>\n+  <contentUpdateDate>1445246463000</contentUpdateDate>\n+  <version>1.1</version>\n+  <title>AjaxActions</title>\n+  <defaultTemplate/>\n+  <validationScript/>\n+  <comment/>\n+  <minorEdit>false</minorEdit>\n+  <syntaxId>xwiki/2.1</syntaxId>\n+  <hidden>false</hidden>\n+  <content>{{velocity}}\n+{{html}}\n+#**\n+* Ajax Actions\n+*\n+* Author: Mohamed BOUSSAA &lt;mohamed.boussa@xwiki.com&gt; \n+*#\n+\n+#set($action = $request.getParameter(\"action\"))\n+#if (\"$!action\" != '')\n+#if ($action == \"editStep\" &amp;&amp; \"$!request.getParameter('BSTDocRef')\" != '')\n+  #set($docRef = $request.getParameter(\"BSTDocRef\"))\n+  #if (\"$!docRef\" != '')\n+     #set($bootstrapTourDoc = $xwiki.getDocument($docRef))\n+     #if ($bootstrapTourDoc)\n+        ## Save step\n+        #set($title = $request.getParameter(\"title\"))\n+        #set($path = $request.getParameter(\"path\"))\n+        #set($element = $request.getParameter(\"element\"))\n+        #set($backdrop = $request.getParameter(\"backdrop\"))\n+        #set($content = $request.getParameter(\"content\"))\n+        #set($placement = $request.getParameter(\"placement\"))\n+        #set($nbSteps = $request.getParameter(\"nbSteps\"))\n+        #set($stepOrder = $request.getParameter(\"stepOrder\"))\n+        #set($isNewStep = true)\n+        #if (\"$!stepOrder\" != '') ## Edit\n+            #set($stepObj = $bootstrapTourDoc.getObject('TourCode.StepClass','order',$stepOrder))\n+            #if($stepObj)\n+               #set($isNewStep = false)                \n+            #end\n+        #end\n+        #if ($isNewStep)\n+           ## New step\n+           #set($stepObj = $bootstrapTourDoc.newObject('TourCode.StepClass'))\n+        #end\n+        #set($discard = $stepObj.set('path', $path))\n+        #set($discard = $stepObj.set('element', $element))\n+        #set($discard = $stepObj.set('title', $title))\n+        #set($discard = $stepObj.set('placement', $placement))\n+        #set($discard = $stepObj.set('backdrop', $backdrop))\n+        #set($discard = $stepObj.set('content', $content))\n+        #if($isNewStep)\n+           #set($discard = $stepObj.set('order', $nbSteps))\n+        #end\n+        ## Add the javascriptExtention object that contains the Bootstrap tour js code call\n+        #set($jseObj = $bootstrapTourDoc.getObject('XWiki.JavaScriptExtension'))\n+        #if (!$jseObj)\n+           ## Create the object\n+           #set($jseObj = $bootstrapTourDoc.newObject('XWiki.JavaScriptExtension'))\n+           #set($discard = $jseObj.set('name', 'BootstraptTour js call'))\n+           #set($discard = $jseObj.set('code', $xwiki.getDocument(\"TourCode.BSTCall\").getContent()))\n+           #set($discard = $jseObj.set('use', 'onDemand'))\n+           #set($discard = $jseObj.set('parse', 1))\n+           #set($discard = $jseObj.set('cache', 'long'))\n+        #end\n+        ## Add the styleSheet object that contains the Bootstrap tour CSS code call\n+        #set($sseObj = $bootstrapTourDoc.getObject('XWiki.StyleSheetExtension'))","path":"src/main/resources/TourCode/AjaxActions.xml","position":100,"original_position":100,"commit_id":"ed5045db15200221bdb4d32a7a59c46e664ce3f7","original_commit_id":"ed5045db15200221bdb4d32a7a59c46e664ce3f7","user":{"login":"gdelhumeau","id":1298947,"avatar_url":"https://avatars.githubusercontent.com/u/1298947?v=3","gravatar_id":"","url":"https://api.github.com/users/gdelhumeau","html_url":"https://github.com/gdelhumeau","followers_url":"https://api.github.com/users/gdelhumeau/followers","following_url":"https://api.github.com/users/gdelhumeau/following{/other_user}","gists_url":"https://api.github.com/users/gdelhumeau/gists{/gist_id}","starred_url":"https://api.github.com/users/gdelhumeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdelhumeau/subscriptions","organizations_url":"https://api.github.com/users/gdelhumeau/orgs","repos_url":"https://api.github.com/users/gdelhumeau/repos","events_url":"https://api.github.com/users/gdelhumeau/events{/privacy}","received_events_url":"https://api.github.com/users/gdelhumeau/received_events","type":"User","site_admin":false},"body":"Same.","created_at":"2016-01-21T15:51:50Z","updated_at":"2016-01-21T15:51:50Z","html_url":"https://github.com/xwiki-contrib/application-tour/pull/1#discussion_r50418374","pull_request_url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/comments/50418374"},"html":{"href":"https://github.com/xwiki-contrib/application-tour/pull/1#discussion_r50418374"},"pull_request":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1","id":48072504,"html_url":"https://github.com/xwiki-contrib/application-tour/pull/1","diff_url":"https://github.com/xwiki-contrib/application-tour/pull/1.diff","patch_url":"https://github.com/xwiki-contrib/application-tour/pull/1.patch","issue_url":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/1","number":1,"state":"open","locked":false,"title":" Manage tours with an AWM application: first commit","user":{"login":"mouhb","id":3015046,"avatar_url":"https://avatars.githubusercontent.com/u/3015046?v=3","gravatar_id":"","url":"https://api.github.com/users/mouhb","html_url":"https://github.com/mouhb","followers_url":"https://api.github.com/users/mouhb/followers","following_url":"https://api.github.com/users/mouhb/following{/other_user}","gists_url":"https://api.github.com/users/mouhb/gists{/gist_id}","starred_url":"https://api.github.com/users/mouhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouhb/subscriptions","organizations_url":"https://api.github.com/users/mouhb/orgs","repos_url":"https://api.github.com/users/mouhb/repos","events_url":"https://api.github.com/users/mouhb/events{/privacy}","received_events_url":"https://api.github.com/users/mouhb/received_events","type":"User","site_admin":false},"body":"With this PR xwiki tours are managed using a AWM application.\r\nYou can create, modify, activate tours ... etc.","created_at":"2015-10-19T13:39:31Z","updated_at":"2016-01-21T15:51:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"030b57df7b13cc7a5f69233624721c45e0a7a262","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1/commits","review_comments_url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1/comments","review_comment_url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/1/comments","statuses_url":"https://api.github.com/repos/xwiki-contrib/application-tour/statuses/ed5045db15200221bdb4d32a7a59c46e664ce3f7","head":{"label":"mouhb:master","ref":"master","sha":"ed5045db15200221bdb4d32a7a59c46e664ce3f7","user":{"login":"mouhb","id":3015046,"avatar_url":"https://avatars.githubusercontent.com/u/3015046?v=3","gravatar_id":"","url":"https://api.github.com/users/mouhb","html_url":"https://github.com/mouhb","followers_url":"https://api.github.com/users/mouhb/followers","following_url":"https://api.github.com/users/mouhb/following{/other_user}","gists_url":"https://api.github.com/users/mouhb/gists{/gist_id}","starred_url":"https://api.github.com/users/mouhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouhb/subscriptions","organizations_url":"https://api.github.com/users/mouhb/orgs","repos_url":"https://api.github.com/users/mouhb/repos","events_url":"https://api.github.com/users/mouhb/events{/privacy}","received_events_url":"https://api.github.com/users/mouhb/received_events","type":"User","site_admin":false},"repo":{"id":44523639,"name":"application-tour","full_name":"mouhb/application-tour","owner":{"login":"mouhb","id":3015046,"avatar_url":"https://avatars.githubusercontent.com/u/3015046?v=3","gravatar_id":"","url":"https://api.github.com/users/mouhb","html_url":"https://github.com/mouhb","followers_url":"https://api.github.com/users/mouhb/followers","following_url":"https://api.github.com/users/mouhb/following{/other_user}","gists_url":"https://api.github.com/users/mouhb/gists{/gist_id}","starred_url":"https://api.github.com/users/mouhb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouhb/subscriptions","organizations_url":"https://api.github.com/users/mouhb/orgs","repos_url":"https://api.github.com/users/mouhb/repos","events_url":"https://api.github.com/users/mouhb/events{/privacy}","received_events_url":"https://api.github.com/users/mouhb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mouhb/application-tour","description":"This application provides for the users a possibility to create bootstrap-tours for every page they want (see http://bootstraptour.com/ for a preview).","fork":true,"url":"https://api.github.com/repos/mouhb/application-tour","forks_url":"https://api.github.com/repos/mouhb/application-tour/forks","keys_url":"https://api.github.com/repos/mouhb/application-tour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mouhb/application-tour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mouhb/application-tour/teams","hooks_url":"https://api.github.com/repos/mouhb/application-tour/hooks","issue_events_url":"https://api.github.com/repos/mouhb/application-tour/issues/events{/number}","events_url":"https://api.github.com/repos/mouhb/application-tour/events","assignees_url":"https://api.github.com/repos/mouhb/application-tour/assignees{/user}","branches_url":"https://api.github.com/repos/mouhb/application-tour/branches{/branch}","tags_url":"https://api.github.com/repos/mouhb/application-tour/tags","blobs_url":"https://api.github.com/repos/mouhb/application-tour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mouhb/application-tour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mouhb/application-tour/git/refs{/sha}","trees_url":"https://api.github.com/repos/mouhb/application-tour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mouhb/application-tour/statuses/{sha}","languages_url":"https://api.github.com/repos/mouhb/application-tour/languages","stargazers_url":"https://api.github.com/repos/mouhb/application-tour/stargazers","contributors_url":"https://api.github.com/repos/mouhb/application-tour/contributors","subscribers_url":"https://api.github.com/repos/mouhb/application-tour/subscribers","subscription_url":"https://api.github.com/repos/mouhb/application-tour/subscription","commits_url":"https://api.github.com/repos/mouhb/application-tour/commits{/sha}","git_commits_url":"https://api.github.com/repos/mouhb/application-tour/git/commits{/sha}","comments_url":"https://api.github.com/repos/mouhb/application-tour/comments{/number}","issue_comment_url":"https://api.github.com/repos/mouhb/application-tour/issues/comments{/number}","contents_url":"https://api.github.com/repos/mouhb/application-tour/contents/{+path}","compare_url":"https://api.github.com/repos/mouhb/application-tour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mouhb/application-tour/merges","archive_url":"https://api.github.com/repos/mouhb/application-tour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mouhb/application-tour/downloads","issues_url":"https://api.github.com/repos/mouhb/application-tour/issues{/number}","pulls_url":"https://api.github.com/repos/mouhb/application-tour/pulls{/number}","milestones_url":"https://api.github.com/repos/mouhb/application-tour/milestones{/number}","notifications_url":"https://api.github.com/repos/mouhb/application-tour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mouhb/application-tour/labels{/name}","releases_url":"https://api.github.com/repos/mouhb/application-tour/releases{/id}","created_at":"2015-10-19T09:16:40Z","updated_at":"2015-05-28T13:27:02Z","pushed_at":"2015-10-19T09:37:09Z","git_url":"git://github.com/mouhb/application-tour.git","ssh_url":"git@github.com:mouhb/application-tour.git","clone_url":"https://github.com/mouhb/application-tour.git","svn_url":"https://github.com/mouhb/application-tour","homepage":"http://extensions.xwiki.org/xwiki/bin/view/Extension/Tour+Application","size":145,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"xwiki-contrib:master","ref":"master","sha":"91abbcd8f457675e768ee6559a4dc3eb6f9aa711","user":{"login":"xwiki-contrib","id":712013,"avatar_url":"https://avatars.githubusercontent.com/u/712013?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-contrib","html_url":"https://github.com/xwiki-contrib","followers_url":"https://api.github.com/users/xwiki-contrib/followers","following_url":"https://api.github.com/users/xwiki-contrib/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-contrib/subscriptions","organizations_url":"https://api.github.com/users/xwiki-contrib/orgs","repos_url":"https://api.github.com/users/xwiki-contrib/repos","events_url":"https://api.github.com/users/xwiki-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-contrib/received_events","type":"Organization","site_admin":false},"repo":{"id":36014371,"name":"application-tour","full_name":"xwiki-contrib/application-tour","owner":{"login":"xwiki-contrib","id":712013,"avatar_url":"https://avatars.githubusercontent.com/u/712013?v=3","gravatar_id":"","url":"https://api.github.com/users/xwiki-contrib","html_url":"https://github.com/xwiki-contrib","followers_url":"https://api.github.com/users/xwiki-contrib/followers","following_url":"https://api.github.com/users/xwiki-contrib/following{/other_user}","gists_url":"https://api.github.com/users/xwiki-contrib/gists{/gist_id}","starred_url":"https://api.github.com/users/xwiki-contrib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwiki-contrib/subscriptions","organizations_url":"https://api.github.com/users/xwiki-contrib/orgs","repos_url":"https://api.github.com/users/xwiki-contrib/repos","events_url":"https://api.github.com/users/xwiki-contrib/events{/privacy}","received_events_url":"https://api.github.com/users/xwiki-contrib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xwiki-contrib/application-tour","description":"This application provides for the users a possibility to create bootstrap-tours for every page they want (see http://bootstraptour.com/ for a preview).","fork":false,"url":"https://api.github.com/repos/xwiki-contrib/application-tour","forks_url":"https://api.github.com/repos/xwiki-contrib/application-tour/forks","keys_url":"https://api.github.com/repos/xwiki-contrib/application-tour/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xwiki-contrib/application-tour/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xwiki-contrib/application-tour/teams","hooks_url":"https://api.github.com/repos/xwiki-contrib/application-tour/hooks","issue_events_url":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/events{/number}","events_url":"https://api.github.com/repos/xwiki-contrib/application-tour/events","assignees_url":"https://api.github.com/repos/xwiki-contrib/application-tour/assignees{/user}","branches_url":"https://api.github.com/repos/xwiki-contrib/application-tour/branches{/branch}","tags_url":"https://api.github.com/repos/xwiki-contrib/application-tour/tags","blobs_url":"https://api.github.com/repos/xwiki-contrib/application-tour/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xwiki-contrib/application-tour/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xwiki-contrib/application-tour/git/refs{/sha}","trees_url":"https://api.github.com/repos/xwiki-contrib/application-tour/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xwiki-contrib/application-tour/statuses/{sha}","languages_url":"https://api.github.com/repos/xwiki-contrib/application-tour/languages","stargazers_url":"https://api.github.com/repos/xwiki-contrib/application-tour/stargazers","contributors_url":"https://api.github.com/repos/xwiki-contrib/application-tour/contributors","subscribers_url":"https://api.github.com/repos/xwiki-contrib/application-tour/subscribers","subscription_url":"https://api.github.com/repos/xwiki-contrib/application-tour/subscription","commits_url":"https://api.github.com/repos/xwiki-contrib/application-tour/commits{/sha}","git_commits_url":"https://api.github.com/repos/xwiki-contrib/application-tour/git/commits{/sha}","comments_url":"https://api.github.com/repos/xwiki-contrib/application-tour/comments{/number}","issue_comment_url":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/comments{/number}","contents_url":"https://api.github.com/repos/xwiki-contrib/application-tour/contents/{+path}","compare_url":"https://api.github.com/repos/xwiki-contrib/application-tour/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xwiki-contrib/application-tour/merges","archive_url":"https://api.github.com/repos/xwiki-contrib/application-tour/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xwiki-contrib/application-tour/downloads","issues_url":"https://api.github.com/repos/xwiki-contrib/application-tour/issues{/number}","pulls_url":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls{/number}","milestones_url":"https://api.github.com/repos/xwiki-contrib/application-tour/milestones{/number}","notifications_url":"https://api.github.com/repos/xwiki-contrib/application-tour/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xwiki-contrib/application-tour/labels{/name}","releases_url":"https://api.github.com/repos/xwiki-contrib/application-tour/releases{/id}","created_at":"2015-05-21T13:29:02Z","updated_at":"2016-01-20T19:12:39Z","pushed_at":"2016-01-21T09:43:29Z","git_url":"git://github.com/xwiki-contrib/application-tour.git","ssh_url":"git@github.com:xwiki-contrib/application-tour.git","clone_url":"https://github.com/xwiki-contrib/application-tour.git","svn_url":"https://github.com/xwiki-contrib/application-tour","homepage":"http://extensions.xwiki.org/xwiki/bin/view/Extension/Tour+Application","size":63,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"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/xwiki-contrib/application-tour/pulls/1"},"html":{"href":"https://github.com/xwiki-contrib/application-tour/pull/1"},"issue":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/1"},"comments":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/xwiki-contrib/application-tour/statuses/ed5045db15200221bdb4d32a7a59c46e664ce3f7"}}}}