<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[2272] sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments: WordCamp Budgets: Reorganize to make room for additional modules.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://meta.trac.wordpress.org/changeset/2272">2272</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://meta.trac.wordpress.org/changeset/2272","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>iandunn</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2016-01-11 22:15:37 +0000 (Mon, 11 Jan 2016)</dd>
</dl>

<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>WordCamp Budgets: Reorganize to make room for additional modules.

Soon we'll be adding modules for Budgets and Sponsor Invoices, in addition to the existing one for Payment Requests.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsbootstrapphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/bootstrap.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludesencryptionphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/encryption.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludespaymentrequestphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptattachedfilesjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/attached-files.js</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsviewspaymentrequestinputfilesphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/input-files.php</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentscsswordcampbudgetscss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-budgets.css</a></li>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludeswordcampbudgetsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptwordcampbudgetsjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-budgets.js</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/</li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentscsswordcamppaymentscss">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-payments.css</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludeswordcamppaymentsphp">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-payments.php</a></li>
<li><a href="#sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptwordcamppaymentsjs">sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-payments.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsbootstrapphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/bootstrap.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/bootstrap.php   2016-01-11 21:54:51 UTC (rev 2271)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/bootstrap.php     2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,9 +1,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-Plugin Name: WordCamp Payments
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+Plugin Name: WordCamp Budgets
</ins><span class="cx" style="display: block; padding: 0 10px"> Plugin URI:  http://wordcamp.org/
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-Description: Provides tools for collecting and processing payment requests from WordCamp organizers.
-Author:      tellyworth, iandunn
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+Description: Provides tools for managing WordCamp budgets, sponsor invoices, and payment requests.
+Author:      WordCamp.org
+Author URI:  https://wordcamp.org
</ins><span class="cx" style="display: block; padding: 0 10px"> Version:     0.1
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,10 +13,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_admin() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        require_once( __DIR__ . '/classes/wordcamp-payments.php' );
-       require_once( __DIR__ . '/classes/payment-request.php' );
-       require_once( __DIR__ . '/classes/encryption.php' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ require_once( __DIR__ . '/includes/wordcamp-budgets.php' );
+       require_once( __DIR__ . '/includes/payment-request.php' );
+       require_once( __DIR__ . '/includes/encryption.php' );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $GLOBALS['wordcamp_payments']   = new WordCamp_Payments();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $GLOBALS['wordcamp_budgets']    = new WordCamp_Budgets();
</ins><span class="cx" style="display: block; padding: 0 10px">         $GLOBALS['wcp_payment_request'] = new WCP_Payment_Request();
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentscsswordcampbudgetscssfromrev2255sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentscsswordcamppaymentscss"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-budgets.css (from rev 2255, sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-payments.css)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-budgets.css                                (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-budgets.css  2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,50 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+/*
+ * Payment Methods
+ */
+.payment_method_fields.active,
+.wcp_no_files_uploaded.active {
+       display: block;
+}
+
+tr#row-payment-method label {
+       margin-right: 20px;
+}
+
+
+/*
+ * Files
+ */
+#wcp_files .description {
+       margin-bottom: 1em;
+}
+
+.wcp_files_list li {
+       list-style-type: disc;
+       margin-left: 15px;
+}
+
+.form-table td p.wcp_no_files_uploaded {
+       margin-bottom: 1em;
+}
+
+
+/*
+ * Log
+ */
+#wcp_log .inside {
+       margin: 0;
+       padding: 0;
+}
+
+#wcp_log .wcp-request-log {
+       border-collapse: collapse;
+       width: 100%;
+}
+
+#wcp_log .wcp-request-log td {
+       padding: 8px;
+}
+
+#wcp_log td.timestamp {
+       width: 130px;
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentscsswordcamppaymentscss"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-payments.css</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-payments.css       2016-01-11 21:54:51 UTC (rev 2271)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/css/wordcamp-payments.css 2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,46 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-/*
- * Payment Methods
- */
-.payment_method_fields.active,
-.wcp_no_files_uploaded.active {
-       display: block;
-}
-
-tr#row-payment-method label {
-       margin-right: 20px;
-}
-
-
-/*
- * Files
- */
-#wcp_files .description {
-       margin-bottom: 1em;
-}
-
-.wcp_files_list li {
-       list-style-type: disc;
-       margin-left: 15px;
-}
-
-.form-table td p.wcp_no_files_uploaded {
-       margin-bottom: 1em;
-}
-
-#wcp_log .inside {
-       margin: 0;
-       padding: 0;
-}
-
-#wcp_log .wcp-request-log {
-       border-collapse: collapse;
-       width: 100%;
-}
-
-#wcp_log .wcp-request-log td {
-       padding: 8px;
-}
-
-#wcp_log td.timestamp {
-       width: 130px;
-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludesencryptionphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/encryption.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/encryption.php  2016-01-11 20:17:11 UTC (rev 2270)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/encryption.php   2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -107,4 +107,4 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                return $decrypted;
</span><span class="cx" style="display: block; padding: 0 10px">        }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-}
</del><span class="cx" style="display: block; padding: 0 10px">\ No newline at end of file
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludespaymentrequestphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/payment-request.php     2016-01-11 20:17:11 UTC (rev 2270)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/payment-request.php      2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -940,23 +940,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">                if ( $new == 'incomplete' && $old != 'incomplete' ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $incomplete_text = get_post_meta( $post->ID, '_wcp_incomplete_notes', true );
</span><span class="cx" style="display: block; padding: 0 10px">                        $incomplete_text = preg_replace( '#\.$#', '', $incomplete_text ); // trailing-undot-it.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        WordCamp_Payments::log( $post->ID, sprintf( 'Marked as incomplete by %s: %s.', $user->display_name, $incomplete_text ), array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 WordCamp_Budgets::log( $post->ID, sprintf( 'Marked as incomplete by %s: %s.', $user->display_name, $incomplete_text ), array(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'user_id' => $user->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'action' => 'marked-incomplete',
</span><span class="cx" style="display: block; padding: 0 10px">                                'reason' => 'maybe notes',
</span><span class="cx" style="display: block; padding: 0 10px">                        ) );
</span><span class="cx" style="display: block; padding: 0 10px">                } elseif ( $new == 'paid' && $old != 'paid' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        WordCamp_Payments::log( $post->ID, sprintf( 'Marked as paid by %s.', $user->display_name ), array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 WordCamp_Budgets::log( $post->ID, sprintf( 'Marked as paid by %s.', $user->display_name ), array(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'user_id' => $user->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'action' => 'marked-paid',
</span><span class="cx" style="display: block; padding: 0 10px">                        ) );
</span><span class="cx" style="display: block; padding: 0 10px">                } elseif ( $old == 'auto-draft' && $new != 'auto-draft' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        WordCamp_Payments::log( $post->ID, sprintf( 'Request created by %s.', $user->display_name ), array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 WordCamp_Budgets::log( $post->ID, sprintf( 'Request created by %s.', $user->display_name ), array(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'user_id' => $user->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'action' => 'updated',
</span><span class="cx" style="display: block; padding: 0 10px">                        ) );
</span><span class="cx" style="display: block; padding: 0 10px">                } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        WordCamp_Payments::log( $post->ID, sprintf( 'Request updated by %s.', $user->display_name ), array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 WordCamp_Budgets::log( $post->ID, sprintf( 'Request updated by %s.', $user->display_name ), array(
</ins><span class="cx" style="display: block; padding: 0 10px">                                 'user_id' => $user->ID,
</span><span class="cx" style="display: block; padding: 0 10px">                                'action' => 'updated',
</span><span class="cx" style="display: block; padding: 0 10px">                        ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -981,7 +981,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        return;
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                remove_action( 'save_post', array( $this, 'save_payment' ), 10, 2 ); // avoid infinite recursion
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         remove_action( 'save_post', array( $this, 'save_payment' ), 10 ); // avoid infinite recursion
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                foreach( $files as $file_id ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        wp_update_post( array(
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludeswordcampbudgetsphpfromrev2270sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsclasseswordcamppaymentsphp"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php (from rev 2270, sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/wordcamp-payments.php)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php                           (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-budgets.php     2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,103 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+<?php
+
+/*
+ * Main class to provide functionality common to all other classes
+ */
+class WordCamp_Budgets {
+       const VERSION = '0.1.1';
+
+       /**
+        * Constructor
+        */
+       public function __construct() {
+               add_action( 'admin_enqueue_scripts',  array( $this, 'enqueue_assets' ), 11 );
+       }
+
+       /**
+        * Enqueue scripts and stylesheets
+        */
+       public function enqueue_assets( $hook ) {
+               global $post;
+
+               // todo setup grunt to concat/minify js and css?
+
+               // Register our assets
+               wp_register_script(
+                       'wordcamp-budgets',
+                       plugins_url( 'javascript/wordcamp-budgets.js', __DIR__ ),
+                       array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
+                       self::VERSION,
+                       true
+               );
+
+               wp_register_script(
+                       'wcp-attached-files',
+                       plugins_url( 'javascript/attached-files.js', __DIR__ ),
+                       array( 'wordcamp-budgets', 'backbone', 'wp-util' ),
+                       self::VERSION,
+                       true
+               );
+
+               // Let's still include our .css file even if these are unavailable.
+               $soft_deps = array( 'jquery-ui', 'wp-datepicker-skins' );
+               foreach ( $soft_deps as $key => $handle )
+                       if ( ! wp_style_is( $handle, 'registered' ) )
+                               unset( $soft_deps[ $key ] );
+
+               wp_register_style(
+                       'wordcamp-budgets',
+                       plugins_url( 'css/wordcamp-budgets.css', __DIR__ ),
+                       $soft_deps,
+                       self::VERSION
+               );
+
+               // Enqueue our assets if they're needed on the current screen
+               $current_screen = get_current_screen();
+
+               if ( in_array( $current_screen->id, array( 'edit-wcp_payment_request', 'wcp_payment_request' ) ) ) {
+                       wp_enqueue_script( 'wordcamp-budgets' );
+                       wp_enqueue_style( 'wordcamp-budgets' );
+
+                       if ( in_array( $current_screen->id, array( 'wcp_payment_request' ) ) && isset( $post->ID ) ) {
+                               wp_enqueue_media( array( 'post' => $post->ID ) );
+                               wp_enqueue_script( 'wcp-attached-files' );
+                       }
+
+                       wp_localize_script(
+                               'wordcamp-budgets',
+                               'wcpLocalizedStrings',          // todo merge into wordcampBudgets var
+                               array(
+                                       'uploadModalTitle'  => __( 'Attach Supporting Documentation', 'wordcamporg' ),
+                                       'uploadModalButton' => __( 'Attach Files', 'wordcamporg' ),
+                               )
+                       );
+               }
+       }
+
+       /**
+        * Insert an entry into a log for one of the custom post types
+        *
+        * @param int    $post_id The post ID.
+        * @param string $message A log message.
+        * @param array  $data    Optional data.
+        */
+       public static function log( $post_id, $message, $data = array() ) {
+               global $wpdb;
+
+               $entry = array(
+                       'timestamp' => time(),
+                       'message' => $message,
+                       'data' => $data,
+               );
+
+               $log = get_post_meta( $post_id, '_wcp_log', true );
+               if ( empty( $log ) )
+                       $log = '[]';
+
+               $log = json_decode( $log, true );
+               $log[] = $entry;
+               $log = json_encode( $log );
+
+               update_post_meta( $post_id, '_wcp_log', wp_slash( $log ) );
+       }
+}
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsincludeswordcamppaymentsphp"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-payments.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/wordcamp-payments.php   2016-01-11 20:17:11 UTC (rev 2270)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/includes/wordcamp-payments.php    2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,103 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-<?php
-
-/*
- * Main class to provide functionality common to all other classes
- */
-class WordCamp_Payments {
-       const VERSION = '0.1.1';
-
-       /**
-        * Constructor
-        */
-       public function __construct() {
-               add_action( 'admin_enqueue_scripts',  array( $this, 'enqueue_assets' ), 11 );
-       }
-
-       /**
-        * Enqueue scripts and stylesheets
-        */
-       public function enqueue_assets( $hook ) {
-               global $post;
-
-               // todo setup grunt to concat/minify js and css?
-
-               // Register our assets
-               wp_register_script(
-                       'wordcamp-payments',
-                       plugins_url( 'javascript/wordcamp-payments.js', __DIR__ ),
-                       array( 'jquery', 'jquery-ui-datepicker', 'media-upload', 'media-views' ),
-                       self::VERSION,
-                       true
-               );
-
-               wp_register_script(
-                       'wcp-attached-files',
-                       plugins_url( 'javascript/attached-files.js', __DIR__ ),
-                       array( 'wordcamp-payments', 'backbone', 'wp-util' ),
-                       self::VERSION,
-                       true
-               );
-
-               // Let's still include our .css file even if these are unavailable.
-               $soft_deps = array( 'jquery-ui', 'wp-datepicker-skins' );
-               foreach ( $soft_deps as $key => $handle )
-                       if ( ! wp_style_is( $handle, 'registered' ) )
-                               unset( $soft_deps[ $key ] );
-
-               wp_register_style(
-                       'wordcamp-payments',
-                       plugins_url( 'css/wordcamp-payments.css', __DIR__ ),
-                       $soft_deps,
-                       self::VERSION
-               );
-
-               // Enqueue our assets if they're needed on the current screen
-               $current_screen = get_current_screen();
-
-               if ( in_array( $current_screen->id, array( 'edit-wcp_payment_request', 'wcp_payment_request' ) ) ) {
-                       wp_enqueue_script( 'wordcamp-payments' );
-                       wp_enqueue_style( 'wordcamp-payments' );
-
-                       if ( in_array( $current_screen->id, array( 'wcp_payment_request' ) ) && isset( $post->ID ) ) {
-                               wp_enqueue_media( array( 'post' => $post->ID ) );
-                               wp_enqueue_script( 'wcp-attached-files' );
-                       }
-
-                       wp_localize_script(
-                               'wordcamp-payments',
-                               'wcpLocalizedStrings',          // todo merge into wordcampPayments var
-                               array(
-                                       'uploadModalTitle'  => __( 'Attach Supporting Documentation', 'wordcamporg' ),
-                                       'uploadModalButton' => __( 'Attach Files', 'wordcamporg' ),
-                               )
-                       );
-               }
-       }
-
-       /**
-        * Log something with a payment request.
-        *
-        * @param int $post_id The payment requset ID.
-        * @param string $message A log message.
-        * @param array $data Optional data.
-        */
-       public static function log( $post_id, $message, $data = array() ) {
-               global $wpdb;
-
-               $entry = array(
-                       'timestamp' => time(),
-                       'message' => $message,
-                       'data' => $data,
-               );
-
-               $log = get_post_meta( $post_id, '_wcp_log', true );
-               if ( empty( $log ) )
-                       $log = '[]';
-
-               $log = json_decode( $log, true );
-               $log[] = $entry;
-               $log = json_encode( $log );
-
-               update_post_meta( $post_id, '_wcp_log', wp_slash( $log ) );
-       }
-}
</del></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptattachedfilesjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/attached-files.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/attached-files.js    2016-01-11 21:54:51 UTC (rev 2271)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/attached-files.js      2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3,7 +3,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /*
</span><span class="cx" style="display: block; padding: 0 10px">         * Model for an attached file
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $.wordcampPayments.AttachedFile = Backbone.Model.extend( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $.wordcampBudgets.AttachedFile = Backbone.Model.extend( {
</ins><span class="cx" style="display: block; padding: 0 10px">                 defaults: {
</span><span class="cx" style="display: block; padding: 0 10px">                        'ID':          0,
</span><span class="cx" style="display: block; padding: 0 10px">                        'post_parent': 0,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,14 +15,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /*
</span><span class="cx" style="display: block; padding: 0 10px">         * Collection of attached files
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $.wordcampPayments.AttachedFiles = Backbone.Collection.extend( {
-               model: $.wordcampPayments.AttachedFile
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $.wordcampBudgets.AttachedFiles = Backbone.Collection.extend( {
+               model: $.wordcampBudgets.AttachedFile
</ins><span class="cx" style="display: block; padding: 0 10px">         } );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /*
</span><span class="cx" style="display: block; padding: 0 10px">         * View for a single attached file
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $.wordcampPayments.AttachedFileView = Backbone.View.extend( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $.wordcampBudgets.AttachedFileView = Backbone.View.extend( {
</ins><span class="cx" style="display: block; padding: 0 10px">                 tagName: 'li',
</span><span class="cx" style="display: block; padding: 0 10px">                template: wp.template( 'wcp-attached-file' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,13 +39,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">        /*
</span><span class="cx" style="display: block; padding: 0 10px">         * View for a collection of attached files
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $.wordcampPayments.AttachedFilesView = Backbone.View.extend( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $.wordcampBudgets.AttachedFilesView = Backbone.View.extend( {
</ins><span class="cx" style="display: block; padding: 0 10px">                 el: $( '#wcp_files' ),
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                initialize: function() {
</span><span class="cx" style="display: block; padding: 0 10px">                        _.bindAll( this, 'render', 'appendFile' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        this.collection = new $.wordcampPayments.AttachedFiles( wcpAttachedFiles );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 this.collection = new $.wordcampBudgets.AttachedFiles( wcpAttachedFiles );
</ins><span class="cx" style="display: block; padding: 0 10px">                         this.collection.bind( 'add', this.appendFile );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        this.render();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -61,7 +61,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                appendFile: function( file ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var noFilesUploaded  = $( '.wcp_no_files_uploaded' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        var attachedFileView = new $.wordcampPayments.AttachedFileView( { model: file } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 var attachedFileView = new $.wordcampBudgets.AttachedFileView( { model: file } );
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        $( '.wcp_files_list' ).append( attachedFileView.render().el );
</span><span class="cx" style="display: block; padding: 0 10px">                        noFilesUploaded.removeClass( 'active' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -78,7 +78,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 *
</span><span class="cx" style="display: block; padding: 0 10px">                 * Files that are already attached to other posts are ignored.
</span><span class="cx" style="display: block; padding: 0 10px">                 *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                 * @param {wordcampPayments.AttachedFile} file
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+          * @param {wordcampBudgets.AttachedFile} file
</ins><span class="cx" style="display: block; padding: 0 10px">                  */
</span><span class="cx" style="display: block; padding: 0 10px">                attachExistingFile: function( file ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        var fileIDsToAttach,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,6 +97,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px">        } );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        $.wordcampPayments.attachedFilesView = new $.wordcampPayments.AttachedFilesView();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $.wordcampBudgets.attachedFilesView = new $.wordcampBudgets.AttachedFilesView();
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptwordcampbudgetsjsfromrev2255sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptwordcamppaymentsjs"></a>
<div class="copfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Copied: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-budgets.js (from rev 2255, sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-payments.js)</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-budgets.js                          (rev 0)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-budgets.js    2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -0,0 +1,130 @@
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+jQuery( document ).ready( function( $ ) {
+
+       $.wordcampBudgets = {
+
+               /**
+                * Main entry point
+                */
+               init: function () {
+                       $.wordcampBudgets.registerEventHandlers();
+                       $.wordcampBudgets.setupDatePicker();
+               },
+
+               /**
+                * Registers event handlers
+                */
+               registerEventHandlers : function() {
+                       $( '#wcp_payment_details' ).find( 'input[name=payment_method]' ).change( $.wordcampBudgets.togglePaymentMethodFields );
+                       $( '#payment_category' ).change( $.wordcampBudgets.toggleOtherCategoryDescription );
+                       $( '#wcp_files' ).find( 'a.wcp-insert-media' ).click( $.wordcampBudgets.showUploadModal );
+                       $( '#wcp_mark_incomplete_checkbox' ).click( $.wordcampBudgets.requireNotes );
+               },
+
+               /**
+                * Toggle the payment method fields based on which method is selected
+                *
+                * @param {object} event
+                */
+               togglePaymentMethodFields : function( event ) {
+                       var active_fields_container = '#' + $( this ).attr( 'id' ) + '_fields';
+                       var payment_method_fields   = '.payment_method_fields';
+
+                       $( payment_method_fields   ).removeClass( 'active' );
+                       $( payment_method_fields   ).addClass( 'hidden' );
+                       $( active_fields_container ).removeClass( 'hidden' );
+                       $( active_fields_container ).addClass( 'active' );
+
+                       // todo make the transition smoother
+               },
+
+               /**
+                * Example event handler
+                *
+                * @param {object} event
+                */
+               toggleOtherCategoryDescription : function( event ) {
+                       var otherCategoryDescription = $( '#row-other-category-explanation' );
+
+                       if ( 'other' == $( this ).find( 'option:selected' ).val() ) {
+                               $( otherCategoryDescription ).removeClass( 'hidden' );
+                       } else {
+                               $( otherCategoryDescription ).addClass( 'hidden' );
+                       }
+
+                       // todo make the transition smoother
+               },
+
+               /**
+                * Initialize Core's Media Picker
+                *
+                * @param {object} event
+                */
+               showUploadModal : function( event ) {
+                       if ( 'undefined' == typeof $.wordcampBudgets.fileUploadFrame ) {
+                               // Create the frame
+                               $.wordcampBudgets.fileUploadFrame = wp.media( {
+                                       title: wcpLocalizedStrings.uploadModalTitle,
+                                       multiple: true,
+                                       button: {
+                                               text: wcpLocalizedStrings.uploadModalButton
+                                       }
+                               } );
+
+                               // Add models to the collection for each selected attachment
+                               $.wordcampBudgets.fileUploadFrame.on( 'select', $.wordcampBudgets.addSelectedFilesToCollection );
+                       }
+
+                       $.wordcampBudgets.fileUploadFrame.open();
+                       return false;
+               },
+
+               /**
+                * Add files selected from the Media Picker to the current collection of files
+                */
+               addSelectedFilesToCollection : function() {
+                       var attachments = $.wordcampBudgets.fileUploadFrame.state().get( 'selection' ).toJSON();
+
+                       $.each( attachments, function( index, attachment ) {
+                               var newFile = new $.wordcampBudgets.AttachedFile( {
+                                       'ID':          attachment.id,
+                                       'post_parent': attachment.uploadedTo,
+                                       'filename':    attachment.filename,
+                                       'url':         attachment.url
+                               } );
+
+                               $.wordcampBudgets.attachedFilesView.collection.add( newFile );
+                       } );
+               },
+
+               /**
+                * Fallback to the jQueryUI datepicker if the browser doesn't support <input type="date">
+                */
+               setupDatePicker : function() {
+                       var browserTest = document.createElement( 'input' );
+                       browserTest.setAttribute( 'type', 'date' );
+
+                       if ( 'text' === browserTest.type ) {
+                               $( '#wcp_general_info' ).find( 'input[type=date]' ).not( '[readonly="readonly"]' ).datepicker( {
+                                       dateFormat : 'yy-mm-dd',
+                                       changeMonth: true,
+                                       changeYear : true
+                               } );
+                       }
+               },
+
+               /**
+                * Require notes when the request is being marked as incomplete
+                */
+               requireNotes : function() {
+                       var notes = $( '#wcp_mark_incomplete_notes' );
+
+                       if ( 'checked' === $( '#wcp_mark_incomplete_checkbox' ).attr( 'checked' ) ) {
+                               notes.attr( 'required', true );
+                       } else {
+                               notes.attr( 'required', false );
+                       }
+               }
+       };
+
+       $.wordcampBudgets.init();
+} );
</ins></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsjavascriptwordcamppaymentsjs"></a>
<div class="delfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Deleted: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-payments.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-payments.js 2016-01-11 21:54:51 UTC (rev 2271)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/javascript/wordcamp-payments.js   2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1,130 +0,0 @@
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-jQuery( document ).ready( function( $ ) {
-
-       $.wordcampPayments = {
-
-               /**
-                * Main entry point
-                */
-               init: function () {
-                       $.wordcampPayments.registerEventHandlers();
-                       $.wordcampPayments.setupDatePicker();
-               },
-
-               /**
-                * Registers event handlers
-                */
-               registerEventHandlers : function() {
-                       $( '#wcp_payment_details' ).find( 'input[name=payment_method]' ).change( $.wordcampPayments.togglePaymentMethodFields );
-                       $( '#payment_category' ).change( $.wordcampPayments.toggleOtherCategoryDescription );
-                       $( '#wcp_files' ).find( 'a.wcp-insert-media' ).click( $.wordcampPayments.showUploadModal );
-                       $( '#wcp_mark_incomplete_checkbox' ).click( $.wordcampPayments.requireNotes );
-               },
-
-               /**
-                * Toggle the payment method fields based on which method is selected
-                *
-                * @param {object} event
-                */
-               togglePaymentMethodFields : function( event ) {
-                       var active_fields_container = '#' + $( this ).attr( 'id' ) + '_fields';
-                       var payment_method_fields   = '.payment_method_fields';
-
-                       $( payment_method_fields   ).removeClass( 'active' );
-                       $( payment_method_fields   ).addClass( 'hidden' );
-                       $( active_fields_container ).removeClass( 'hidden' );
-                       $( active_fields_container ).addClass( 'active' );
-
-                       // todo make the transition smoother
-               },
-
-               /**
-                * Example event handler
-                *
-                * @param {object} event
-                */
-               toggleOtherCategoryDescription : function( event ) {
-                       var otherCategoryDescription = $( '#row-other-category-explanation' );
-
-                       if ( 'other' == $( this ).find( 'option:selected' ).val() ) {
-                               $( otherCategoryDescription ).removeClass( 'hidden' );
-                       } else {
-                               $( otherCategoryDescription ).addClass( 'hidden' );
-                       }
-
-                       // todo make the transition smoother
-               },
-
-               /**
-                * Initialize Core's Media Picker
-                *
-                * @param {object} event
-                */
-               showUploadModal : function( event ) {
-                       if ( 'undefined' == typeof $.wordcampPayments.fileUploadFrame ) {
-                               // Create the frame
-                               $.wordcampPayments.fileUploadFrame = wp.media( {
-                                       title: wcpLocalizedStrings.uploadModalTitle,
-                                       multiple: true,
-                                       button: {
-                                               text: wcpLocalizedStrings.uploadModalButton
-                                       }
-                               } );
-
-                               // Add models to the collection for each selected attachment
-                               $.wordcampPayments.fileUploadFrame.on( 'select', $.wordcampPayments.addSelectedFilesToCollection );
-                       }
-
-                       $.wordcampPayments.fileUploadFrame.open();
-                       return false;
-               },
-
-               /**
-                * Add files selected from the Media Picker to the current collection of files
-                */
-               addSelectedFilesToCollection : function() {
-                       var attachments = $.wordcampPayments.fileUploadFrame.state().get( 'selection' ).toJSON();
-
-                       $.each( attachments, function( index, attachment ) {
-                               var newFile = new $.wordcampPayments.AttachedFile( {
-                                       'ID':          attachment.id,
-                                       'post_parent': attachment.uploadedTo,
-                                       'filename':    attachment.filename,
-                                       'url':         attachment.url
-                               } );
-
-                               $.wordcampPayments.attachedFilesView.collection.add( newFile );
-                       } );
-               },
-
-               /**
-                * Fallback to the jQueryUI datepicker if the browser doesn't support <input type="date">
-                */
-               setupDatePicker : function() {
-                       var browserTest = document.createElement( 'input' );
-                       browserTest.setAttribute( 'type', 'date' );
-
-                       if ( 'text' === browserTest.type ) {
-                               $( '#wcp_general_info' ).find( 'input[type=date]' ).not( '[readonly="readonly"]' ).datepicker( {
-                                       dateFormat : 'yy-mm-dd',
-                                       changeMonth: true,
-                                       changeYear : true
-                               } );
-                       }
-               },
-
-               /**
-                * Require notes when the request is being marked as incomplete
-                */
-               requireNotes : function() {
-                       var notes = $( '#wcp_mark_incomplete_notes' );
-
-                       if ( 'checked' === $( '#wcp_mark_incomplete_checkbox' ).attr( 'checked' ) ) {
-                               notes.attr( 'required', true );
-                       } else {
-                               notes.attr( 'required', false );
-                       }
-               }
-       };
-
-       $.wordcampPayments.init();
-} );
</del></span></pre></div>
<a id="sitestrunkwordcamporgpublic_htmlwpcontentpluginswordcamppaymentsviewspaymentrequestinputfilesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/input-files.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/input-files.php   2016-01-11 21:54:51 UTC (rev 2271)
+++ sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/views/payment-request/input-files.php     2016-01-11 22:15:37 UTC (rev 2272)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -26,6 +26,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        <a href="{{ data.url }}">{{ data.filename }}</a>
</span><span class="cx" style="display: block; padding: 0 10px">                </script>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                <?php wp_localize_script( 'wcp-attached-files', 'wcpAttachedFiles', $files ); // todo merge into wordcampPayments var ?>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         <?php wp_localize_script( 'wcp-attached-files', 'wcpAttachedFiles', $files ); // todo merge into wordcampBudgets var ?>
</ins><span class="cx" style="display: block; padding: 0 10px">         </td>
</span><span class="cx" style="display: block; padding: 0 10px"> </tr>
</span></span></pre>
</div>
</div>

</body>
</html>