You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2003/02/13 07:16:48 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html skin-form.vm browser-skin.vm

taylor      2003/02/12 22:16:48

  Modified:    webapp/WEB-INF/templates/vm/portlets/html browser-skin.vm
  Added:       webapp/WEB-INF/templates/vm/portlets/html skin-form.vm
  Log:
  New Skin Browser from Jeremy Ford. Very nice.
  
  Revision  Changes    Path
  1.4       +9 -1      jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/browser-skin.vm
  
  Index: browser-skin.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/browser-skin.vm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- browser-skin.vm	16 May 2002 11:56:05 -0000	1.3
  +++ browser-skin.vm	13 Feb 2003 06:16:48 -0000	1.4
  @@ -20,7 +20,10 @@
         </tr>
       </table>
       </td>
  -    <td>&nbsp;</td>
  +    <td align="center">
  +    	<a style="font-size:10" href="$jslink.setPaneByName("SkinForm").addQueryData("mode","update").addQueryData("skinname", $!entry.Name)">Update Skin</a>&nbsp;
  +    	<a style="font-size:10" href="$jslink.setPaneByName("SkinForm").addQueryData("mode","delete").addQueryData("skinname", $!entry.Name)">Delete Skin</a>&nbsp;
  +    </td>
     </tr>
   #end
   </table>
  @@ -35,6 +38,11 @@
   #if ($prev)
         <input type="submit" value="Next &gt; &gt;">
   #end
  +    </td>
  +  </tr>
  +  <tr>
  +    <td colspan=6 align="left">
  +    	<a style="font-size:10" href="$jslink.setPaneByName("SkinForm").addQueryData("mode","insert")">Add Skin</a>&nbsp;
       </td>
     </tr>
   </table>
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/skin-form.vm
  
  Index: skin-form.vm
  ===================================================================
  <SCRIPT LANGUAGE="Javascript" SRC="$clink.setURI("javascript/ColorPicker2-cc.js")"></SCRIPT>
  <SCRIPT LANGUAGE="JavaScript">
  <!--
  var cp = new ColorPicker('window');
  //var cp2 = new ColorPicker();
  // Runs when a color is clicked
  function pickColor(color) {
  	field.value = color;
  }
  
  var field;
  function showColorChooser(anchorname, anchorid) {
  	field = document.forms["SkinForm"][anchorname];
  	cp.show(anchorid);
  }
  -->
  </SCRIPT>
  
  
  <form name="SkinForm" method="post" action="$jslink.getPaneByName("SkinBrowser").setAction("portlets.SkinUpdateAction")">
  
  <table bgcolor="#ffffff" cellpadding="5">
        #if ($msg)
        <tr>
          <td colspan="2">
            <table bgcolor="#ffffff">
              <tr>
                <td>
                  $msg
                </td>
              </tr>
            </table>
          </td>
        </tr>
        #end
  
        #if (($mode == "delete"))
        	<tr>
        		<td colspan="2">Are you sure you want do delete this skin?</td>
        	</tr>
          <tr>
              #formReadOnlyCell ("Name" "Name" $!entry.Name)
              <input type="hidden" name="skinname" value="$!entry.Name"/>
          </tr>
        #elseif ($mode == "insert")
        
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">Name</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" size="30" name="skinname" value="$!data.user.getTemp("skinname")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.text-color" size="20" value="$!data.user.getTemp("parameter.text-color")"> <a href="#" onClick="showColorChooser('parameter.text-color', 'text_color'); return false;" id="text_color">Pick</a>
              </font>
            </td>
          </tr>
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.background-color" size="20" value="$!data.user.getTemp("parameter.background-color")"> <a href="#" onClick="showColorChooser('parameter.background-color', 'background_color'); return false;" id="background_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-text-color" size="20" value="$!data.user.getTemp("parameter.title-text-color")"> <a href="#" onClick="showColorChooser('parameter.title-text-color', 'title_text_color'); return false;" id="title_text_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-background-color" size="20" value="$!data.user.getTemp("parameter.title-background-color")"> <a href="#" onClick="showColorChooser('parameter.title-background-color','title_background_color'); return false;" id="title_background_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-text-color" size="20" value="$!data.user.getTemp("parameter.highlight-text-color")"> <a href="#" onClick="showColorChooser('parameter.highlight-text-color','highlight_text_color'); return false;" id="highlight_text_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-background-color" size="20" value="$!data.user.getTemp("parameter.highlight-background-color")"> <a href="#" onClick="showColorChooser('parameter.highlight-background-color','highlight_background_color'); return false;" id="highlight_background_color">Pick</a>
              </font>
            </td>
          </tr>
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">portlet-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.portlet-style-class" size="20" value="$!data.user.getTemp("parameter.portlet-style-class")">
              </font>
            </td>
          </tr>  
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-style-class" size="20" value="$!data.user.getTemp("parameter.title-style-class")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">content-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.content-style-class" size="20" value="$!data.user.getTemp("parameter.content-style-class")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-title-style-class" size="20" value="$!data.user.getTemp("parameter.highlight-title-style-class")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-style-class" size="20" value="$!data.user.getTemp("parameter.tab-style-class")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-title-style-class" size="20" value="$!data.user.getTemp("parameter.tab-title-style-class")">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-content-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-content-style-class" size="20" value="$!data.user.getTemp("parameter.tab-content-style-class")">
              </font>
            </td>
          </tr>
  	#elseif($mode == "update")
        	<tr>
              #formReadOnlyCell ("Name" "Name" $!entry.Name)
              <input type="hidden" name="skinname" value="$!entry.Name"/>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.text-color" size="20" value="$!entry.getParameter("text-color").value"> <a href="#" onClick="showColorChooser('parameter.text-color', 'text_color'); return false;" id="text_color">Pick</a>
              </font>
            </td>
          </tr>
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.background-color" size="20" value="$!entry.getParameter("background-color").value"> <a href="#" onClick="showColorChooser('parameter.background-color', 'background_color'); return false;" id="background_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-text-color" size="20" value="$!entry.getParameter("title-text-color").value"> <a href="#" onClick="showColorChooser('parameter.title-text-color', 'title_text_color'); return false;" id="title_text_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-background-color" size="20" value="$!entry.getParameter("title-background-color").value"> <a href="#" onClick="showColorChooser('parameter.title-background-color','title_background_color'); return false;" id="title_background_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-text-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-text-color" size="20" value="$!entry.getParameter("highlight-text-color").value"> <a href="#" onClick="showColorChooser('parameter.highlight-text-color','highlight_text_color'); return false;" id="highlight_text_color">Pick</a>
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-background-color</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-background-color" size="20" value="$!entry.getParameter("highlight-background-color").value"> <a href="#" onClick="showColorChooser('parameter.highlight-background-color','highlight_background_color'); return false;" id="highlight_background_color">Pick</a>
              </font>
            </td>
          </tr>
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">portlet-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.portlet-style-class" size="20" value="$!entry.getParameter("portlet-style-class").value">
              </font>
            </td>
          </tr>  
          
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.title-style-class" size="20" value="$!entry.getParameter("title-style-class").value">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">content-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.content-style-class" size="20" value="$!entry.getParameter("content-style-class").value">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">highlight-title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.highlight-title-style-class" size="20" value="$!entry.getParameter("highlight-title-style-class").value">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-style-class" size="20" value="$!entry.getParameter("tab-style-class").value">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-title-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-title-style-class" size="20" value="$!entry.getParameter("tab-title-style-class").value">
              </font>
            </td>
          </tr>
          <tr>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <b><font face="$ui.sansSerifFonts">tab-content-style-class</font></b>
            </td>
            <td bgcolor="$!{skin.TitleBackgroundColor}">
              <font face="$ui.sansSerifFonts">
                <input type="text" name="parameter.tab-content-style-class" size="20" value="$!entry.getParameter("tab-content-style-class").value">
              </font>
            </td>
          </tr>
  	
  	
        #end
  </table>
  <table border="0"  cellspacing="0" cellpadding="5" width="30%">
        <tr>
          <td>
            #if ($mode == "insert")
            <input type="submit" name="eventSubmit_doInsert" value="Add Skin"/>
            #elseif ($mode == "delete")
            <input type="submit" name="eventSubmit_doDelete" value="Delete Skin"/>
            #elseif ($mode == "update")
            <input type="submit" name="eventSubmit_doUpdate" value="Update Skin"/>
            #end
          </td>
          <td>
            <input type="submit" name="eventSubmit_doCancel" value="Cancel"/>
          </td>
        </tr>
  </table>
  </form>
  
  <SCRIPT LANGUAGE="JavaScript">cp.writeDiv()</SCRIPT>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org