diff --git a/CHANGELOG.md b/CHANGELOG.md index 76bc566..95931f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### TODO +- check if name is valid in admin settings +- explain things in admin settings +- compat jpg ### Added - file description field - 'destination' readonly field indicating full save path diff --git a/controller/utilscontroller.php b/controller/utilscontroller.php index 817b789..fc86461 100644 --- a/controller/utilscontroller.php +++ b/controller/utilscontroller.php @@ -153,7 +153,6 @@ class UtilsController extends Controller { Http::STATUS_UNPROCESSABLE_ENTITY ); } - $name = ''; if(!empty($newSymbol)) { $filepath = $this->config->getSystemValue('datadirectory').'/gpxedit/symbols/'.$filename.'.png'; $content = file_get_contents($newSymbol['tmp_name']); diff --git a/css/admin.css b/css/admin.css index b67e255..40d4f44 100644 --- a/css/admin.css +++ b/css/admin.css @@ -2,6 +2,9 @@ button#addExtraSymbol{ width: 33px; height: 33px; } +table#extraSymbolsTable td{ + text-align: center !important; +} .extraSymbol img{ width: 25px; height: 25px; diff --git a/js/admin.js b/js/admin.js index 6db1628..9cf933f 100644 --- a/js/admin.js +++ b/js/admin.js @@ -2,42 +2,15 @@ if (!OCA.GpxEdit) { OCA.GpxEdit = {}; } - - OCA.GpxEdit.Admin = { - initialize: function() { - $('#submitMaxUpload').on('click', _.bind(this._onClickSubmitMaxUpload, this)); - }, - - _onClickSubmitMaxUpload: function () { - OC.msg.startSaving('#maxUploadSizeSettingsMsg'); - - var request = $.ajax({ - url: OC.generateUrl('/apps/files/settings/maxUpload'), - type: 'POST', - data: { - maxUploadSize: $('#maxUploadSize').val() - } - }); - - request.done(function (data) { - $('#maxUploadSize').val(data.maxUploadSize); - OC.msg.finishedSuccess('#maxUploadSizeSettingsMsg', 'Saved'); - }); - - request.fail(function () { - OC.msg.finishedError('#maxUploadSizeSettingsMsg', 'Error'); - }); - } - } })(); function addLogoLine(name){ var url = OC.generateUrl('/apps/gpxedit/getExtraSymbol?'); var fullurl = url+'name='+encodeURI(name); var nameWe = name.replace(/\.png$/, ''); - $('div#extraSymbols').append('
'+ - ''+ - '
'); + $('div#extraSymbols table').append(''; echo ''; + echo '"/> | '; echo ''; + echo ' | '; echo ''; - echo ''; + echo ' | '; } ?> +