Skip to content

Commit 72b392b

Browse files
committed
use summary
1 parent f5c244e commit 72b392b

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

action.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ protected function sync_file() {
4747
$INPUT->int('type'),
4848
$INPUT->filter('cleanID')->str('id'),
4949
$INPUT->int('dir'),
50-
'FIXME'
50+
$INPUT->str('sum')
5151
);
5252

5353
return true;

sync.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)