[mashup-dev] svn commit r4734 - in trunk/mashup/java/modules/www: css xslt

svn at wso2.org svn at wso2.org
Tue Jul 3 06:47:52 PDT 2007


Author: prasad
Date: Tue Jul  3 06:47:40 2007
New Revision: 4734

Modified:
   trunk/mashup/java/modules/www/css/widgets.css
   trunk/mashup/java/modules/www/xslt/MashupServiceList.xsl
Log:
Added styles for stopped services widgets.

Modified: trunk/mashup/java/modules/www/css/widgets.css
==============================================================================
--- trunk/mashup/java/modules/www/css/widgets.css	(original)
+++ trunk/mashup/java/modules/www/css/widgets.css	Tue Jul  3 06:47:40 2007
@@ -376,4 +376,160 @@
 .w_top_b_panel_left_right{
 
  float:right;   
-}
\ No newline at end of file
+}
+
+/* widget stopped top styles */
+
+.w_stopped_top {
+	background-image: url(../images/w_stopped_top_bg.gif);
+	background-repeat: repeat-x;
+	height: 24px;
+}
+.w_stopped_top_left  {
+	width: 13px;
+	height: 24px;
+	float: left;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_top_title {
+	width: 100px;
+	height: 21px;
+	margin-left: 10px;
+	float: left;
+	color: #fff;
+	font-weight: bold;
+	font-size: 120%;
+	margin-top: 3px;
+}
+.w_stopped_top_right_panel  {
+	width: 46px;
+	height: 24px;
+	float: right;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_top_right  {
+	width: 9px;
+	height: 24px;
+	float: right;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_top_buttons {
+	width: 37px;
+	height: 16px;
+	margin-top: 4px;
+	float: left;
+}
+.w_stopped_top_buttons ul {
+	display: inline;
+	margin: 0px;
+	padding: 0px;
+	width: 32px;
+	height: 16px;
+}
+.w_stopped_top_buttons ul li {
+	display: inline;
+	margin: 0px;
+	padding: 0px;
+	width: 16px;
+	height: 16px;
+}
+.w_stopped_top_buttons ul li a img {
+	border: 0px;
+}
+
+/* widget stopped top panel button panel styles */
+.w_stopped_top_b_panel {
+	background-image: url(../images/w_stopped_top_b_panel_bg.gif);
+	background-repeat: repeat-x;
+	height: 26px;
+	padding: 0px;
+	margin-top: 0px;
+}
+.w_stopped_top_b_panel_left  {
+	width: 13px;
+	height: 26px;
+	float: left;
+	margin: 0px;
+	padding: 0px;
+	left: 0px;
+}
+.w_stopped_top_b_panel_title {
+	width: 250px;
+	height: 23px;
+	margin-left: 10px;
+	float: left;
+	color: #000;
+	font-weight: normal;
+	font-size: 105%;
+	margin-top: 3px;
+}
+.w_stopped_top_b_button_panel  {
+	width: 101px;
+	height: 26px;
+	float: right;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_top_b_panel_right  {
+	width: 9px;
+	height: 26px;
+	float: right;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_top_b_buttons {
+	width: 92px;
+	height: 20px;
+	margin-top: 3px;
+	float: left;
+}
+.w_stopped_top_b_buttons ul {
+	display: inline;
+	margin: 0px;
+	padding: 0px;
+	width: 92px;
+	height: 20px;
+}
+.w_stopped_top_b_buttons ul li {
+	display: inline;
+	margin: 0px;
+	padding: 0px;
+	width: 20px;
+	height: 20px;
+}
+.w_stopped_top_b_buttons ul li a img {
+	border: 0px;
+}
+
+/* widget stopped middle styles */
+.w_stopped_middle {
+	border-left: solid 2px #939598;
+	border-right: solid 2px #939598;
+	background-image: url(../images/w_stopped_middle_bg.gif);
+	background-repeat: repeat-x;
+	background-position: top;
+}
+
+/* widget stopped bottom styles */
+.w_stopped_bottom {
+	background-image: url(../images/w_stopped_bottom_bg.gif);
+	background-repeat: repeat-x;
+	height: 9px;
+}
+.w_stopped_bottom_left  {
+	width: 13px;
+	height: 9px;
+	float: left;
+	margin: 0px;
+	padding: 0px;
+}
+.w_stopped_bottom_right  {
+	width: 9px;
+	height: 9px;
+	float: right;
+	margin: 0px;
+	padding: 0px;
+}

Modified: trunk/mashup/java/modules/www/xslt/MashupServiceList.xsl
==============================================================================
--- trunk/mashup/java/modules/www/xslt/MashupServiceList.xsl	(original)
+++ trunk/mashup/java/modules/www/xslt/MashupServiceList.xsl	Tue Jul  3 06:47:40 2007
@@ -17,6 +17,8 @@
             <xsl:value-of select="$serviceName"/>
         </div>    -->
 
+           <!-- Top banner started -->
+            <xsl:if test="$active='true'">
             <div class="w_top">
                 <div class="w_top_left">
                     <img src="images/w_small_top_left.gif"/>
@@ -30,19 +32,38 @@
                     </div>
                 </div>
             </div>
+             </xsl:if>
+            <!-- Top banner stopped -->
+            <xsl:if test="$active='false'">
+            <div class="w_stopped_top">
+                <div class="w_stopped_top_left">
+                    <img src="images/w_small_stopped_top_left.gif"/>
+                </div>
+                <div class="w_stopped_top_title">
+                    <xsl:value-of select="$serviceName"/>
+                </div>
+                <div class="w_stopped_top_right_panel ">
+                    <div class="w_top_right">
+                        <img src="images/w_stopped_top_right.gif"/>
+                    </div>
+                </div>
+            </div>
+             </xsl:if>
+
 
+
+          <!-- Button bar started --> 
+           <xsl:if test="$active='true'">
             <div class="w_top_b_panel">
                 <div class="w_top_b_panel_left">
                     <img src="images/w_small_top_b_panel_left.gif"/>
                 </div>
                 <div class="w_top_b_panel_title">
 
-                    <xsl:if test="$active='true'">
+                   
                         <div style="dispaly:inline; float:left; color:green">Service started</div>
-                    </xsl:if>
-                    <xsl:if test="$active='false'">
-                        <div style="dispaly:inline; float:left; color:red">Service stopped</div>
-                    </xsl:if>
+
+
 
                 </div>
                 <div class="w_top_b_button_panel">
@@ -64,8 +85,7 @@
                                             <xsl:otherwise>
                                                 <xsl:element name="img">
                                                     <xsl:attribute name="src">images/w_stopped_share.gif</xsl:attribute>
-                                                    <xsl:attribute name="title">Share Service (Disabled for stopped
-                                                        services)
+                                                    <xsl:attribute name="title">Share Service (Disabled for stopped services)
                                                     </xsl:attribute>
                                                 </xsl:element>
                                             </xsl:otherwise>
@@ -73,8 +93,8 @@
                                     </xsl:when>
                                     <xsl:otherwise>
                                         <xsl:element name="img">
-                                            <xsl:attribute name="src">images/w_stopped_share.gif</xsl:attribute>
-                                            <xsl:attribute name="title">Share Service (Disabled for non Js services)
+                                              <xsl:attribute name="src">images/w_share.gif</xsl:attribute>
+                                              <xsl:attribute name="title">Share Service (Disabled for non Js services)
                                             </xsl:attribute>
                                         </xsl:element>
                                     </xsl:otherwise>
@@ -105,7 +125,7 @@
                                     </xsl:when>
                                     <xsl:otherwise>
                                         <xsl:element name="img">
-                                            <xsl:attribute name="src">images/w_stopped_edit.gif</xsl:attribute>
+                                            <xsl:attribute name="src">images/w_edit.gif</xsl:attribute>
                                             <xsl:attribute name="title">Edit Service (Disabled for non Js services)
                                             </xsl:attribute>
                                         </xsl:element>
@@ -115,14 +135,10 @@
 
                             </li>
                             <li>
-                                <xsl:element name="img">
+                               <xsl:element name="img">
                                     <xsl:attribute name="src">images/w_start.gif</xsl:attribute>
                                     <xsl:attribute name="title">Start Service</xsl:attribute>
-                                    <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
-                                    <xsl:attribute name="onclick">javascript:wso2.mashup.services.activationOfService('<xsl:value-of select="$serviceName"/>', true, wso2.mashup.MashupListModel.handleServiceStartStop); </xsl:attribute>
-                                </xsl:element>
-
-
+                              </xsl:element>
                             </li>
                             <li>
 
@@ -143,6 +159,111 @@
                 </div>
             </div>
 
+           </xsl:if>
+
+          <!-- Button bar stopped -->
+           <xsl:if test="$active='false'">
+            <div class="w_stopped_top_b_panel">
+                <div class="w_stopped_top_b_panel_left">
+                    <img src="images/w_small_stopped_top_b_panel.gif"/>
+                </div>
+                <div class="w_top_b_panel_title">
+                        <div style="dispaly:inline; float:left; color:red">Service stopped</div>
+                 </div>
+                <div class="w_top_b_button_panel">
+                    <div class="w_top_b_buttons">
+                        <ul>
+                            <li>
+                                <xsl:choose>
+                                    <xsl:when test="$serviceType='MashupJSService'">
+                                        <xsl:choose>
+                                            <xsl:when test="$active='true'">
+                                                <xsl:element name="img">
+                                                    <xsl:attribute name="src">images/w_share.gif</xsl:attribute>
+                                                    <xsl:attribute name="onclick">javascript:WSO2.MashupUtils.showMashupSharingDialog('<xsl:value-of select="$serviceName"/>');
+                                                    </xsl:attribute>
+                                                    <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
+                                                    <xsl:attribute name="title">Share Service</xsl:attribute>
+                                                </xsl:element>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+                                                <xsl:element name="img">
+                                                    <xsl:attribute name="src">images/w_stopped_share.gif</xsl:attribute>
+                                                    <xsl:attribute name="title">Share Service (Disabled for stopped
+                                                        services)
+                                                    </xsl:attribute>
+                                                </xsl:element>
+                                            </xsl:otherwise>
+                                        </xsl:choose>
+                                    </xsl:when>
+                                    <xsl:otherwise>
+                                        <xsl:element name="img">
+                                            <xsl:attribute name="src">images/w_stopped_share.gif</xsl:attribute>
+                                            <xsl:attribute name="title">Share Service (Disabled for non Js services)
+                                            </xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:otherwise>
+                                </xsl:choose>
+
+
+                            </li>
+                            <li>
+                                <xsl:choose>
+                                    <xsl:when test="$serviceType='MashupJSService'">
+                                        <xsl:choose>
+                                            <xsl:when test="$active='true'">
+                                                <xsl:element name="img">
+                                                    <xsl:attribute name="src">images/w_edit.gif</xsl:attribute>
+                                                    <xsl:attribute name="onclick">javascript:wso2.mashup.services.getServiceDataForEditor('<xsl:value-of select="$serviceName"/>', wso2.mashup.populateServiceEditor);</xsl:attribute>
+                                                    <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
+                                                    <xsl:attribute name="title">Edit Service</xsl:attribute>
+                                                </xsl:element>
+                                            </xsl:when>
+                                            <xsl:otherwise>
+                                                <xsl:element name="img">
+                                                    <xsl:attribute name="src">images/w_stopped_edit.gif</xsl:attribute>
+                                                    <xsl:attribute name="title">Edit Service (Disabled for stopped services)
+                                                    </xsl:attribute>
+                                                </xsl:element>
+                                            </xsl:otherwise>
+                                        </xsl:choose>
+                                    </xsl:when>
+                                    <xsl:otherwise>
+                                        <xsl:element name="img">
+                                           <xsl:attribute name="src">images/w_stopped_edit.gif</xsl:attribute>
+                                            <xsl:attribute name="title">Edit Service (Disabled for non Js services)
+                                            </xsl:attribute>
+                                        </xsl:element>
+                                    </xsl:otherwise>
+                                </xsl:choose>
+
+
+                            </li>
+                            <li>
+                               <xsl:element name="img">
+                                    <xsl:attribute name="src">images/w_stopped_start.gif</xsl:attribute>
+                                    <xsl:attribute name="title">Start Service</xsl:attribute>
+                                    <xsl:attribute name="style">cursor:pointer;</xsl:attribute>
+                                    <xsl:attribute name="onclick">javascript:wso2.mashup.services.activationOfService('<xsl:value-of select="$serviceName"/>', true, wso2.mashup.MashupListModel.handleServiceStartStop); </xsl:attribute>
+
+                              </xsl:element>
+                            </li>
+                            <li>
+                                <xsl:element name="img">
+                                    <xsl:attribute name="src">images/w_stopped_stop.gif</xsl:attribute>
+                                    <xsl:attribute name="title">Stop Service</xsl:attribute>
+
+                                </xsl:element>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="w_top_b_panel_left_right">
+                        <img src="images/w_stopped_top_b_panel_right.gif"/>
+                    </div>
+                </div>
+            </div>
+
+           </xsl:if>
 
             <!--
 




More information about the Mashup-dev mailing list