Merge pull request #235 from Phyks/custom-profiles

First PoC for UI for customizing profile
This commit is contained in:
Norbert Renner 2019-11-09 09:47:32 +01:00 committed by GitHub
commit ef9cc7abe7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 290 additions and 41 deletions

View file

@ -559,8 +559,8 @@
<a
href="#tab_profile"
role="tab"
data-i18n="[title]sidebar.custom-profile.title"
title="Custom profile"
data-i18n="[title]sidebar.customize-profile.title"
title="Customize profile"
><i class="fa fa-wrench"></i
></a>
</li>
@ -648,39 +648,60 @@
<h1 class="leaflet-sidebar-header">
<span class="leaflet-sidebar-close"><i class="fa fa-caret-right"></i></span
><span class="leaflet-sidebar-expand"><i class="fa fa-expand"></i></span
><span data-i18n="sidebar.custom-profile.title">Custom profile</span>
><span data-i18n="sidebar.customize-profile.title">Customize profile</span>
</h1>
<form class="flexcolumn flexgrow">
<textarea
class="form-control flexgrow"
id="profile_upload"
spellcheck="false"
wrap="off"
data-i18n="[placeholder]sidebar.profile.placeholder"
placeholder="Write your custom profile here."
></textarea>
<div id="profile_message"></div>
<div class="form-group" id="profile_buttons">
<button
id="upload"
type="button"
class="btn btn-primary btn-sm"
data-uploading-text="Uploading…"
>
<span class="fa fa-cloud-upload"></span>
<span data-i18n="sidebar.profile.upload">Upload</span>
</button>
<button id="clear" type="button" class="btn btn-secondary btn-sm">
<span class="fa fa-eraser"></span>
<span data-i18n="sidebar.profile.clear">Clear</span>
</button>
<a
href="https://brouter.de/brouter/costfunctions.html"
target="_blank"
class="btn btn-info btn-sm pull-right"
><span class="fa fa-question"></span>
<span data-i18n="sidebar.profile.help">Help</span></a
>
<div id="profile_params_container">
<div id="profile_params"></div>
<div class="form-group" id="profile_buttons">
<button type="button" class="btn btn-info btn-sm" id="profile_advanced">
<span data-i18n="sidebar.profile.switch_advanced"
>Switch to advanced editor</span
>
</button>
<button id="save" type="button" class="btn btn-primary btn-sm pull-right">
<span class="fa fa-cloud-upload"></span>
<span data-i18n="sidebar.profile.save">Save</span>
</button>
</div>
</div>
<div id="profile_editor" class="flexcolumn flexgrow">
<textarea
class="form-control flexgrow"
id="profile_upload"
spellcheck="false"
wrap="off"
data-i18n="[placeholder]sidebar.profile.placeholder"
placeholder="Write your custom profile here."
></textarea>
<div id="profile_message"></div>
<div class="form-group" id="profile_buttons">
<button
id="upload"
type="button"
class="btn btn-primary btn-sm"
data-uploading-text="Uploading…"
>
<span class="fa fa-cloud-upload"></span>
<span data-i18n="sidebar.profile.upload">Upload</span>
</button>
<button id="clear" type="button" class="btn btn-secondary btn-sm">
<span class="fa fa-eraser"></span>
<span data-i18n="sidebar.profile.clear">Clear</span>
</button>
<a
href="https://brouter.de/brouter/costfunctions.html"
target="_blank"
class="btn btn-info btn-sm pull-right"
><span class="fa fa-question"></span>
<span data-i18n="sidebar.profile.help">Help</span></a
>
<button type="button" class="btn btn-info btn-sm" id="profile_basic">
<span data-i18n="sidebar.profile.switch_basic">Switch to basic editor</span>
</button>
</div>
</div>
</form>
</div>