Skip to content

Commit ab7a103

Browse files
committed
(mostly automatic) cleanup
* reformatting * visibility declarations * removal of manual imports * replacement of deprecated calls Should fix #162
1 parent f303788 commit ab7a103

File tree

8 files changed

+654
-304
lines changed

8 files changed

+654
-304
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.* export-ignore
2+
/_test export-ignore

LICENSE

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

all.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
font-size: 15px;
2323
line-height: 1.5em;
2424
}
25+
2526
div.caption {
2627
font-size: 13px;
2728
line-height: 1.5em;
2829
}
30+
2931
padding: 10px;
3032
}

conf/default.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
* @author Dmitry Baikov <dsbaikov@gmail.com>
66
*/
77

8-
$conf['thumbnail_width'] = 120;
8+
$conf['thumbnail_width'] = 120;
99
$conf['thumbnail_height'] = 120;
10-
$conf['image_width'] = 800;
11-
$conf['image_height'] = 600;
12-
$conf['cols'] = 5;
10+
$conf['image_width'] = 800;
11+
$conf['image_height'] = 600;
12+
$conf['cols'] = 5;
1313

1414
$conf['sort'] = 'file';
1515
$conf['options'] = 'cache';

conf/metadata.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* @author Dmitry Baikov <dsbaikov@gmail.com>
66
*/
77

8-
$meta['thumbnail_width'] = array('numeric');
8+
$meta['thumbnail_width'] = array('numeric');
99
$meta['thumbnail_height'] = array('numeric');
10-
$meta['image_width'] = array('numeric');
11-
$meta['image_height'] = array('numeric');
12-
$meta['cols'] = array('numeric');
10+
$meta['image_width'] = array('numeric');
11+
$meta['image_height'] = array('numeric');
12+
$meta['cols'] = array('numeric');
1313

14-
$meta['sort'] = array('multichoice', '_choices' => array('file','mod','date','title'));
15-
$meta['options'] = array('multicheckbox', '_choices' => array('cache','crop','direct','lightbox','random','reverse','showname','showtitle'));
14+
$meta['sort'] = array('multichoice', '_choices' => array('file', 'mod', 'date', 'title'));
15+
$meta['options'] = array('multicheckbox', '_choices' => array('cache', 'crop', 'direct', 'lightbox', 'random', 'reverse', 'showname', 'showtitle'));
1616

screen.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
div.dokuwiki div.gallery table {
22
border: none;
33
}
4+
45
div.dokuwiki div.gallery table td {
56
padding: 1em;
67
text-align: center;

script/prosemirror.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
1414
marks: '',
1515
attrs: jQuery.extend(
1616
{
17-
renderedHTML: { default: null },
17+
renderedHTML: {default: null},
1818
},
1919
JSINFO.plugins.gallery.defaults
2020
),
2121
group: 'protected_block', // may go into a block quote or list, but not into a table
2222
});
2323

24-
return { nodes: nodes, marks: marks };
24+
return {nodes: nodes, marks: marks};
2525
}
26+
2627
window.Prosemirror.pluginSchemas.push(addGallerySchema);
2728

2829
/**
@@ -295,6 +296,7 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
295296
);
296297
AbstractNodeView.call(this, node, outerview, getPos);
297298
}
299+
298300
GalleryNodeView.prototype = Object.create(AbstractNodeView.prototype);
299301
GalleryNodeView.prototype.constructor = GalleryNodeView;
300302

@@ -309,7 +311,7 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
309311
var thisView = this;
310312
if (!this.dom) {
311313
this.dom = document.createElement('div');
312-
var $settingsButton = jQuery('<button>', { type: 'button', class: 'settings' }).text('settings');
314+
var $settingsButton = jQuery('<button>', {type: 'button', class: 'settings'}).text('settings');
313315
$settingsButton.on('click', function () {
314316
thisView.form.show();
315317
});
@@ -359,6 +361,7 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
359361

360362
return new GalleryNodeView(node, outerview, getPos);
361363
}
364+
362365
window.Prosemirror.pluginNodeViews.dwplugin_gallery = dwplugin_gallery;
363366

364367
/**
@@ -375,7 +378,7 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
375378
};
376379
this.getMenuItem = function (schema) {
377380
return new window.Prosemirror.classes.MenuItem({
378-
command: function(state, dispatch) {
381+
command: function (state, dispatch) {
379382
var isAllowed = window.Prosemirror.commands.setBlockTypeNoAttrCheck(schema.nodes.dwplugin_gallery)(state);
380383
if (!isAllowed) {
381384
return false;
@@ -418,5 +421,6 @@ jQuery(document).on('PROSEMIRROR_API_INITIALIZED', function () {
418421
});
419422
};
420423
}
424+
421425
window.Prosemirror.pluginMenuItemDispatchers.push(new GalleryMenuItemDispatcher());
422426
});

0 commit comments

Comments
 (0)