https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=User%3AAnother_Article%2Fworkflowstudyclient.js User:Another Article/workflowstudyclient.js - Revision history 2025-06-13T22:09:39Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.5 https://en.wikipedia.org/w/index.php?title=User:Another_Article/workflowstudyclient.js&diff=732674977&oldid=prev Another Article: correcting for id change 2016-08-02T14:12:15Z <p>correcting for id change</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:12, 2 August 2016</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>$(document).ready(function(){</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>$(document).ready(function(){</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> mw.loader.using( ['oojs-ui', 'mediawiki.util'] ).done( function () {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> mw.loader.using( ['oojs-ui', 'mediawiki.util'] ).done( function () {</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> $( "#pt-<del style="font-weight: bold; text-decoration: none;">notifications-message</del>" ).<del style="font-weight: bold; text-decoration: none;">after</del>(</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> $( "#pt-<ins style="font-weight: bold; text-decoration: none;">mytalk</ins>" ).<ins style="font-weight: bold; text-decoration: none;">before</ins>(</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> $( "&lt;li&gt;" ).append( $( "&lt;a&gt;" )</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> $( "&lt;li&gt;" ).append( $( "&lt;a&gt;" )</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> .text( "0 Q's" )</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> .text( "0 Q's" )</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 8:</td> <td colspan="2" class="diff-lineno">Line 8:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "color": "white",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "color": "white",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "border-radius": "2px",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "border-radius": "2px",</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> "padding": "0.<del style="font-weight: bold; text-decoration: none;">25em</del> 0.<del style="font-weight: bold; text-decoration: none;">45em</del> 0.<del style="font-weight: bold; text-decoration: none;">2em</del>",</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> "padding": "0.<ins style="font-weight: bold; text-decoration: none;">12em</ins> 0.<ins style="font-weight: bold; text-decoration: none;">25em</ins> 0.<ins style="font-weight: bold; text-decoration: none;">12em</ins>",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "cursor": "pointer",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "cursor": "pointer",</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "font-weight": "bold",</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> "font-weight": "bold",</div></td> </tr> </table> Another Article https://en.wikipedia.org/w/index.php?title=User:Another_Article/workflowstudyclient.js&diff=717790354&oldid=prev Another Article: sending make_public data 2016-04-29T18:52:28Z <p>sending make_public data</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:52, 29 April 2016</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 400:</td> <td colspan="2" class="diff-lineno">Line 400:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> {</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> agreed = survey_items['consent'].isSelected();</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> agreed = survey_items['consent'].isSelected();</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> make_public = survey_items['make_public'].isSelected();</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return { type: 'consent',</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> return { type: 'consent',</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> agreed: agreed,</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> agreed: agreed,</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> make_public: make_public,</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> username: username</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> username: username</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> };</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> };</div></td> </tr> </table> Another Article https://en.wikipedia.org/w/index.php?title=User:Another_Article/workflowstudyclient.js&diff=717788251&oldid=prev Another Article: update to different consent form 2016-04-29T18:37:10Z <p>update to different consent form</p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:37, 29 April 2016</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 265:</td> <td colspan="2" class="diff-lineno">Line 265:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;This survey is being conducted for research by the Grouplens Research Lab in the Computer Science and Engineering Department at the University of Minnesota. If you have any questions about this study, please feel free to contact the researchers at [email protected]. For general information about GroupLens, please visit our website at grouplens.org. If you have any questions or concerns regarding this study and would like to talk to someone other than the researchers, you are encouraged to contact the Research Subjects' Advocate Line, D528 Mayo, 420 Delaware St. Southeast, Minneapolis, MN 55455; (612) 625-1650.&lt;/p&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;This survey is being conducted for research by the Grouplens Research Lab in the Computer Science and Engineering Department at the University of Minnesota. If you have any questions about this study, please feel free to contact the researchers at [email protected]. For general information about GroupLens, please visit our website at grouplens.org. If you have any questions or concerns regarding this study and would like to talk to someone other than the researchers, you are encouraged to contact the Research Subjects' Advocate Line, D528 Mayo, 420 Delaware St. Southeast, Minneapolis, MN 55455; (612) 625-1650.&lt;/p&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;h3 id="confidentiality"&gt;Confidentiality&lt;/h3&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;h3 id="confidentiality"&gt;Confidentiality&lt;/h3&gt;</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;Your participation in this study will be kept private and your <del style="font-weight: bold; text-decoration: none;">offline</del> identity will never be recorded<del style="font-weight: bold; text-decoration: none;">. However, we may release a dataset including your responses and the text of the associated edit. You should be aware that while your Wikipedia user name will &lt;strong&gt;NOT&lt;/strong&gt; be included with your response it may be possible for someone to determine it based on the text of your edit</del>. If at any point in the future you wish to withdraw your responses from this study <del style="font-weight: bold; text-decoration: none;">they</del> <del style="font-weight: bold; text-decoration: none;">will</del> <del style="font-weight: bold; text-decoration: none;">be</del> <del style="font-weight: bold; text-decoration: none;">removed</del> <del style="font-weight: bold; text-decoration: none;">from</del> <del style="font-weight: bold; text-decoration: none;">our</del> <del style="font-weight: bold; text-decoration: none;">hosted</del> <del style="font-weight: bold; text-decoration: none;">dataset</del> <del style="font-weight: bold; text-decoration: none;">in so far as we can identify your responses</del>.&lt;/p&gt;</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;Your participation in this study will be kept private and your <ins style="font-weight: bold; text-decoration: none;">off-line</ins> identity will never be recorded. If at any point in the future you wish to withdraw your responses from this study <ins style="font-weight: bold; text-decoration: none;">you</ins> <ins style="font-weight: bold; text-decoration: none;">may</ins> <ins style="font-weight: bold; text-decoration: none;">contact</ins> <ins style="font-weight: bold; text-decoration: none;">us</ins> <ins style="font-weight: bold; text-decoration: none;">and</ins> <ins style="font-weight: bold; text-decoration: none;">they</ins> <ins style="font-weight: bold; text-decoration: none;">will</ins> <ins style="font-weight: bold; text-decoration: none;">be</ins> <ins style="font-weight: bold; text-decoration: none;">removed</ins>.&lt;/p&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;You may volunteer to have your responses publicly released for the benefit of other community members and researchers. If you choose to do so your responses and their associated revision id will be included in the publicly released data set. Note that while this will not include your username explicitly, it will be possible to recover your username from this data. If at any point in the future you wish to withdraw your responses from this public data set they will be removed from our hosted data set, although we will not be able to remove them from copies we do not control.&lt;/p&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;h3 id="participation-is-voluntary"&gt;Participation is Voluntary&lt;/h3&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;h3 id="participation-is-voluntary"&gt;Participation is Voluntary&lt;/h3&gt;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;Participation in this study is voluntary. Your decision whether or not to participate will not affect your relationship with the University of Minnesota. If you decide to participate, you are free to not answer any question or withdraw at any time without affecting this relationship.&lt;/p&gt;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>&lt;p&gt;Participation in this study is voluntary. Your decision whether or not to participate will not affect your relationship with the University of Minnesota. If you decide to participate, you are free to not answer any question or withdraw at any time without affecting this relationship.&lt;/p&gt;</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 279:</td> <td colspan="2" class="diff-lineno">Line 280:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> var consent = new OO.ui.CheckboxInputWidget({</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> var consent = new OO.ui.CheckboxInputWidget({</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> selected: false</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> })</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> var make_public = new OO.ui.CheckboxInputWidget({</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> selected: false</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> selected: false</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> })</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> })</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 290:</td> <td colspan="2" class="diff-lineno">Line 294:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> new OO.ui.FieldLayout( consent, {</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> new OO.ui.FieldLayout( consent, {</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> label: 'I agree to participate',</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> label: 'I agree to participate',</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> align:'inline'</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> }),</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> new OO.ui.FieldLayout( make_public, {</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> label: 'I would like my responses released publicly so other researchers and community members can benefit from them.',</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> align:'inline'</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> align:'inline'</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }),</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> }),</div></td> </tr> <tr> <td colspan="2" class="diff-lineno">Line 297:</td> <td colspan="2" class="diff-lineno">Line 305:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> survey_questions['type'] = 'consent';</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> survey_questions['type'] = 'consent';</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> survey_questions['consent'] = consent;</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> survey_questions['consent'] = consent;</div></td> </tr> <tr> <td colspan="2" class="diff-empty diff-side-deleted"></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> survey_questions['make_public'] = make_public;</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> panel = new OO.ui.PanelLayout({</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> panel = new OO.ui.PanelLayout({</div></td> </tr> </table> Another Article https://en.wikipedia.org/w/index.php?title=User:Another_Article/workflowstudyclient.js&diff=715079688&oldid=prev Another Article: ←Created page with '$(document).ready(function(){ mw.loader.using( ['oojs-ui', 'mediawiki.util'] ).done( function () { $( "#pt-notifications-message" ).after( $( "<l...' 2016-04-13T15:55:56Z <p><a href="/wiki/Wikipedia:AES" class="mw-redirect" title="Wikipedia:AES">←</a>Created page with &#039;$(document).ready(function(){ mw.loader.using( [&#039;oojs-ui&#039;, &#039;mediawiki.util&#039;] ).done( function () { $( &quot;#pt-notifications-message&quot; ).after( $( &quot;&lt;l...&#039;</p> <p><b>New page</b></p><div>$(document).ready(function(){<br /> mw.loader.using( [&#039;oojs-ui&#039;, &#039;mediawiki.util&#039;] ).done( function () {<br /> $( &quot;#pt-notifications-message&quot; ).after(<br /> $( &quot;&lt;li&gt;&quot; ).append( $( &quot;&lt;a&gt;&quot; )<br /> .text( &quot;0 Q&#039;s&quot; )<br /> .css( {<br /> &quot;background-color&quot;: &quot;lightgray&quot;,<br /> &quot;color&quot;: &quot;white&quot;,<br /> &quot;border-radius&quot;: &quot;2px&quot;,<br /> &quot;padding&quot;: &quot;0.25em 0.45em 0.2em&quot;,<br /> &quot;cursor&quot;: &quot;pointer&quot;,<br /> &quot;font-weight&quot;: &quot;bold&quot;,<br /> &quot;transition&quot;: &quot;background-color 0.5s&quot;<br /> } )<br /> .attr(&quot;id&quot;, &quot;survey_question_count&quot;)<br /> )<br /> .attr( &quot;id&quot;, &quot;pt-notifications-survey&quot; )<br /> );<br /> var already_open = false;<br /> <br /> function update_after_submit(remaining_count)<br /> {<br /> if (remaining_count === 0)<br /> {<br /> $(&#039;#survey_question_count&#039;).text(&quot;Thx!&quot;);<br /> $(&#039;#pt-notifications-survey&#039;).unbind(&quot;click&quot;);<br /> $(&#039;#survey_question_count&#039;).css(&#039;background-color&#039;, &#039;lightgray&#039;);<br /> }<br /> else<br /> {<br /> $(&#039;#survey_question_count&#039;).text(remaining_count + &quot; Q&#039;s&quot;);<br /> }<br /> }<br /> <br /> // Subclass ProcessDialog.<br /> function ProcessDialog( config ) {<br /> ProcessDialog.super.call( this, config );<br /> }<br /> OO.inheritClass( ProcessDialog, OO.ui.ProcessDialog );<br /> <br /> ProcessDialog.static.title = &#039;Edit Questions&#039;;<br /> ProcessDialog.static.actions = [<br /> { modes: [&#039;beginning&#039;, &#039;middle&#039;, &#039;end&#039;, &#039;single&#039;], action: &#039;submit&#039;, label: &#039;Submit&#039;, flags: [ &#039;primary&#039;, &#039;constructive&#039; ] },<br /> { modes: [&#039;beginning&#039;, &#039;middle&#039;, &#039;end&#039;, &#039;single&#039;], label: &#039;Cancel&#039;, flags: &#039;safe&#039; },<br /> { modes: [&#039;middle&#039;, &#039;end&#039;], action: &#039;prev&#039;, label: &#039;Previous&#039; },<br /> { modes: [&#039;beginning&#039;, &#039;middle&#039;], action: &#039;next&#039;, label: &#039;Next&#039; },<br /> ];<br /> <br /> ProcessDialog.prototype._get_diff_url = function(rev_id){<br /> return &quot;https://en.wikipedia.org/w/index.php?diff=prev&amp;oldid=&quot; + rev_id;<br /> };<br /> <br /> ProcessDialog.prototype._get_prompt = function(data_entry){<br /> var d = new Date(data_entry[&#039;timestamp&#039;]);<br /> var time_stamp_string = d.toLocaleDateString() + &quot; &quot; + d.toLocaleTimeString();<br /> return new OO.ui.LabelWidget( {<br /> label: new OO.ui.HtmlSnippet(<br /> &#039;&lt;table style=&quot;width:100%&quot;\<br /> &lt;tr&gt;\<br /> &lt;th style=&quot;vertical-align:top&quot;&gt; Title: &lt;/th&gt;\<br /> &lt;td id=&quot;edit_title&quot; &gt;&#039; + data_entry[&#039;title&#039;] + &#039;&lt;/td&gt;\<br /> &lt;/tr&gt;\<br /> &lt;tr&gt;\<br /> &lt;th style=&quot;vertical-align:top&quot;&gt; Comment: &lt;/th&gt;\<br /> &lt;td id=&quot;edit_comment&quot; &gt;&#039; + data_entry[&#039;comment&#039;] + &#039;&lt;/td&gt;\<br /> &lt;/tr&gt;\<br /> &lt;tr&gt;\<br /> &lt;th style=&quot;vertical-align:top&quot;&gt; Edit time: &lt;/th&gt;\<br /> &lt;td id=&quot;edit_time&quot; &gt;&#039; + time_stamp_string + &#039;&lt;/td&gt;\<br /> &lt;/tr&gt;\<br /> &lt;tr&gt;\<br /> &lt;th style=&quot;vertical-align:top&quot;&gt; Diff Link: &lt;/th&gt;\<br /> &lt;td id=&quot;edit_diff&quot; &gt;\<br /> &lt;a id=&quot;edit_diff_link&quot; href=&quot;&#039; + this._get_diff_url(data_entry[&#039;revid&#039;]) + &#039;&quot; target=&quot;_blank&quot;&gt;&#039;+ data_entry[&#039;title&#039;] +&#039;&lt;/a&gt; &lt;/td&gt;\<br /> &lt;/tr&gt;\<br /> &lt;/table&gt;&#039;<br /> )<br /> } );<br /> <br /> };<br /> <br /> ProcessDialog.prototype._get_panel = function (data_entry){<br /> if (data_entry[&#039;type&#039;] == &#039;time&#039;)<br /> {<br /> return this._get_time_panel(data_entry)<br /> }<br /> else if (data_entry[&#039;type&#039;] == &#039;process&#039;)<br /> {<br /> return this._get_process_panel(data_entry)<br /> }<br /> else if (data_entry[&#039;type&#039;] == &#039;consent&#039;)<br /> {<br /> return this._get_consent_panel(data_entry)<br /> }<br /> }<br /> <br /> ProcessDialog.prototype._get_time_panel = function (data_entry){<br /> var prompt = this._get_prompt(data_entry)<br /> <br /> // Time allocated for edit<br /> var time_spent = new OO.ui.NumberInputWidget( {<br /> min: 0,<br /> } );<br /> time_spent.$element.width(&quot;33%&quot;)<br /> <br /> // Units being used<br /> var option1 = new OO.ui.ButtonOptionWidget( {<br /> data: 1,<br /> label: &#039;Seconds&#039;,<br /> } );<br /> var option2 = new OO.ui.ButtonOptionWidget( {<br /> data: 60,<br /> label: &#039;Minutes&#039;,<br /> } );<br /> var option3 = new OO.ui.ButtonOptionWidget( {<br /> data: 60*60,<br /> label: &#039;Hours&#039;,<br /> } );<br /> var time_units = new OO.ui.ButtonSelectWidget( {<br /> items: [ option1, option2, option3 ],<br /> tabindex: 2<br /> } );<br /> time_units.selectItem(option2);<br /> <br /> var work_type = new OO.ui.TextInputWidget( {<br /> rows: 3,<br /> multiline: true,<br /> } );<br /> <br /> var work_steps = new OO.ui.TextInputWidget( {<br /> rows: 3,<br /> multiline: true,<br /> } );<br /> <br /> var dont_ask = new OO.ui.CheckboxInputWidget({<br /> selected: false<br /> })<br /> // Putting all of the elements together<br /> var fieldset = new OO.ui.FieldsetLayout( {<br /> } );<br /> fieldset.addItems( [<br /> new OO.ui.FieldLayout( prompt, {<br /> label: &#039;All questions are with respect to the following edit.&#039;,<br /> align: &#039;top&#039;<br /> } ),<br /> new OO.ui.FieldLayout( work_steps, {<br /> label: &#039;Describe all activities (both on-wiki and off-wiki) that contributed to this edit. These can range from editing the wiki-text to getting a book from the library.&#039;,<br /> align: &#039;top&#039;,<br /> help: &#039;This can include a description of how you found this article,\<br /> the background research you had to do, any people you had to\<br /> talk to, or anything else that you think led to this edit.&#039;<br /> } ),<br /> new OO.ui.FieldLayout( work_type, {<br /> label: &#039;Describe the type of activity you were doing, e.g. copy-editing, revising section, adding illustrations.&#039;,<br /> align: &#039;top&#039;,<br /> help: &#039;Some examples would include: copy editing, creating new content,\<br /> fact checking, wikifying, cleanup, adding illustrations, coordinating, etc.&#039;,<br /> } ),<br /> new OO.ui.FieldLayout( time_spent, {<br /> label: &#039;How much time did you spend working on this edit?&#039;,<br /> align: &#039;top&#039;,<br /> help: &#039;Estimate the amount of time that went into this edit\<br /> as you did everything you described in the first question.&#039;<br /> } ),<br /> new OO.ui.FieldLayout( time_units, {<br /> align:&#039;right&#039;<br /> }),<br /> new OO.ui.FieldLayout( dont_ask, {<br /> label: &#039;I don\&#039;t feel like answering this one&#039;,<br /> align:&#039;inline&#039;<br /> }),<br /> ] );<br /> <br /> survey_questions = [];<br /> survey_questions[&#039;type&#039;] = &#039;time&#039;;<br /> survey_questions[&#039;revid&#039;] = data_entry[&#039;revid&#039;];<br /> survey_questions[&#039;time_spent&#039;] = time_spent;<br /> survey_questions[&#039;time_units&#039;] = time_units;<br /> survey_questions[&#039;work_type&#039;] = work_type;<br /> survey_questions[&#039;work_steps&#039;] = work_steps;<br /> survey_questions[&#039;dont_ask&#039;] = dont_ask;<br /> <br /> panel = new OO.ui.PanelLayout({<br /> expanded: false,<br /> framed: false,<br /> padded: true,<br /> $content: $(fieldset.$element),<br /> data: survey_questions<br /> });<br /> <br /> //panel.$element.append(fieldset.$element);<br /> return panel<br /> }<br /> <br /> ProcessDialog.prototype._get_process_panel = function (data_entry){<br /> var prompt = this._get_prompt(data_entry)<br /> <br /> var arrival_desc = new OO.ui.TextInputWidget( {<br /> rows: 4,<br /> multiline: true,<br /> } );<br /> <br /> var edit_motivation = new OO.ui.TextInputWidget( {<br /> rows: 4,<br /> multiline: true,<br /> } );<br /> <br /> var dont_ask = new OO.ui.CheckboxInputWidget({<br /> selected: false<br /> })<br /> // Putting all of the elements together<br /> var fieldset = new OO.ui.FieldsetLayout( {<br /> } );<br /> fieldset.addItems( [<br /> new OO.ui.FieldLayout( prompt, {<br /> label: &#039;All questions are with respect to the following edit.&#039;,<br /> align: &#039;top&#039;<br /> } ),<br /> new OO.ui.FieldLayout( arrival_desc, {<br /> label: &#039;Describe how you got to this article.&#039;,<br /> align: &#039;top&#039;,<br /> help: &#039;Did you stumble upon it from personal interest? Did you \<br /> find it as part of a project? Did someone ask you to look\<br /> at it?&#039;<br /> } ),<br /> new OO.ui.FieldLayout( edit_motivation, {<br /> label: &#039;What prompted you to make this specific edit?&#039;,<br /> align: &#039;top&#039;,<br /> help: &#039;Why was it important to you that this edit be made?&#039;<br /> } ),<br /> new OO.ui.FieldLayout( dont_ask, {<br /> label: &#039;I don\&#039;t feel like answering this one&#039;,<br /> align:&#039;inline&#039;<br /> }),<br /> ] );<br /> <br /> survey_questions = [];<br /> survey_questions[&#039;type&#039;] = &#039;process&#039;;<br /> survey_questions[&#039;revid&#039;] = data_entry[&#039;revid&#039;];<br /> survey_questions[&#039;arrival_desc&#039;] = arrival_desc;<br /> survey_questions[&#039;edit_motivation&#039;] = edit_motivation;<br /> survey_questions[&#039;dont_ask&#039;] = dont_ask;<br /> <br /> panel = new OO.ui.PanelLayout({<br /> expanded: false,<br /> framed: false,<br /> padded: true,<br /> $content: $(fieldset.$element),<br /> data: survey_questions<br /> });<br /> <br /> return panel<br /> }<br /> <br /> ProcessDialog.prototype._get_consent_prompt = function(data_entry){<br /> var d = new Date(data_entry[&#039;timestamp&#039;]);<br /> var time_stamp_string = d.toLocaleDateString() + &quot; &quot; + d.toLocaleTimeString();<br /> return new OO.ui.LabelWidget( {<br /> label: new OO.ui.HtmlSnippet(<br /> `&lt;h1 id=&quot;consent-form&quot;&gt;Consent form&lt;/h1&gt;<br /> &lt;p&gt;Thank you for enabling our survey! But first, we ask that you read the following information and ask any questions you may have before agreeing to participate.&lt;/p&gt;<br /> &lt;h3 id=&quot;purpose-and-procedure&quot;&gt;Purpose and Procedure&lt;/h3&gt;<br /> &lt;p&gt;We are working to better understand the process through which Wikipedians contribute to Wikipedia. We would like to hear about the process you use as you contribute and invite you to participate in this study. If you agree to participate our survey will be integrated into your Wikipedia experience. As you go about your normal activities the survey will occasionally notify you that we have a question about some of your recent contributions. Each set of questions should take less than 5 minutes to answer and we will never ask you more than 5 question sets in a day. The survey period will last for two weeks.&lt;/p&gt;<br /> &lt;h3 id=&quot;contacts-and-questions&quot;&gt;Contacts and Questions&lt;/h3&gt;<br /> &lt;p&gt;This survey is being conducted for research by the Grouplens Research Lab in the Computer Science and Engineering Department at the University of Minnesota. If you have any questions about this study, please feel free to contact the researchers at [email protected]. For general information about GroupLens, please visit our website at grouplens.org. If you have any questions or concerns regarding this study and would like to talk to someone other than the researchers, you are encouraged to contact the Research Subjects&#039; Advocate Line, D528 Mayo, 420 Delaware St. Southeast, Minneapolis, MN 55455; (612) 625-1650.&lt;/p&gt;<br /> &lt;h3 id=&quot;confidentiality&quot;&gt;Confidentiality&lt;/h3&gt;<br /> &lt;p&gt;Your participation in this study will be kept private and your offline identity will never be recorded. However, we may release a dataset including your responses and the text of the associated edit. You should be aware that while your Wikipedia user name will &lt;strong&gt;NOT&lt;/strong&gt; be included with your response it may be possible for someone to determine it based on the text of your edit. If at any point in the future you wish to withdraw your responses from this study they will be removed from our hosted dataset in so far as we can identify your responses.&lt;/p&gt;<br /> &lt;h3 id=&quot;participation-is-voluntary&quot;&gt;Participation is Voluntary&lt;/h3&gt;<br /> &lt;p&gt;Participation in this study is voluntary. Your decision whether or not to participate will not affect your relationship with the University of Minnesota. If you decide to participate, you are free to not answer any question or withdraw at any time without affecting this relationship.&lt;/p&gt;<br /> &lt;h3 id=&quot;statement-of-consent&quot;&gt;Statement of Consent&lt;/h3&gt;<br /> &lt;p&gt;After reading the above passage, please select whether you consent to participate or not:&lt;br /&gt;`<br /> )<br /> } );<br /> <br /> };<br /> <br /> ProcessDialog.prototype._get_consent_panel = function (data_entry){<br /> var prompt = this._get_consent_prompt(data_entry)<br /> <br /> var consent = new OO.ui.CheckboxInputWidget({<br /> selected: false<br /> })<br /> // Putting all of the elements together<br /> var fieldset = new OO.ui.FieldsetLayout( {<br /> } );<br /> fieldset.addItems( [<br /> new OO.ui.FieldLayout( prompt, {<br /> align: &#039;top&#039;<br /> } ),<br /> new OO.ui.FieldLayout( consent, {<br /> label: &#039;I agree to participate&#039;,<br /> align:&#039;inline&#039;<br /> }),<br /> ] );<br /> <br /> survey_questions = [];<br /> survey_questions[&#039;type&#039;] = &#039;consent&#039;;<br /> survey_questions[&#039;consent&#039;] = consent;<br /> <br /> panel = new OO.ui.PanelLayout({<br /> expanded: false,<br /> framed: false,<br /> padded: true,<br /> $content: $(fieldset.$element),<br /> data: survey_questions<br /> });<br /> <br /> return panel<br /> }<br /> <br /> ProcessDialog.prototype._send_data_from_stack_layout = function(stackLayout)<br /> {<br /> var count = 0;<br /> var panels = stackLayout.getItems();<br /> for(var i=panels.length - 1; i &gt;= 0 ; i--)<br /> {<br /> var datum = this._get_data_from_panel(panels[i]);<br /> if (undefined !== datum)<br /> {<br /> $.post( &quot;https://triton.grouplens.org:8000/api/v0.1/submit&quot;, datum);<br /> count++;<br /> this.data.splice(i,1);<br /> }<br /> }<br /> return count;<br /> }<br /> <br /> ProcessDialog.prototype._get_data_from_panel = function(panel)<br /> {<br /> survey_items = panel.data;<br /> if (survey_items[&#039;type&#039;] == &#039;time&#039;)<br /> {<br /> return this._get_data_from_time_panel(survey_items)<br /> }<br /> else if (survey_items[&#039;type&#039;] == &#039;process&#039;)<br /> {<br /> return this._get_data_from_process_panel(survey_items)<br /> }<br /> else if (survey_items[&#039;type&#039;] == &#039;consent&#039;)<br /> {<br /> return this._get_data_from_consent_panel(survey_items)<br /> }<br /> };<br /> <br /> ProcessDialog.prototype._get_data_from_process_panel = function(survey_items)<br /> {<br /> revid = survey_items[&#039;revid&#039;];<br /> arrival_desc = survey_items[&#039;arrival_desc&#039;].value;<br /> edit_motivation = survey_items[&#039;edit_motivation&#039;].value;<br /> dont_ask = survey_items[&#039;dont_ask&#039;].isSelected();<br /> if (&quot;&quot; !== arrival_desc || &quot;&quot; !== edit_motivation || dont_ask)<br /> {<br /> return { type: &#039;process&#039;,<br /> revid: revid,<br /> arrival_desc: arrival_desc,<br /> edit_motivation: edit_motivation,<br /> dont_ask: dont_ask,<br /> };<br /> }<br /> else<br /> {<br /> return undefined;<br /> }<br /> }<br /> <br /> ProcessDialog.prototype._get_data_from_time_panel = function(survey_items)<br /> {<br /> revid = survey_items[&#039;revid&#039;];<br /> time_spent = survey_items[&#039;time_spent&#039;].input.value;<br /> time_units = survey_items[&#039;time_units&#039;].getSelectedItem().data;<br /> work_type = survey_items[&#039;work_type&#039;].value;<br /> work_steps = survey_items[&#039;work_steps&#039;].value;<br /> dont_ask = survey_items[&#039;dont_ask&#039;].isSelected();<br /> if (&quot;&quot; !== time_spent || dont_ask)<br /> {<br /> return { type: &#039;time&#039;,<br /> revid: revid,<br /> time: time_spent * time_units,<br /> work_type: work_type,<br /> steps: work_steps,<br /> dont_ask: dont_ask,<br /> };<br /> }<br /> else<br /> {<br /> return undefined;<br /> }<br /> }<br /> <br /> ProcessDialog.prototype._get_data_from_consent_panel = function(survey_items)<br /> {<br /> agreed = survey_items[&#039;consent&#039;].isSelected();<br /> return { type: &#039;consent&#039;,<br /> agreed: agreed,<br /> username: username<br /> };<br /> }<br /> <br /> ProcessDialog.prototype.initialize = function () {<br /> ProcessDialog.super.prototype.initialize.apply( this, arguments );<br /> <br /> this.current_element = 0;<br /> <br /> this.stackLayout= new OO.ui.StackLayout( )<br /> for(var i=0; i &lt; this.data.length; i++)<br /> {<br /> panel = this._get_panel(this.data[i]);<br /> this.stackLayout.addItems([panel]);<br /> }<br /> this.$body.append( this.stackLayout.$element );<br /> };<br /> <br /> // Set up the initial mode of the window (&#039;edit&#039;, in this example.)<br /> ProcessDialog.prototype.getSetupProcess = function ( data ) {<br /> return ProcessDialog.super.prototype.getSetupProcess.call( this, data )<br /> .next( function () {<br /> if (this.data.length &gt; 1)<br /> {<br /> this.actions.setMode( &#039;beginning&#039; );<br /> }<br /> else<br /> {<br /> this.actions.setMode( &#039;single&#039; )<br /> }<br /> }, this );<br /> };<br /> <br /> // Use the getActionProcess() method to set the modes and displayed item.<br /> ProcessDialog.prototype.getActionProcess = function ( action ) {<br /> <br /> if ((action === &#039;prev&#039;) &amp;&amp; (this.current_element &gt; 0))<br /> {<br /> this.current_element--;<br /> this.stackLayout.setItem(this.stackLayout.items[this.current_element]);<br /> }<br /> else if ((action === &#039;next&#039;) &amp;&amp; (this.current_element &lt; this.stackLayout.getItems().length-1))<br /> {<br /> this.current_element++;<br /> this.stackLayout.setItem(this.stackLayout.items[this.current_element]);<br /> }<br /> else if (action === &#039;submit&#039;)<br /> {<br /> this._send_data_from_stack_layout(this.stackLayout);<br /> update_after_submit(this.data.length);<br /> this.close()<br /> }<br /> <br /> if (this.current_element === 0)<br /> {<br /> this.actions.setMode(&#039;beginning&#039;);<br /> }<br /> else if (this.current_element == this.stackLayout.getItems().length-1)<br /> {<br /> this.actions.setMode(&#039;end&#039;);<br /> }<br /> else<br /> {<br /> this.actions.setMode(&#039;middle&#039;);<br /> }<br /> return ProcessDialog.super.prototype.getActionProcess.call( this, action );<br /> };<br /> <br /> // Get dialog height.<br /> ProcessDialog.prototype.getBodyHeight = function () {<br /> var height = 0;<br /> var index;<br /> for (index = 0; this.stackLayout.items.length &gt; index; index++){<br /> var temp = this.stackLayout.items[index].$element.outerHeight(true);<br /> if (temp &gt; height)<br /> {<br /> height = temp;<br /> }<br /> }<br /> return height + 20;<br /> };<br /> <br /> ProcessDialog.prototype.teardown = function(data){<br /> already_open = false;<br /> return ProcessDialog.super.prototype.teardown.call( this, data )<br /> };<br /> <br /> function show_survey(event)<br /> {<br /> if (!already_open)<br /> {<br /> already_open = true;<br /> // Create and append the window manager.<br /> var windowManager = new OO.ui.WindowManager();<br /> $( &#039;body&#039; ).append( windowManager.$element );<br /> <br /> // Create a new dialog window.<br /> var processDialog = new ProcessDialog( {<br /> size: &#039;large&#039;,<br /> data: event.data.data,<br /> } );<br /> <br /> // Add windows to window manager using the addWindows() method.<br /> windowManager.addWindows( [ processDialog ] );<br /> <br /> // Open the window.<br /> windowManager.openWindow( processDialog );<br /> }<br /> }<br /> var username = mw.config.get( &#039;wgUserName&#039; ).replace(&quot; &quot;, &quot;_&quot;);<br /> $.getJSON(&#039;https://triton.grouplens.org:8000/api/v0.1/prompts?username=&#039; + username, function(question_data) {<br /> if (question_data.length &gt; 0)<br /> {<br /> $(&#039;#survey_question_count&#039;).text(question_data.length + &quot; Q&#039;s&quot;);<br /> $(&#039;#pt-notifications-survey&#039;).click({data: question_data}, show_survey);<br /> $(&#039;#survey_question_count&#039;).css(&#039;background-color&#039;, &#039;green&#039;);<br /> }<br /> })<br /> })<br /> })</div> Another Article