This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
univcloud/univcloud/templates/apps/add.html

63 lines
1.6 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div id="{{ app_id }}" class="add-app">
Nouvelle application :
<br/><br/>
<select>
<option>---</option>
<option value="clock">Horloge</option>
<option value="launcher">Lanceur</option>
<option value="weather">Météo</option>
<option value="feed">RSS</option>
</select>
<div id="dialog-confirm" title="Ajouter une application" style="display: none">
<p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
Cela ajoutera une application <span class="appname"></span> à votre portail.</p>
<form id="form-feed">
<label>URL</label>
<input name="feed_url"/>
</form>
<form id="form-launcher">
<label>Libellé</label>
<input name="label"/><br/>
<label>URL</label>
<input name="url"/>
</form>
<form id="form-weather">
<label>Lieu</label>
<select name="location"><option>Paris</option></select>
</form>
</div>
<script>
$(function(){ //DOM Ready
$('#{{app_id}} select').change(
function() {
var appid = $(this).val();
$('#dialog-confirm form').hide();
$('#dialog-confirm form#form-' + appid).show();
$('#dialog-confirm span.appname').text($(this).find(':selected').text());
$("#dialog-confirm").dialog({
resizable: false,
modal: true,
width: '30em',
buttons: {
"Ajouter": function() {
window.location = window.location + 'add/' + appid + '?' + $('#dialog-confirm form#form-' + appid).serialize();
$( this ).dialog( "close" );
},
"Annuler": function() {
$( this ).dialog( "close" );
}
}
});
}
);
});
</script>
</div>