highlight selected save folder, design epuration

merge-requests/1/head
Julien Veyssier 2016-12-02 10:51:27 +01:00
parent ef57d3bf80
commit 69e3ca746e
3 changed files with 51 additions and 42 deletions

View File

@ -34,6 +34,12 @@ div.durationcol{
margin-right: 2px; margin-right: 2px;
} }
div#logofolder{
margin-left: auto;
margin-right: auto;
width: 100px;
}
div#logo, div#logo img { div#logo, div#logo img {
height:80px; height:80px;
} }
@ -93,7 +99,7 @@ div#logo {
max-width:200px; max-width:200px;
} }
#titlechoosedirform, #logo, #optioncheckdiv, #computecheckdiv{ #titlechoosedirform, #optioncheckdiv, #computecheckdiv{
float:left; float:left;
display:block; display:block;
} }
@ -104,9 +110,6 @@ div#logo {
#scantypediv{ #scantypediv{
float:right; float:right;
} }
#logo {
max-width:40%;
}
#optionbuttonsdiv{ #optionbuttonsdiv{
border-left:solid 1px; border-left:solid 1px;
@ -487,3 +490,12 @@ input[type=checkbox]
color: blue !important; color: blue !important;
font-weight: bold !important; font-weight: bold !important;
} }
h2#loadtitle, h2#savetitle{
text-align:center;
cursor: pointer;
}
#clearButton{
margin-left: auto;
margin-right: auto;
display:block;
}

View File

@ -433,12 +433,13 @@ function checkKey(e){
function showSaveSuccessAnimation(path){ function showSaveSuccessAnimation(path){
$('#saved').find('b#content').html('File successfully saved as<br/>'+path); $('#saved').find('b#content').html('File successfully saved as<br/>'+path);
$('#saved').show(); //$('#saved').show();
$('#saved').fadeIn();
setTimeout(hideSaveSuccessAnimation, 4000); setTimeout(hideSaveSuccessAnimation, 4000);
} }
function hideSaveSuccessAnimation(){ function hideSaveSuccessAnimation(){
$('#saved').hide(); $('#saved').fadeOut();
} }
function loadFile(file){ function loadFile(file){
@ -538,6 +539,28 @@ $(document).ready(function(){
data.li.find('>a').removeClass('selectedFolder'); data.li.find('>a').removeClass('selectedFolder');
}); });
$('body').on('click','h2#loadtitle', function(e) {
if ($('#loaddiv').is(':visible')){
$('#loaddiv').slideUp();
$('#loadoptiontoggle').html('<i class="fa fa-expand"></i>');
}
else{
$('#loaddiv').slideDown();
$('#loadoptiontoggle').html('<i class="fa fa-compress"></i>');
}
});
$('body').on('click','h2#savetitle', function(e) {
if ($('#savediv').is(':visible')){
$('#savediv').slideUp();
$('#saveoptiontoggle').html('<i class="fa fa-expand"></i>');
}
else{
$('#savediv').slideDown();
$('#saveoptiontoggle').html('<i class="fa fa-compress"></i>');
}
});
}); });
})(jQuery, OC); })(jQuery, OC);

View File

@ -19,50 +19,24 @@ p($_['gpxedit_version']);
</p> </p>
</div> </div>
</div> </div>
<div id="folderdiv">
<label for="subfolderselect"><?php p($l->t('Folder')); ?> :</label>
<select name="subfolder" id="subfolderselect">
<option style="color:red; font-weight:bold"><?php p($l->t('Choose a folder')); ?></option>
<?php
// populate select options
if (count($_['dirs']) > 0){
foreach($_['dirs'] as $dir){
echo '<option>';
p($dir);
echo '</option>'."\n";
}
}
?>
</select>
</div>
<?php
if (count($_['dirs']) === 0){
echo '<p id="nofolder">';
p($l->t('No gpx file found'));
echo '</p><p id="nofoldertext">';
p($l->t('You should have at least one gpx/kml/tcx file in your files'));
echo '.</p>';
}
?>
</div> </div>
<div style="clear:both"></div> <div style="clear:both"></div>
</form> </form>
<hr/> <hr/>
<h2>Load file :</h2> <h2 id="loadtitle">Load <b id="loadoptiontoggle"><i class="fa fa-expand"></i></b></h2>
<div id="loadtree"></div> <div id="loaddiv" style="display:none;">
<div id="loadtree"></div>
</div>
<hr/> <hr/>
<h2>Save to :</h2> <h2 id="savetitle">Save <b id="saveoptiontoggle"><i class="fa fa-expand"></i></b></h2>
<div id="savetree"></div> <div id="savediv" style="display:none;">
<input id="saveName"></input> <div id="savetree"></div>
<button id="saveButton">Save</button> <input id="saveName"></input>
<button id="saveButton">Save</button>
</div>
<div style="clear:both"></div> <div style="clear:both"></div>
<hr/> <hr/>
<button id="clearButton">Clear map</button> <button id="clearButton">Clear map</button>
<hr/>
<div id="saved"><p> <div id="saved"><p>
<i class="fa fa-save fa-spin fa-3x fa-fw"></i> <i class="fa fa-save fa-spin fa-3x fa-fw"></i>
<b id="content"><?php p($l->t('File saved')); ?></b></p> <b id="content"><?php p($l->t('File saved')); ?></b></p>