[geeklog-cvs] geeklog: Missed updating the noscript tag for polls to use the n...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Apr 17 10:31:21 EDT 2011


changeset 8233:27551996c709
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/27551996c709
user: Tom <websitemaster at cogeco.net>
date: Sun Apr 17 10:30:25 2011 -0400
description:
Missed updating the noscript tag for polls to use the new Com_getNoScript function (the current solution was also missing the javascript warning message).

diffstat:

 plugins/polls/templates/admin/polleditor.thtml |  4 +++-
 public_html/admin/plugins/polls/index.php      |  6 ++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diffs (31 lines):

diff -r 5e3a3028229c -r 27551996c709 plugins/polls/templates/admin/polleditor.thtml
--- a/plugins/polls/templates/admin/polleditor.thtml	Sun Apr 17 10:16:00 2011 -0400
+++ b/plugins/polls/templates/admin/polleditor.thtml	Sun Apr 17 10:30:25 2011 -0400
@@ -1,4 +1,5 @@
-                                <noscript><div class="pluginAlert" style="padding:10px;">{no_javascript_warning}</div></noscript>
+                            {noscript}
+                            <div id="advanced_editor" style="display:none;">
                                 <form action="{site_admin_url}/plugins/polls/index.php" method="post">
                                     <table cellspacing="0" cellpadding="2" width="100%">
                                         <tr>
@@ -57,3 +58,4 @@
                                     <input type="hidden" value="{poll_id}" name="old_pid"{xhtml}>
                                     </p>
                                 </form>
+                            </div>
diff -r 5e3a3028229c -r 27551996c709 public_html/admin/plugins/polls/index.php
--- a/public_html/admin/plugins/polls/index.php	Sun Apr 17 10:16:00 2011 -0400
+++ b/public_html/admin/plugins/polls/index.php	Sun Apr 17 10:30:25 2011 -0400
@@ -423,6 +423,12 @@
         $access = 3;
     }
     
+    $poll_templates->set_var('noscript', COM_getNoScript(false, '', $link_message));        
+    
+    // Add JavaScript
+    // Hide the Advanced Editor as Javascript is required. If JS is enabled then the JS below will un-hide it
+    $js = 'document.getElementById("advanced_editor").style.display="";';                 
+    $_SCRIPTS->setJavaScript($js, true);    
     $_SCRIPTS->setJavaScriptFile('polls_editor', '/polls/polls_editor.js');
 
     $poll_templates->set_var('lang_pollid', $LANG25[6]);



More information about the geeklog-cvs mailing list