@@ -5,6 +5,7 @@ jQuery(function () {
55 var $output = jQuery ( '#sync__plugin' ) ;
66 var $progress = jQuery ( '#sync__progress' ) . progressbar ( { value : false } ) ;
77 var $progress_label = $progress . find ( '.label' ) ;
8+ var $sum ;
89
910 /**
1011 * Show the table of items to sync
@@ -33,7 +34,7 @@ jQuery(function () {
3334
3435 var $lbl = jQuery ( '<label>' ) ;
3536 $lbl . text ( LANG . plugins . sync . summary + ': ' ) ;
36- var $sum = jQuery ( '<input>' ) ;
37+ $sum = jQuery ( '<input>' ) ;
3738 $sum . attr ( 'type' , 'text' ) ;
3839 $sum . addClass ( 'edit' ) ;
3940 $lbl . append ( $sum ) ;
@@ -96,7 +97,7 @@ jQuery(function () {
9697
9798 $tr . find ( '.dir' ) . append ( dir ( item ) ) ;
9899
99- if ( type === '1' ) {
100+ if ( type === 1 ) {
100101 var url = DOKU_BASE + 'lib/plugins/sync/diff.php?no=' + SYNC_DATA . profile + '&id=' + encodeURIComponent ( id ) ;
101102 var a = jQuery ( '<a>' ) ;
102103 a . attr ( 'href' , url ) ;
@@ -109,7 +110,11 @@ jQuery(function () {
109110 return $tr ;
110111 }
111112
112-
113+ /**
114+ * Open a diff in a popup
115+ *
116+ * @param {Event } e
117+ */
113118 function diffclick ( e ) {
114119 e . preventDefault ( ) ;
115120 e . stopPropagation ( ) ;
@@ -187,6 +192,8 @@ jQuery(function () {
187192 }
188193 } ) ;
189194
195+ SYNC_DATA . summary = $sum . val ( ) ;
196+
190197 $output . html ( '' ) ;
191198 $progress . progressbar ( 'option' , 'value' , 0 ) ;
192199 $progress . progressbar ( 'option' , 'max' , SYNC_DATA . items . length ) ;
@@ -253,7 +260,8 @@ jQuery(function () {
253260 no : SYNC_DATA . profile ,
254261 id : item [ 0 ] ,
255262 type : item [ 1 ] ,
256- dir : item [ 2 ]
263+ dir : item [ 2 ] ,
264+ sum : SYNC_DATA . summary
257265 } ,
258266 complete : sync ,
259267 error : error
0 commit comments