refs #30 add metadata field 'track name' loaded from metadata>name; make metadata hidden by default
parent
f8a18cc788
commit
1f6bdfb4f3
|
@ -792,27 +792,17 @@ h2.popupTitle{
|
|||
color: red;
|
||||
}
|
||||
|
||||
#saveButton {
|
||||
#saveButton, #saveName {
|
||||
width: 100%;
|
||||
}
|
||||
#loadButton i, #loadFolderButton i{
|
||||
color: blue;
|
||||
}
|
||||
#saveNameLabel, #savePathLabel{
|
||||
float:left;
|
||||
}
|
||||
#saveName, #savePath{
|
||||
width: 100%;
|
||||
float: right;
|
||||
}
|
||||
#savePath{
|
||||
background-color: #C9C9C9;
|
||||
}
|
||||
.selectimg{
|
||||
background: url('images/symbols/geocache-open.png') no-repeat right 8px center rgba(240, 240, 240, 0.90);
|
||||
background-size: 20px 20px;
|
||||
}
|
||||
#linktextinput, #linkurlinput {
|
||||
#linktextinput, #linkurlinput, #tracknameinput {
|
||||
width: 100%;
|
||||
}
|
||||
#desctext{
|
||||
|
@ -904,3 +894,14 @@ div#ho button {
|
|||
.customtiletitle {
|
||||
cursor: pointer;
|
||||
}
|
||||
#metadata {
|
||||
display: none;
|
||||
}
|
||||
#metadatalabel {
|
||||
width: 100%;
|
||||
height: 25px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background-color: #F7F7F7;
|
||||
border: solid 1px lightgrey;
|
||||
}
|
||||
|
|
|
@ -606,6 +606,10 @@
|
|||
' http://www.garmin.com/xmlschemas/TrackPointExtension/v1' +
|
||||
' http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd">\n';
|
||||
gpxText = gpxText + '<metadata>\n <time>' + now_utc_str + '</time>\n';
|
||||
var trackName = $('#tracknameinput').val();
|
||||
if (trackName) {
|
||||
gpxText = gpxText + ' <name>' + trackName + '</name>\n';
|
||||
}
|
||||
var fileDesc = $('#desctext').val();
|
||||
if (fileDesc) {
|
||||
gpxText = gpxText + ' <desc>' + fileDesc + '</desc>\n';
|
||||
|
@ -847,6 +851,8 @@
|
|||
var parseddom = $.parseXML(xml);
|
||||
var dom = $(parseddom);
|
||||
|
||||
var trackName = dom.find('gpx>metadata>name').text();
|
||||
$('#tracknameinput').val(trackName);
|
||||
var fileDesc = dom.find('gpx>metadata>desc').text();
|
||||
$('#desctext').val(fileDesc);
|
||||
var linktext = dom.find('gpx>metadata>link>text').html();
|
||||
|
@ -1735,6 +1741,17 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('body').on('click','#metadatalabel', function(e) {
|
||||
if ($('div#metadata').is(':visible')) {
|
||||
$('#metadata').slideUp();
|
||||
$(this).find('i').removeClass('fa-angle-double-up').addClass('fa-angle-double-down');
|
||||
}
|
||||
else{
|
||||
$('div#metadata').slideDown();
|
||||
$(this).find('i').removeClass('fa-angle-double-down').addClass('fa-angle-double-up');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, OC);
|
||||
|
|
|
@ -69,6 +69,8 @@
|
|||
"Transparent" : "Transparent",
|
||||
"Link URL (optional)" : "URL du lien (facultatif)",
|
||||
"Link text (optional)" : "Texte du lien (facultatif)",
|
||||
"Track name (optional)" : "Nom de la trace (facultatif)",
|
||||
"Metadata" : "Métadonnées",
|
||||
"Upload new symbol image" : "Téléverser une nouvelle image de symbole"
|
||||
},"pluralForm" :"nplurals=2; plural=(n > 1);"
|
||||
}
|
||||
|
|
|
@ -31,20 +31,23 @@
|
|||
<option value=".csv">csv</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
<hr/>
|
||||
<h2 id="savetitle"><?php p($l->t('Save'));?></h2>
|
||||
<div>
|
||||
<label id="saveNameLabel"><?php p($l->t('File name'));?> :</label><br/>
|
||||
<label id="saveNameLabel"><?php p($l->t('File name'));?> :</label>
|
||||
<input id="saveName" type="text"></input>
|
||||
</div>
|
||||
<div style="clear:both"></div>
|
||||
<label><?php p($l->t('Description (optional)'));?> :</label><br/>
|
||||
<textarea id="desctext"></textarea>
|
||||
<label><?php p($l->t('Link text (optional)'));?> :</label><br/>
|
||||
<input id="linktextinput"/><br/>
|
||||
<label><?php p($l->t('Link URL (optional)'));?> :</label><br/>
|
||||
<input id="linkurlinput"/>
|
||||
<p id="metadatalabel"><b><?php p($l->t('Metadata'));?> </b> <i class="fa fa-angle-double-down"></i></p>
|
||||
<div id="metadata">
|
||||
<label><?php p($l->t('Track name (optional)'));?> :</label><br/>
|
||||
<input id="tracknameinput"/><br/>
|
||||
<label><?php p($l->t('Description (optional)'));?> :</label><br/>
|
||||
<textarea id="desctext"></textarea>
|
||||
<label><?php p($l->t('Link text (optional)'));?> :</label><br/>
|
||||
<input id="linktextinput"/><br/>
|
||||
<label><?php p($l->t('Link URL (optional)'));?> :</label><br/>
|
||||
<input id="linkurlinput"/>
|
||||
</div>
|
||||
<button id="saveButton"><i class="fa fa-save"></i> <?php p($l->t('Choose directory and save'));?></button>
|
||||
<div style="clear:both"></div>
|
||||
<hr/>
|
||||
|
|
Loading…
Reference in New Issue