mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
ncp-web: display info for each option
This commit is contained in:
parent
1f055f8933
commit
70aac8e5f5
@ -88,21 +88,25 @@
|
||||
foreach($files as $file)
|
||||
{
|
||||
$script = pathinfo( $file , PATHINFO_FILENAME );
|
||||
$fh = fopen( $path . $file ,'r');
|
||||
$txt = file_get_contents( $path . $file );
|
||||
|
||||
$active = "";
|
||||
while ($line = fgets($fh))
|
||||
{
|
||||
if ( $line == "ACTIVE_=yes\n" )
|
||||
$active = " ✓";
|
||||
if ( preg_match('/^DESCRIPTION="(.*)"$/', $line, $matches) )
|
||||
{
|
||||
echo "<li id=\"$script\" class=\"nav-recent\">";
|
||||
echo "<a href=\"#\"> $script$active </a>";
|
||||
echo "<input type=\"hidden\" value=\"$matches[1]\" />";
|
||||
echo "</li>";
|
||||
}
|
||||
}
|
||||
fclose($fh);
|
||||
if ( preg_match('/^ACTIVE_=yes$/m', $txt, $matches) )
|
||||
$active = " ✓";
|
||||
|
||||
echo "<li id=\"$script\" class=\"nav-recent\">";
|
||||
echo "<a href=\"#\"> $script$active </a>";
|
||||
|
||||
if ( preg_match('/^DESCRIPTION="(.*)"$/m', $txt, $matches) )
|
||||
echo "<input id=\"$script-desc\" type=\"hidden\" value=\"$matches[1]\" />";
|
||||
|
||||
if ( preg_match('/^INFO="(.*)"/msU', $txt, $matches) )
|
||||
echo "<input id=\"$script-info\" type=\"hidden\" value=\"$matches[1]\" />";
|
||||
|
||||
if ( preg_match('/^INFOTITLE="(.*)"/msU', $txt, $matches) )
|
||||
echo "<input id=\"$script-infotitle\" type=\"hidden\" value=\"$matches[1]\" />";
|
||||
|
||||
echo "</li>";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
@ -110,6 +114,7 @@
|
||||
|
||||
<div id="app-content">
|
||||
<h2 id="config-box-title">Configure NextCloudPi features</h2>
|
||||
<div id="config-box-info"></div>
|
||||
<br/>
|
||||
<div id="config-box-wrapper" class="hidden">
|
||||
<form>
|
||||
|
||||
@ -1075,6 +1075,11 @@ select {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#config-box-info {
|
||||
white-space: pre;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#config-button-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -1124,7 +1129,6 @@ select {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
|
||||
#expand #expandDisplayName {
|
||||
padding: 8px;
|
||||
opacity: 0.6;
|
||||
|
||||
@ -58,8 +58,9 @@ $(function()
|
||||
if ( ret.token )
|
||||
$('#csrf-token').set( { value: ret.token } );
|
||||
$('#circle-retstatus').hide();
|
||||
$('#config-box').ht( ret.output );
|
||||
$('#config-box-title').fill( $( 'input' , '#' + selectedID ).get( '.value' ) );
|
||||
$('#config-box').ht( ret.output );
|
||||
$('#config-box-title').fill( $( '#' + selectedID + '-desc' ).get( '.value' ) );
|
||||
$('#config-box-info' ).fill( $( '#' + selectedID + '-info' ).get( '.value' ) );
|
||||
$('#config-box-wrapper').show();
|
||||
confLock = false;
|
||||
}).error( errorMsg );
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user