roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r797950 - in /roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor: StylesheetEdit.jsp TemplateEdit.jsp ThemeEdit.jsp ThemeEditSharedThemesOnly.jsp
Date Sun, 26 Jul 2009 15:55:00 GMT
Author: snoopdave
Date: Sun Jul 26 15:54:59 2009
New Revision: 797950

URL: http://svn.apache.org/viewvc?rev=797950&view=rev
Log:
removing dependence on Prototype in these JSPs, there were only a couple of references; all
to the $() selector

Modified:
    roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/StylesheetEdit.jsp
    roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/TemplateEdit.jsp
    roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEdit.jsp
    roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEditSharedThemesOnly.jsp

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/StylesheetEdit.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/StylesheetEdit.jsp?rev=797950&r1=797949&r2=797950&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/StylesheetEdit.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/StylesheetEdit.jsp Sun Jul 26 15:54:59
2009
@@ -16,6 +16,7 @@
   directory of this distribution.
 --%>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
+<script type="text/javascript" src="<s:url value="/roller-ui/scripts/scriptaculous/prototype.js"/>"
></script>
 
 <p class="subtitle"><s:text name="stylesheetEdit.subtitle" /></p>
 
@@ -35,7 +36,7 @@
     
     <script type="text/javascript"><!--
         if (getCookie("editorSize1") != null) {
-            $('stylesheetEdit_contents').rows = getCookie("editorSize1");
+            document.getElementById('stylesheetEdit_contents').rows = getCookie("editorSize1");
         }
         function changeSize(e, num) {
             a = e.rows + num;
@@ -63,9 +64,9 @@
             <td align="right">
                 <!-- Add buttons to make this textarea taller or shorter -->
                 <input type="button" name="taller" value=" &darr; " 
-                       onclick="changeSize1($('stylesheetEdit_contents'), 5)" />
+                       onclick="changeSize1(document.getElementById('stylesheetEdit_contents'),
5)" />
                 <input type="button" name="shorter" value=" &uarr; " 
-                       onclick="changeSize1($('stylesheetEdit_contents'), -5)" />
+                       onclick="changeSize1(document.getElementById('stylesheetEdit_contents'),
-5)" />
             </td>
         </tr>
     </table>

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/TemplateEdit.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/TemplateEdit.jsp?rev=797950&r1=797949&r2=797950&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/TemplateEdit.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/TemplateEdit.jsp Sun Jul 26 15:54:59
2009
@@ -16,6 +16,7 @@
   directory of this distribution.
 --%>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
+<script type="text/javascript" src="<s:url value="/roller-ui/scripts/scriptaculous/prototype.js"/>"
></script>
 
 <p class="subtitle">
    <s:text name="pageForm.subtitle" >
