Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Commit

Permalink
fix(upload): clean up redudant settings
Browse files Browse the repository at this point in the history
  • Loading branch information
hypeJunction committed May 8, 2017
1 parent 0fcb25d commit 276a2c3
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 63 deletions.
19 changes: 0 additions & 19 deletions activate.php

This file was deleted.

8 changes: 0 additions & 8 deletions languages/en.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@
'ckeditor:colors' => 'Colors',
'ckeditor:tools' => 'Tools',
'ckeditor:document' => 'Document',
'ckeditor:setting:allow_uploads' => 'Allow file uploads outside of the File plugin flow',
'ckeditor:upload:fail' => 'Upload has failed',
'ckeditor:upload:not_allowed' => 'Uploads have been disabled by the site administrator',
'ckeditor:setting:upload_max_width' => 'Maximum dimension of the uploaded image (in px)',

'ckeditor:browse:assets' => 'Assets',
'ckeditor:browse:uploads' => 'Uploads',
'ckeditor:browse:no_uploads' => 'You have not uploaded any images yet',

'ckeditor:link:target:notset' => 'Default',
'ckeditor:link:target:blank' => 'New Tab',
Expand Down
13 changes: 0 additions & 13 deletions views/default/components/ckeditor/setup.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@

$plugins = ['blockimagepaste' => ['path' => elgg_get_simplecache_url('elgg/ckeditor/blockimagepaste.js')]];

$allow_uploads = 0;
if (ckeditor_addons_is_enabled('Image')) {
$allow_uploads = elgg_get_plugin_setting('allow_uploads', 'ckeditor_addons', 0);
}

if (ckeditor_addons_is_enabled('Tooltip')) {
$config['extraPlugins'][] = 'tooltip';
$plugins['tooltip'] = ['path' => elgg_get_simplecache_url('components/ckeditor/tooltip.js')];
Expand Down Expand Up @@ -75,14 +70,6 @@

custom.toolbar = elgg.is_admin_logged_in() ? <?php echo json_encode($admin_toolbar) ?> : <?php echo json_encode($user_toolbar) ?>;

var allowUploads = <?php echo $allow_uploads ?>;
if (allowUploads) {
custom.filebrowserBrowseUrl = elgg.normalize_url('ckeditor/browse');
custom.filebrowserUploadUrl = elgg.security.addToken(elgg.normalize_url('action/ckeditor/upload'));
custom.filebrowserImageWindowWidth = '640';
custom.filebrowserImageWindowHeight = '480';
}

return $.extend({}, config, custom);
});

Expand Down
24 changes: 1 addition & 23 deletions views/default/plugins/ckeditor_addons/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,26 +63,4 @@
}
?>
</tbody>
</table>
<div>
<label><?php echo elgg_echo('ckeditor:setting:allow_uploads') ?></label>
<?php
echo elgg_view('input/dropdown', array(
'name' => 'params[allow_uploads]',
'value' => $entity->allow_uploads,
'options_values' => array(
0 => elgg_echo('option:no'),
1 => elgg_echo('option:yes')
)
));
?>
</div>
<div>
<label><?php echo elgg_echo('ckeditor:setting:upload_max_width') ?></label>
<?php
echo elgg_view('input/text', array(
'name' => 'params[upload_max_width]',
'value' => $entity->upload_max_width,
));
?>
</div>
</table>

0 comments on commit 276a2c3

Please sign in to comment.