suppress warning if handle_messages was called twice
added link to the volume icon moved to table based layout
This commit is contained in:
parent
f68aafc7fb
commit
8746a53521
6 changed files with 40 additions and 25 deletions
|
@ -6,10 +6,19 @@
|
|||
|
||||
</div><!-- end of 'words' -->
|
||||
|
||||
<div id="footer">
|
||||
<?cs # ugly way of getting a 'min-height' for IE6 ?>
|
||||
</td><td id="pane_right"><p style="height:260px;" /></tr>
|
||||
|
||||
|
||||
<tr><td/><td><div id="footer">
|
||||
<?cs var:Data.Version ?>
|
||||
<a href="http://cryptobox.org" title="<?cs var:html_escape(Lang.Text.ProjectHomePage) ?>">CryptoBox-Home</a> <?cs var:html_escape(Lang.Text.ProjectNote) ?> <a href="http://senselab.org/" title="systemausfall.org">sense.lab</a>
|
||||
</div>
|
||||
</div></td><td/></tr>
|
||||
<?cs # ugly way of getting a 'min-width' for IE6 ?>
|
||||
<tr><td/><td><p style="width:600px;" /><td/></tr>
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div><!-- end of 'main' -->
|
||||
|
||||
|
|
|
@ -55,11 +55,14 @@
|
|||
|
||||
<div id="main">
|
||||
|
||||
<?cs if:?Data.EnvironmentWarning
|
||||
?><div id="EnvironmentWarning"><?cs
|
||||
call:environment_warning(Data.EnvironmentWarning) ?></div><?cs /if ?>
|
||||
<table id="pane">
|
||||
|
||||
<div id="head">
|
||||
<?cs if:?Data.EnvironmentWarning
|
||||
?><tr><td colspan="3"><div id="EnvironmentWarning"><?cs
|
||||
call:environment_warning(Data.EnvironmentWarning) ?></div></td></tr>
|
||||
<?cs /if ?>
|
||||
|
||||
<tr><td colspan="3"><div id="head">
|
||||
<table>
|
||||
<tr><td>
|
||||
<h1><?cs var:html_escape(Lang.Title.Top) ?></h1>
|
||||
|
@ -73,7 +76,11 @@
|
|||
/if ?>
|
||||
<img src="/cryptobox-misc/<?cs var:logoFile ?>" alt="icon: logo" />
|
||||
</td></tr></table>
|
||||
</div>
|
||||
</div></td></tr>
|
||||
|
||||
|
||||
<tr><td id="pane_left_top" /><td id="pane_top" /><td id="pane_right_top" /></tr>
|
||||
<tr><td id="pane_left" />
|
||||
<td id="pane_content">
|
||||
|
||||
<div id="words">
|
||||
|
||||
|
|
|
@ -116,8 +116,8 @@ def:print_form_header(form_name, action) ?><?cs #
|
|||
|
||||
|
||||
def:show_volume_icon(volume) ?><?cs
|
||||
# show the appropriate icon for the current state of the volume ?>
|
||||
<?cs if:volume.active ?><?cs
|
||||
# show the appropriate icon for the current state of the volume ?><?cs
|
||||
if:volume.active ?><?cs
|
||||
if:volume.encryption ?><?cs
|
||||
set:filename='volume_active_crypto.gif' ?><?cs
|
||||
else ?><?cs
|
||||
|
@ -129,8 +129,7 @@ def:show_volume_icon(volume) ?><?cs
|
|||
else ?><?cs
|
||||
set:filename='volume_passive_plain.gif' ?><?cs
|
||||
/if ?><?cs
|
||||
/if ?>
|
||||
<img src="<?cs call:link('cryptobox-misc/' + filename,'','','','') ?>" alt="icon: volume" /><?cs
|
||||
/if ?><img src="<?cs call:link('cryptobox-misc/' + filename,'','','','') ?>" alt="icon: volume" /><?cs
|
||||
/def ?><?cs
|
||||
|
||||
|
||||
|
@ -156,9 +155,11 @@ def:help_link(pagename) ?><?cs
|
|||
|
||||
def:handle_messages() ?><?cs
|
||||
# call this function once for every page - otherwise your risk to loose messages
|
||||
?><?cs if:messages_are_handled ?>HANDLE_MESSAGE CALLED TWICE - PLEASE FIX THIS<?cs /if
|
||||
?><?cs if:Data.Warning ?><?cs call:warning(Data.Warning) ?><?cs /if
|
||||
?><?cs if:Data.Success ?><?cs call:success(Data.Success) ?><?cs /if
|
||||
?><?cs set:messages_are_handled = 1 ?><?cs
|
||||
# if it gets called twice somehow, then we just ignore it
|
||||
?><?cs if:!messages_are_handled
|
||||
?><?cs if:Data.Warning ?><?cs call:warning(Data.Warning) ?><?cs /if
|
||||
?><?cs if:Data.Success ?><?cs call:success(Data.Success) ?><?cs /if
|
||||
?><?cs set:messages_are_handled = 1
|
||||
?><?cs /if ?><?cs
|
||||
/def ?>
|
||||
|
||||
|
|
|
@ -7,11 +7,9 @@
|
|||
|
||||
<?cs if:Data.ActivePlugin && (Settings.PluginList[Data.ActivePlugin].Types.volume) ?>
|
||||
<?cs include:Settings.TemplateDir + '/show_volume_header.cs' ?>
|
||||
<?cs call:handle_messages() ?>
|
||||
<?cs include:Settings.TemplateFile ?>
|
||||
<?cs include:Settings.TemplateDir + '/show_volume_footer.cs' ?>
|
||||
<?cs else ?>
|
||||
<?cs call:handle_messages() ?>
|
||||
<?cs include:Settings.TemplateFile ?>
|
||||
<?cs /if ?>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?cs # $Id$ ?>
|
||||
|
||||
<div id="volume_name">
|
||||
<table><tr><td>
|
||||
<table id="volume_name"><tr><td>
|
||||
<h1><?cs var:html_escape(Lang.Title.Volume) ?> <i><?cs var:html_escape(Data.CurrentDisk.name) ?></i></h1>
|
||||
</td><td>
|
||||
<?cs call:show_volume_icon(Data.CurrentDisk) ?>
|
||||
</td></tr></table>
|
||||
</div>
|
||||
<a href="<?cs call:link("volume_mount","device",Data.CurrentDisk.device,"","") ?>"><?cs call:show_volume_icon(Data.CurrentDisk) ?></a>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table id="volume_area">
|
||||
<tr>
|
||||
|
@ -15,5 +15,5 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="volume_area_inner">
|
||||
<div id="volume_content">
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<td <?cs if:markPlugin == name(x)
|
||||
?>class="volume_plugin_active"<?cs
|
||||
else ?>class="volume_plugin_passive"<?cs
|
||||
/if ?>><a href="<?cs call:link(name(x),'device',Data.CurrentDisk.device,'','') ?>" title="<?cs var:html_escape(x.Link) ?>"><img src="<?cs call:link("icons/" + name(x),'','','','') ?>" alt="icon: <?cs var:html_escape(name(x)) ?>" /> <?cs var:html_escape(x.Link) ?></a></td><?cs
|
||||
/if ?>><a href="<?cs call:link(name(x),'device',Data.CurrentDisk.device,'','') ?>" title="<?cs var:html_escape(x.Link) ?>"><img src="<?cs call:link("icons/" + name(x),'','','','') ?>" alt="icon: <?cs var:html_escape(name(x)) ?>" /> <?cs var:html_escape(x.Link) ?></a></td><!-- add some space --><td> </td><?cs
|
||||
/if ?><?cs
|
||||
/each ?><?cs
|
||||
/loop ?>
|
||||
|
|
Loading…
Reference in a new issue