@@ -59,9 +60,9 @@
         
         // Update page URL when user changes link
         function updatePageURLDisplay() {
-            var previewSpan = $('linkPreview');
+            var previewSpan = document.getElementById('linkPreview');
             var n1 = previewSpan.firstChild;
-            var n2 = document.createTextNode($('template_bean_link').value);
+            var n2 = document.createTextNode(document.getElementById('template_bean_link').value);
             if (n1 == null) {
                 previewSpan.appendChild(n2);
             } else {
@@ -70,7 +71,7 @@
         }
         // Don't launch page if user has changed link, it'll be a 404
         function launchPage() {
-            if (originalLink != $('template_bean_link').value) {
+            if (originalLink != document.getElementById('template_bean_link').value) {
                 window.alert("Link changed, not launching page");
             } else {
                 window.open(weblogURL + '/page/' + originalLink, '_blank');
@@ -115,7 +116,7 @@
     
     <script type="text/javascript"><!--
         if (getCookie("editorSize1") != null) {
-            $('template_bean_contents').rows = getCookie("editorSize1");
+            document.getElementById('template_bean_contents').rows = getCookie("editorSize1");
         }
         function changeSize(e, num) {
             a = e.rows + num;
@@ -141,9 +142,9 @@
             <td align="right">
                 <!-- Add buttons to make this textarea taller or shorter -->
                 <input type="button" name="taller" value=" &darr; " 
-                       onclick="changeSize1($('template_bean_contents'), 5)" />
+                       onclick="changeSize1(document.getElementById('template_bean_contents'),
5)" />
                 <input type="button" name="shorter" value=" &uarr; " 
-                       onclick="changeSize1($('template_bean_contents'), -5)" />
+                       onclick="changeSize1(document.getElementById('template_bean_contents'),
-5)" />
             </td>
         </tr>
     </table>
@@ -168,12 +169,12 @@
                     <td class="field">
                         <script type="text/javascript"><!--
                         function showContentTypeField() {
-                            if ($('template_bean_autoContentType1').checked) {
-                                $('template_bean_manualContentType').readOnly = true;
-                                $('template_bean_manualContentType').style.background = '#e5e5e5';
+                            if (document.getElementById('template_bean_autoContentType1').checked)
{
+                                document.getElementById('template_bean_manualContentType').readOnly
= true;
+                                document.getElementById('template_bean_manualContentType').style.background
= '#e5e5e5';
                             } else {
-                                $('template_bean_manualContentType').readOnly = false;
-                                $('template_bean_manualContentType').style.background = '#ffffff';
+                                document.getElementById('template_bean_manualContentType').readOnly
= false;
+                                document.getElementById('template_bean_manualContentType').style.background
= '#ffffff';
                             }
                         }
                         // --></script>

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEdit.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEdit.jsp?rev=797950&r1=797949&r2=797950&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEdit.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEdit.jsp Sun Jul 26 15:54:59
2009
@@ -16,6 +16,7 @@
   directory of this distribution.
 --%>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
+<script type="text/javascript" src="<s:url value="/roller-ui/scripts/scriptaculous/prototype.js"/>"
></script>
 
 <script type="text/javascript">
 <!--
@@ -30,26 +31,26 @@
 
 function updateThemeChooser(selected) {
     if(selected.value == 'shared') {
-        $('sharedChooser').style.backgroundColor="#CCFFCC";
-        $('sharedChooser').style.border="1px solid #008000";
-        $('sharedOptioner').show();
-        
-        $('customChooser').style.backgroundColor="#eee";
-        $('customChooser').style.border="1px solid gray";
-        $('customOptioner').hide();
+        document.getElementById('sharedChooser').style.backgroundColor="#CCFFCC";
+        document.getElementById('sharedChooser').style.border="1px solid #008000";
+        document.getElementById('sharedOptioner').show();
+        
+        document.getElementById('customChooser').style.backgroundColor="#eee";
+        document.getElementById('customChooser').style.border="1px solid gray";
+        document.getElementById('customOptioner').hide();
     } else {
-        $('customChooser').style.backgroundColor="#CCFFCC";
-        $('customChooser').style.border="1px solid #008000";
-        $('customOptioner').show();
-        
-        $('sharedChooser').style.backgroundColor="#eee";
-        $('sharedChooser').style.border="1px solid gray";
-        $('sharedOptioner').hide();
+        document.getElementById('customChooser').style.backgroundColor="#CCFFCC";
+        document.getElementById('customChooser').style.border="1px solid #008000";
+        document.getElementById('customOptioner').show();
+        
+        document.getElementById('sharedChooser').style.backgroundColor="#eee";
+        document.getElementById('sharedChooser').style.border="1px solid gray";
+        document.getElementById('sharedOptioner').hide();
     }
 }
 
 function toggleImportThemeDisplay() {
-    $('themeImport').toggle();
+    document.getElementById('themeImport').toggle();
 }
 -->
 </script>
@@ -91,22 +92,22 @@
         </p>
         
         <p>
-            <s:select id="sharedSelector" name="themeId" list="themes" listKey="id" listValue="name"
size="1" onchange="previewImage($('sharedPreviewImg'), this[selectedIndex].value)"/>
+            <s:select id="sharedSelector" name="themeId" list="themes" listKey="id" listValue="name"
size="1" onchange="previewImage(document.getElementById('sharedPreviewImg'), this[selectedIndex].value)"/>
         </p>
         <p>
             <img id="sharedPreviewImg" src="" />
             <!-- initialize preview image at page load -->
             <script type="text/javascript">
                 <s:if test="customTheme">
-                    previewImage($('sharedPreviewImg'), '<s:property value="themes[0].id"/>');
+                    previewImage(document.getElementById('sharedPreviewImg'), '<s:property
value="themes[0].id"/>');
                 </s:if>
                 <s:else>
-                    previewImage($('sharedPreviewImg'), '<s:property value="themeId"/>');
+                    previewImage(document.getElementById('sharedPreviewImg'), '<s:property
value="themeId"/>');
                 </s:else>
             </script>
         </p>
         <p>
-            &raquo; <a href="#" onclick="fullPreview($('sharedSelector'))"><s:text
name="themeEditor.previewLink" /></a><br/>
+            &raquo; <a href="#" onclick="fullPreview(document.getElementById('sharedSelector'))"><s:text
name="themeEditor.previewLink" /></a><br/>
             <s:text name="themeEditor.previewDescription" />
         </p>
         
@@ -142,7 +143,7 @@
             </s:if>
             
             <p>
-                <s:checkbox name="importTheme" onclick="$('themeImport').toggle();" /><s:text
name="themeEditor.import" />
+                <s:checkbox name="importTheme" onclick="document.getElementById('themeImport').toggle();"
/><s:text name="themeEditor.import" />
             </p>
         </s:else>
         
@@ -154,22 +155,22 @@
             </s:if>
             
             <p>
-                <s:select id="customSelector" name="importThemeId" list="themes" listKey="id"
listValue="name" size="1" onchange="previewImage($('customPreviewImg'), this[selectedIndex].value)"/>
+                <s:select id="customSelector" name="importThemeId" list="themes" listKey="id"
listValue="name" size="1" onchange="previewImage(document.getElementById('customPreviewImg'),
this[selectedIndex].value)"/>
             </p>
             <p>
                 <img id="customPreviewImg" src="" />
                 <!-- initialize preview image at page load -->
                 <script type="text/javascript">
                 <s:if test="customTheme">
-                    previewImage($('customPreviewImg'), '<s:property value="themes[0].id"/>');
+                    previewImage(document.getElementById('customPreviewImg'), '<s:property
value="themes[0].id"/>');
                 </s:if>
                 <s:else>
-                    previewImage($('customPreviewImg'), '<s:property value="themeId"/>');
+                    previewImage(document.getElementById('customPreviewImg'), '<s:property
value="themeId"/>');
                 </s:else>
                 </script>
             </p>
             <p>
-                &raquo; <a href="#" onclick="fullPreview($('customSelector'))"><s:text
name="themeEditor.previewLink" /></a><br/>
+                &raquo; <a href="#" onclick="fullPreview(document.getElementById('customSelector'))"><s:text
name="themeEditor.previewLink" /></a><br/>
                 <s:text name="themeEditor.previewDescription" />
             </p>
         </div>
@@ -182,13 +183,13 @@
 <%-- initializes the chooser/optioner/themeImport display at page load time --%>
 <script type="text/javascript">
     <s:if test="customTheme">
-        updateThemeChooser($('customRadio'));
+        updateThemeChooser(document.getElementById('customRadio'));
     </s:if>
     <s:else>
-        updateThemeChooser($('sharedRadio'));
+        updateThemeChooser(document.getElementById('sharedRadio'));
     </s:else>
     
     <s:if test="firstCustomization">
-        $('themeImport').show();
+        document.getElementById('themeImport').show();
     </s:if>
 </script>

Modified: roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEditSharedThemesOnly.jsp
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEditSharedThemesOnly.jsp?rev=797950&r1=797949&r2=797950&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEditSharedThemesOnly.jsp (original)
+++ roller/trunk/apps/weblogger/web/WEB-INF/jsps/editor/ThemeEditSharedThemesOnly.jsp Sun
Jul 26 15:54:59 2009
@@ -16,6 +16,7 @@
   directory of this distribution.
 --%>
 <%@ include file="/WEB-INF/jsps/taglibs-struts2.jsp" %>
+<script type="text/javascript" src="<s:url value="/roller-ui/scripts/scriptaculous/prototype.js"/>"
></script>
 
 <script type="text/javascript">
 <!--
@@ -24,8 +25,8 @@
 }
 
 function fullPreview() {
-    selected=$('themeEdit_themeId').selectedIndex;
-    window.open('<s:url value="/roller-ui/authoring/preview/%{actionWeblog.handle}"/>?theme='+$('themeEdit_themeId').options[selected].value,
'_preview', '');
+    selected=document.getElementById('themeEdit_themeId').selectedIndex;
+    window.open('<s:url value="/roller-ui/authoring/preview/%{actionWeblog.handle}"/>?theme='+document.getElementById('themeEdit_themeId').options[selected].value,
'_preview', '');
 }
 -->
 </script>
@@ -44,13 +45,13 @@
     
     <div>
         <p>
-            <s:select name="themeId" list="themes" listKey="id" listValue="name" size="1"
onchange="previewImage($('previewImg'), this[selectedIndex].value)"/>
+            <s:select name="themeId" list="themes" listKey="id" listValue="name" size="1"
onchange="previewImage(document.getElementById('previewImg'), this[selectedIndex].value)"/>
         </p>
         <p>
             <img id="previewImg" src="" />
             <!-- initialize preview image at page load -->
             <script type="text/javascript">
-            previewImage($('previewImg'), '<s:property value="themeId"/>');
+            previewImage(document.getElementById('previewImg'), '<s:property value="themeId"/>');
             </script>
         </p>
         <p>



Mime
View raw message