Manager: filearea can now be edited in-place (#116)
This commit is contained in:
parent
b32d4e8f52
commit
edaec866d0
|
@ -516,6 +516,8 @@ function filearea(id) {
|
|||
if(lmtext(id)=='samlServicePrivateKeyEnc'){$('#generatefile').show();}
|
||||
/* If data, then allow to download */
|
||||
if(lmdata(id).length){$('#downloadfile').show();}
|
||||
/* Set switchReadonly text */
|
||||
$('#switchreadonly').text(text4edit);
|
||||
display('filearea',lmtext(id));
|
||||
}
|
||||
function samlAssertion(id) {
|
||||
|
@ -931,3 +933,14 @@ function formateSelect(id,values,selectedValue) {
|
|||
}
|
||||
$('#'+id).empty().append(options);
|
||||
}
|
||||
/* Function to switch readOnly flag */
|
||||
function switchReadonly(selector) {
|
||||
if ( $(selector).attr("readonly") ) {
|
||||
$("#switchreadonly").text(text4protect);
|
||||
$(selector).removeAttr("readonly");
|
||||
} else {
|
||||
$("#switchreadonly").text(text4edit);
|
||||
$(selector).attr("readonly","readonly");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
var text4securedCookie1='<lang en="Secured cookie (HTTPS)" fr="Cookie sécurisé (HTTPS)"/>';
|
||||
var text4securedCookie2='Double cookie (HTTP and HTTPS)';
|
||||
var text4newGeneratedFile='<lang en="Password (optional)" fr="Mot de passe (optionnel)" />';
|
||||
var text4edit='<lang en="Edit" fr="Éditer" />';
|
||||
var text4protect='<lang en="Protect" fr="Protéger" />';
|
||||
//]]></script>
|
||||
<script src="<TMPL_VAR NAME="DIR">/manager.js" type="text/JavaScript"></script>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
|
||||
<!-- File textarea -->
|
||||
<div id="content_filearea" class="hidden">
|
||||
<textarea readonly id="filearea" cols="80" rows="10"></textarea>
|
||||
<textarea readonly="readonly" id="filearea" cols="80" rows="10"></textarea>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -197,6 +199,11 @@
|
|||
</button>
|
||||
<button id="generatefile" onclick="generateFile(currentId);return false;" class="ui-state-default ui-corner-all">
|
||||
<lang en="Generate" fr="Générer" />
|
||||
</button>
|
||||
<button id="switchreadonly" onclick="switchReadonly('#filearea');return false;" class="ui-state-default ui-corner-all">
|
||||
</button>
|
||||
<button onclick="setlminputdata(currentId,filearea);return false;" class="ui-state-default ui-corner-all">
|
||||
<lang en="Apply" fr="Appliquer" />
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user