[vhffs-dev] [1946] Migrated user's prefs from prototype to dojo

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1946
Author:   beuss
Date:     2012-01-26 14:01:43 +0100 (Thu, 26 Jan 2012)
Log Message:
-----------
Migrated user's prefs from prototype to dojo

Modified Paths:
--------------
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/templates/layouts/panel.tt
    trunk/vhffs-panel/templates/user/prefs.tt

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2012-01-25 22:29:13 UTC (rev 1945)
+++ trunk/vhffs-panel/Makefile.am	2012-01-26 13:01:43 UTC (rev 1946)
@@ -780,6 +780,7 @@
 	js/public.js \
 	js/vhffs/nls/fr/prompt.js \
 	js/vhffs/nls/prompt.js \
+	js/vhffs/panel/user/prefs.js \
 	js/vhffs/Menu.js \
 	js/vhffs/Common.js \
 	js/vhffs/anonymous/login.js \

Modified: trunk/vhffs-panel/templates/layouts/panel.tt
===================================================================
--- trunk/vhffs-panel/templates/layouts/panel.tt	2012-01-25 22:29:13 UTC (rev 1945)
+++ trunk/vhffs-panel/templates/layouts/panel.tt	2012-01-26 13:01:43 UTC (rev 1946)
@@ -7,6 +7,7 @@
 	<script language="javascript" type="text/javascript" charset="utf-8" src="/js/prototype.js"></script>
 	<script language="javascript" type="text/javascript" charset="utf-8" src="/js/commons.js"></script>
 	<script language="javascript" type="text/javascript" charset="utf-8" src="/js/tooltip.js"></script>
+    <script language="javascript" type="text/javascript" charset="utf-8" src="/js/dojo/dojo.js"></script>
 [% IF refresh_url %]<meta http-equiv="refresh" content="5;[% refresh_url | html %]"/>[% END %]
 </head>
 <body>

Modified: trunk/vhffs-panel/templates/user/prefs.tt
===================================================================
--- trunk/vhffs-panel/templates/user/prefs.tt	2012-01-25 22:29:13 UTC (rev 1945)
+++ trunk/vhffs-panel/templates/user/prefs.tt	2012-01-26 13:01:43 UTC (rev 1946)
@@ -91,22 +91,20 @@
                     <p><a href="[% mail_user.help_url | html %]">[% 'Read more about this service.' | i18n | html %]</a></p>
 [% END %]
 					<p>
-						<input name="mail_activate" id="mail_activate" class="labeled"
-                            type="checkbox"[% ' checked="chedcked"' IF mail_user.service.exists() %]
-                            onchange="javascript:Element.toggle('mail_prefs');"/>
-                            <label class="inline" for="mail_activate">[% 'Activate %s@%s email' | i18n | pretty_print(user.get_username, mail_user.domain) | html %]</label>
+						<input name="mail_activate" id="activate-platform-email" class="labeled"
+                            type="checkbox"[% ' checked="chedcked"' IF mail_user.service.exists() %]/>
+                            <label class="inline" for="activate-platform-email">[% 'Activate %s@%s email' | i18n | pretty_print(user.get_username, mail_user.domain) | html %]</label>
 					</p>
-                    <div id="mail_prefs"[% ' style="display:none"' UNLESS  mail_user.service.exists() %]>
+                    <div id="platform-email-options"[% ' style="display:none"' UNLESS  mail_user.service.exists() %]>
 					<p>[% 'There are two possible usages:' | i18n | html %]</p>
 					
 					<p>
-						<input name="mail_usage" id="mail_usage_box" value="1" type="radio"
-                            class="labeled"[% ' checked="checked"' IF mail_user.service.exists_box && !mail_user.service.exists_forward %]
-                            onchange="javascript:document.getElementById('mbox_options').style.display='';"/>
-						<label class="inline" for="mail_usage_box" >[% 'Use VHFFS servers to manage this mail.' | i18n | html  %]
+						<input name="mail_usage" id="plaftorm-email-option-box" value="1" type="radio"
+                            class="labeled"[% ' checked="checked"' IF mail_user.service.exists_box && !mail_user.service.exists_forward %]/>
+						<label class="inline" for="plaftorm-email-option-box" >[% 'Use VHFFS servers to manage this mail.' | i18n | html  %]
                             <br/>[% 'You should use use the host pop.%s or imap.%s to fetch your mails.' | i18n | pretty_print(mail_user.domain, mail_user.domain) | html %]</label>
 					</p>
-					<div id="mbox_options"[% ' style="display:none"' UNLESS mail_user.service.exists_box && !mail_user.service.exists_forward %]>
+					<div id="platform-email-box-options"[% ' style="display:none"' UNLESS mail_user.service.exists_box && !mail_user.service.exists_forward %]>
 [% IF mail_user.nospam %]
                         <p><input name="mail_nospam" id="mail_nospam" type="checkbox"
                             class="labeled"[% ' checked="checked"' IF mail_user.service.use_nospam %]/>
@@ -120,10 +118,9 @@
 					</div>
 					<p>
 						<input name="mail_usage" 
-                            id="mail_usage_foward" value="2" class="labeled"
-                            type="radio"[% ' checked="checked"' IF mail_user.service.exists_forward %]
-                            onchange="javascript:document.getElementById('mbox_options').style.display='none';" />
-						<label class="inline" for="mail_usage_foward">[% 'Forward emails from %s@%s to %s' | i18n | pretty_print(user.get_username, mail_user.domain, user.get_mail) | html %]</label>
+                            id="plaftorm-email-option-forward" value="2" class="labeled"
+                            type="radio"[% ' checked="checked"' IF mail_user.service.exists_forward %]/>
+						<label class="inline" for="plaftorm-email-option-forward">[% 'Forward emails from %s@%s to %s' | i18n | pretty_print(user.get_username, mail_user.domain, user.get_mail) | html %]</label>
 					</p>
 					</div>
 
@@ -209,3 +206,4 @@
         <p><input type="submit" name="update_permissions_submit" value="[% 'Update permissions' | i18n | html %]"/></p>
     </form>
 [% END %]
+<script src="/js/vhffs/panel/user/prefs.js" type="text/javascript"></script>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/