Commit 5be601a1 authored by sikeda's avatar sikeda
Browse files

[dev] Use Foundation reveal dialog for error dialog. Close button will be...

[dev] Use Foundation reveal dialog for error dialog.  Close button will be loaded only when javascript is available.


git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@12951 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent ebe9efa9
......@@ -1540,6 +1540,7 @@ h7 strong {
border:none;
}
/*
#ErrorBlock {
position:absolute;
left:0;
......@@ -1550,13 +1551,14 @@ h7 strong {
height:100%;
background: none repeat scroll 0 0 [% color_1 %]
}
*/
#ErrorMsg {
position:absolute;
width:60%;
margin:20% 19%;
padding:0;
z-index:610!important;
/* z-index:610!important; */
font-size: 1.4em;
font-weight: bold;
text-align:center;
......
<!-- $Id$ -->
<div id="ErrorBlock"></div>
<div id="ErrorMsg">
<div id="ErrorMsg" class="reveal-modal medium" data-reveal
aria-labelledby="[%|loc%]Error[%END%]" aria-hidden="true" role="dialog">
<div class="alert-box alert radius">
<i class="fi-x"></i>
<i class="fi-x"></i>
[%###################-%]
[%#### INTERN ERROR -%]
[%###################-%]
......@@ -27,10 +27,8 @@
[% ELSIF i_err.msg == 'file_update_failed' %][%|loc(i_err.key)%]Failed to update a file.[%END%]
[% ELSIF i_err.msg == 'create_list' %][%|loc(i_err.listname)%]Failed creating list '%1'. The list might already exist or listname might include forbidden characters.[%END%]
[% ELSIF i_err.msg == 'unable_to_rename_list' %][%|loc(i_err.listname,i_err.new_listname)%]Unable to rename list '%1' to '%2'.[%END%]
[% END %]
<br />
[% END %]
</br>
[% END %]
[%###################-%]
......@@ -165,12 +163,7 @@
<br />
[% END %]
<form >
<fieldset>
<input class="MainMenuLinks" type="button" value="OK" onclick="hideError();">
</fieldset>
</form>
[%# Close button will be inserted here. ~%]
</div>
</div>
......
......@@ -12,6 +12,7 @@
var sympa = {
calendarButtonText: "[%|loc%]Calendar[%END%]",
calendarFirstDay: 0,
closeText: "[%|loc%]Close[%END%]",
dayNames: "[%|loc%]Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday[%END%]".split(":"),
dayNamesMin: "[%|loc%]Su:Mo:Tu:We:Th:Fr:Sa[%END%]".split(":"),
home_url: '[% path_cgi %]/',
......
......@@ -10,10 +10,15 @@ function refresh_mom_and_die() {
self.close();
}
function hideError() {
$('#ErrorBlock').remove();
$('#ErrorMsg').remove();
}
/* Show error dialog. */
$(function() {
var closeButton =
$('<a class="close-reveal-modal" aria-label="' + sympa.closeText
+ '">&#215;</a>');
$('#ErrorMsg .alert-box').append(closeButton);
$('#ErrorMsg').foundation('reveal', 'open');
});
/*
* No longer used as of 6.2.17, however, can be included in older archives.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment