Author: mfranklin
Date: Fri Apr 20 21:48:56 2012
New Revision: 1328521

URL: http://svn.apache.org/viewvc?rev=1328521&view=rev
Log:
Committing patch for RAVE-539 from Kristen Legacy

Modified:
    
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
    
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/css/default.css
    
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/script/rave_store.js

Modified: 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
URL: 
http://svn.apache.org/viewvc/rave/branches/bootstrap/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp?rev=1328521&r1=1328520&r2=1328521&view=diff
==============================================================================
--- 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
 (original)
+++ 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/WEB-INF/jsp/views/widget.jsp
 Fri Apr 20 21:48:56 2012
@@ -19,214 +19,269 @@
 <%@ page language="java" trimDirectiveWhitespaces="true" %>
 <%@ include file="/WEB-INF/jsp/includes/taglibs.jsp" %>
 <fmt:setBundle basename="messages"/>
-<header>
-    <nav class="topnav">
-        <ul class="horizontal-list">
-            <c:if test="${not empty referringPageId}">
-                <li>
-                    <a href="<spring:url 
value="/app/store?referringPageId=${referringPageId}" />">
-                        <fmt:message key="page.widget.backToStore"/>
-                    </a>
-                </li>
-            </c:if>
-            <li>
+<div class="navbar navbar-fixed-top">
+    <div class="navbar-inner">
+        <div class="container">
+            <a class="btn btn-navbar" data-toggle="collapse" 
data-target=".nav-collapse">
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+                <span class="icon-bar"></span>
+            </a>
+            <span class="brand"><c:out value="${widget.title}"/></span>
+            <div class="nav-collapse">
+                <ul class="nav pull-right">
+                     <c:if test="${not empty referringPageId}">
+                        <li>
+                            <a href="<spring:url 
value="/app/store?referringPageId=${referringPageId}" />">
+                                <fmt:message key="page.widget.backToStore"/>
+                            </a>
+                        </li>
+                    </c:if>
+                    <li>
+                        <c:choose>
+                            <c:when test="${empty referringPageId}">
+                                <spring:url value="/index.html" 
var="gobackurl"/>
+                            </c:when>
+                            <c:otherwise>
+                                <spring:url 
value="/app/page/view/${referringPageId}" var="gobackurl"/>
+                            </c:otherwise>
+                        </c:choose>
+                        <a href="<c:out value="${gobackurl}"/>"><fmt:message 
key="page.general.back"/></a>
+                    </li>
+                    <sec:authorize url="/app/admin/">
+                        <li>
+                            <a href="<spring:url value="/app/admin/"/>">
+                                <fmt:message 
key="page.general.toadmininterface"/>
+                            </a>
+                        </li>
+                    </sec:authorize>
+                    <li>
+                        <a href="<spring:url value="/j_spring_security_logout" 
htmlEscape="true" />">
+                            <fmt:message key="page.general.logout"/></a>
+                    </li>
+                </ul>
+            </div>
+        </div>
+    </div>
+</div>
+
+<div id="na_content" class="container-fluid">
+    <div class="row-fluid detail-widget">
+        <div class="span3">
+            <div class="detail-widget-preview">
+                <c:if test="${not empty widget.screenshotUrl}">
+                    <div class="detailWidgetScreenshot">
+                        <img src="${widget.screenshotUrl}"
+                             alt="<fmt:message key="page.general.screenshot"/>"
+                             title="<c:out value="${widget.title}"/> 
<fmt:message key="page.general.screenshot"/>"/>
+                    </div>
+                </c:if>
+                <c:if test="${not empty widget.thumbnailUrl}">
+                    <div class="detailWidgetThumbnail">
+                        <img src="<c:out value="${widget.thumbnailUrl}"/>" 
title="<c:out value="${widget.title}"/>"
+                             alt="<fmt:message 
key="page.general.thumbnail"/>"/>
+                    </div>
+                </c:if>
                 <c:choose>
-                    <c:when test="${empty referringPageId}">
-                        <spring:url value="/index.html" var="gobackurl"/>
+                    <c:when test="${widget.widgetStatus eq 'PUBLISHED'}">
+                        <div id="widgetAdded_${widget.entityId}" 
class="detailWidgetAdd">
+                            <button class="btn btn-primary btn-large 
storeItemButton"
+                                    id="addWidget_${widget.entityId}"
+                                    
onclick="rave.api.rpc.addWidgetToPage({widgetId: ${widget.entityId}, pageId: 
${referringPageId}, redirectAfterAdd:true});">
+                                <fmt:message key="page.widget.addToPage"/>
+                            </button>
+                        </div>
+                    </c:when>
+                    <c:when test="${widget.widgetStatus eq 'PREVIEW'}">
+                        <div class="alert-message info">
+                            <p><fmt:message 
key="widget.widgetStatus.PREVIEW"/></p>
+                        </div>
                     </c:when>
-                    <c:otherwise>
-                        <spring:url value="/app/page/view/${referringPageId}" 
var="gobackurl"/>
-                    </c:otherwise>
                 </c:choose>
-                <a href="<c:out value="${gobackurl}"/>"><fmt:message 
key="page.general.back"/></a>
-            </li>
-            <sec:authorize url="/app/admin/">
-                <li>
-                    <a href="<spring:url value="/app/admin/"/>">
-                        <fmt:message key="page.general.toadmininterface"/>
-                    </a>
-                </li>
-            </sec:authorize>
-            <li>
-                <a href="<spring:url value="/j_spring_security_logout" 
htmlEscape="true" />">
-                    <fmt:message key="page.general.logout"/></a>
-            </li>
-        </ul>
-    </nav>
-    <h1><c:out value="${widget.title}"/></h1>
-</header>
-
-
-<div id="content">
-
-    <div class="widget-content">
-
-        <h2>
-            <c:set var="widgetHasTitleUrl" value="${not empty 
widget.titleUrl}"/>
-            <c:if test="${widgetHasTitleUrl}"><a href="<c:out 
value="${widget.titleUrl}"/>" rel="external">
-            </c:if>
-            <span id="widget-${widget.entityId}-title"><c:out 
value="${widget.title}"/></span>
-            <c:if test="${widgetHasTitleUrl}"></a></c:if>
-        </h2>
-
-        <div class="detailWidgetPreview">
-            <c:if test="${not empty widget.screenshotUrl}">
-                <div class="detailWidgetScreenshot">
-                    <img src="${widget.screenshotUrl}"
-                         alt="<fmt:message key="page.general.screenshot"/>"
-                         title="<c:out value="${widget.title}"/> <fmt:message 
key="page.general.screenshot"/>"/>
+            </div>
+        </div>
+        <div class="span8 detail-widget-main">
+           <h2>
+                <c:set var="widgetHasTitleUrl" value="${not empty 
widget.titleUrl}"/>
+                <c:if test="${widgetHasTitleUrl}"><a href="<c:out 
value="${widget.titleUrl}"/>" rel="external">
+                </c:if>
+                <span id="widget-${widget.entityId}-title"><c:out 
value="${widget.title}"/></span>
+                <c:if test="${widgetHasTitleUrl}"></a></c:if>
+           </h2>
+           <div class="row-fluid">
+                <c:if test="${widget.disableRendering}">
+                    <div class="storeWidgetDisabled">
+                        <span class="widget-disabled-icon-store ui-icon 
ui-icon-alert"
+                              title="<fmt:message 
key="widget.chrome.disabled"/>"></span>
+                        <c:out value="${widget.disableRenderingMessage}" 
escapeXml="true"/>
+                    </div>
+                </c:if>
+                <c:if test="${not empty widget.author}">
+                    <p class="storeWidgetAuthor">
+                        <fmt:message key="widget.author"/>
+                        <c:out value=" "/><%-- intentional empty String in the 
c:out --%>
+                        <c:choose>
+                            <c:when test="${not empty widget.authorEmail}">
+                                <a href="mailto:<c:out 
value="${widget.authorEmail}"/>"><c:out
+                                        value="${widget.author}"/></a>
+                            </c:when>
+                            <c:otherwise><c:out 
value="${widget.author}"/></c:otherwise>
+                        </c:choose>
+                    </p>
+                </c:if>
+
+                <c:if test="${not empty widget.description}">
+                    <p class="storeWidgetDesc"><c:out 
value="${widget.description}"/></p>
+                </c:if>
+           </div>
+           <div class="row-fluid">
+                <div>
+                    <h3><fmt:message key="page.widget.rate"/></h3>
+                    <form class="hidden">
+                        <input type="hidden" id="rate-${widget.entityId}"
+                               
value="${widgetsStatistics[widget.entityId]!=null?widgetsStatistics[widget.entityId].userRating:"-1"}">
+                    </form>
+                    <div id="rating-${widget.entityId}" class="ratingButtons 
btn-group" data-toggle="buttons-radio">
+                        <button id="like-${widget.entityId}" 
class="widgetLikeButton btn btn-small 
${widgetsStatistics[widget.entityId].userRating==10? 'active btn-success':''}"
+                                
${widgetsStatistics[widget.entityId].userRating==10 ? " checked='true'":""}
+                                name="rating-${widget.entityId}"><i 
class="icon-plus"></i></button>
+                        <button id="dislike-${widget.entityId}" 
class="widgetDislikeButton btn btn-small 
${widgetsStatistics[widget.entityId].userRating==0? 'active btn-danger':''}"
+                                
${widgetsStatistics[widget.entityId].userRating==0 ? " checked='true'":""}
+                                name="rating-${widget.entityId}"><i 
class="icon-minus"></i></button>
+                        <!-- Displaying the likes and dislikes rating along 
with total votes -->
+                    </div>
+                    <br>
+                    <div>
+                        <span class="widgetLikeCount">
+                            <c:set var="widgetLikes">
+                                
${widgetsStatistics[widget.entityId]!=null?widgetsStatistics[widget.entityId].totalLike:"0"}
+                            </c:set>
+                            <span><fmt:message 
key="page.widget.rate.likes"/></span>
+                            <span id="totalLikes-${widget.entityId}" 
data-rave-widget-likes="${widgetLikes}">
+                                ${widgetLikes}
+                            </span>
+                        </span>
+                        <span class="widgetDislikeCount">
+                            <c:set var="widgetDislikes">
+                                
${widgetsStatistics[widget.entityId]!=null?widgetsStatistics[widget.entityId].totalDislike:"0"}
+                            </c:set>
+                            <span><fmt:message 
key="page.widget.rate.dislikes"/></span>
+                            <span id="totalDislikes-${widget.entityId}" 
data-rave-widget-dislikes="${widgetDislikes}">
+                                ${widgetDislikes}
+                            </span>
+                        </span>
+                    </div>
                 </div>
-            </c:if>
-            <c:if test="${not empty widget.thumbnailUrl}">
-                <div class="detailWidgetThumbnail">
-                    <img src="<c:out value="${widget.thumbnailUrl}"/>" 
title="<c:out value="${widget.title}"/>"
-                         alt="<fmt:message key="page.general.thumbnail"/>"/>
+                <div class="detail-widget-users">
+                    <p><c:set var="widgetUserCountGreaterThanZero"
+                           value="${widgetStatistics != null && 
widgetStatistics.totalUserCount > 0}"/>
+                    <c:if test="${widgetUserCountGreaterThanZero}"><a 
href="javascript:void(0);"
+                                                                      
onclick="rave.displayUsersOfWidget(${widget.entityId});"></c:if>
+                    <fmt:formatNumber groupingUsed="true" 
value="${widgetStatistics.totalUserCount}"/>&nbsp;<fmt:message
+                            key="page.widget.usercount"/>
+                    <c:if test="${widgetUserCountGreaterThanZero}"></a></c:if>
+                    </p>
                 </div>
-            </c:if>
-
-        </div>
-
-        <div class="detailWidgetInfo">
+           </div>
 
-            <c:choose>
-                <c:when test="${widget.widgetStatus eq 'PUBLISHED'}">
-                    <div id="widgetAdded_${widget.entityId}" 
class="detailWidgetAdd">
-                        <button class="storeItemButton"
-                                id="addWidget_${widget.entityId}"
-                                
onclick="rave.api.rpc.addWidgetToPage({widgetId: ${widget.entityId}, pageId: 
${referringPageId}, redirectAfterAdd:true});">
-                            <fmt:message key="page.widget.addToPage"/>
+            <div class="row-fluid">
+                <%--//Tag section--%>
+                <div class="widgetTags">
+                    <c:if test="${not empty widget.tags}">
+                        <h3><fmt:message key="page.widget.tags.title"/></h3>
+                        <div class="detail-widget-tags">
+                                <c:forEach var="tag" items="${widget.tags}">
+                               <span class="label"><c:out 
value="${tag.tag.keyword}"/></span>
+                                </c:forEach>
+                        </div>
+                    </c:if>
+                    <div id="tagInput" class="form-inline hide">
+                        <label for="tags"><fmt:message 
key="page.widget.tags.add"/> </label>
+                        <input type="text" id="tags" data-provide="typeahead" 
/>
+                        <button id="tag-new-${widget.entityId}" class="btn 
tagNewButton" title="Add Tag">
+                            <i class="icon-tag"></i>
                         </button>
                     </div>
-                </c:when>
-                <c:when test="${widget.widgetStatus eq 'PREVIEW'}">
-                    <div class="alert-message info">
-                        <p><fmt:message key="widget.widgetStatus.PREVIEW"/></p>
-                    </div>
-                </c:when>
-            </c:choose>
-            <c:if test="${widget.disableRendering}">
-                <div class="storeWidgetDisabled">
-                    <span class="widget-disabled-icon-store ui-icon 
ui-icon-alert"
-                          title="<fmt:message 
key="widget.chrome.disabled"/>"></span>
-                    <c:out value="${widget.disableRenderingMessage}" 
escapeXml="true"/>
+                    <a href="#tagInput" data-toggle="basic-slide" 
data-toggle-text="Hide tag form">Add tags <i class="icon-arrow-right"></i></a>
                 </div>
-            </c:if>
-            <c:if test="${not empty widget.author}">
-                <p class="storeWidgetAuthor">
-                    <fmt:message key="widget.author"/>
-                    <c:out value=" "/><%-- intentional empty String in the 
c:out --%>
-                    <c:choose>
-                        <c:when test="${not empty widget.authorEmail}">
-                            <a href="mailto:<c:out 
value="${widget.authorEmail}"/>"><c:out
-                                    value="${widget.author}"/></a>
-                        </c:when>
-                        <c:otherwise><c:out 
value="${widget.author}"/></c:otherwise>
-                    </c:choose>
-                </p>
-            </c:if>
-
-            <c:if test="${not empty widget.description}">
-                <p class="storeWidgetDesc"><c:out 
value="${widget.description}"/></p>
-            </c:if>
-
-            <div class="widgetRating">
-                <fmt:message key="page.widget.rate"/>
-                <div id="radio" class="ratingButtons">
-                    <input type="radio" id="like-${widget.entityId}" 
class="widgetLikeButton widgetRatingButton"
-                           value="10"
-                           
name="rating-${widget.entityId}"${widgetStatistics.userRating=='10'?" 
checked='true'":""}>
-                    <label 
for="like-${widget.entityId}">${widgetStatistics.totalLike}</label>
-                    <input type="radio" id="dislike-${widget.entityId}"
-                           class="widgetDislikeButton widgetRatingButton" 
value="0"
-                           
name="rating-${widget.entityId}"${widgetStatistics.userRating=='0'?" 
checked='true'":""}>
-                    <label 
for="dislike-${widget.entityId}">${widgetStatistics.totalDislike}</label>
-                </div>
-            </div>
-            <div class="widgetUserCount">
-                <c:set var="widgetUserCountGreaterThanZero"
-                       value="${widgetStatistics != null && 
widgetStatistics.totalUserCount > 0}"/>
-                <c:if test="${widgetUserCountGreaterThanZero}"><a 
href="javascript:void(0);"
-                                                                  
onclick="rave.displayUsersOfWidget(${widget.entityId});"></c:if>
-                <fmt:formatNumber groupingUsed="true" 
value="${widgetStatistics.totalUserCount}"/>&nbsp;<fmt:message
-                        key="page.widget.usercount"/>
-                <c:if test="${widgetUserCountGreaterThanZero}"></a></c:if>
+                <c:if test="${not empty widget.categories}">
+                    <div class="widgetCategories">
+                        <fmt:message key="widget.categories"/>
+                        <table id="categoriesRow">
+                            <tr>
+                                <c:forEach var="category" 
items="${widget.categories}">
+                                    <td class="storeWidgetDesc"><c:out 
value="${category.text}"/></td>
+                                </c:forEach>
+                            </tr>
+                        </table>
+                    </div>
+                </c:if>
             </div>
-        </div>
 
-        <%--//Tag section--%>
-        <div class="widgetTags">
-            <c:if test="${not empty widget.tags}">
-                <fmt:message key="page.widget.tags.title"/>
-                <table id="tagsRow">
-                    <tr>
-                        <c:forEach var="tag" items="${widget.tags}">
-                        <td class="storeWidgetDesc"><c:out 
value="${tag.tag.keyword}"/></td>
-                        </c:forEach>
-                     </tr>
-                </table>
-            </c:if>
-
-            <div id="tagInput">
-                <fmt:message key="page.widget.tags.add"/> </br>
-                <input id="tags">
-                <button id="tag-new-${widget.entityId}" 
class="tagNewButton"></button>
+            <div class="row-fluid">
+                <div class="widgetComments">
+                    <h3><fmt:message key="page.widget.comments"/></h3>
+                    <div class="new-comment form-inline well">
+                        <div class="row-fluid">
+                        <textarea id="newComment-${widget.entityId}" 
class="span11"></textarea>&nbsp;
+                        <button id="comment-new-${widget.entityId}" class="btn 
commentNewButton" title="Add Comment"><i class="icon-comment"></i></button>
+                    </div>                     </div>
+                    <c:if test="${not empty widget.comments}">
+                        <ul class="comments">
+                            <c:forEach var="comment" 
items="${widget.comments}">
+                                <li class="comment">
+                                    <fmt:formatDate 
value="${comment.createdDate}" type="both" var="commentDate"/>
+                                    <p class="comment-heading">
+                                        <span class="commenter">
+                                            <c:choose>
+                                                <c:when test="${not empty 
comment.user.displayName}">
+                                                    <c:out 
value="${comment.user.displayName}"/>
+                                                </c:when>
+                                                <c:otherwise><c:out 
value="${comment.user.username}"/></c:otherwise>
+                                            </c:choose>
+                                        </span>
+                                        <span class="comment-date">
+                                            <c:out value=" - ${commentDate} "/>
+                                        </span>
+                                        <c:if test="${userProfile.entityId eq 
comment.user.entityId}">
+                                            <button 
id="comment-delete-${comment.entityId}" class="btn btn-danger btn-mini 
commentDeleteButton"
+                                                    value="Delete" 
title="Delete comment" data-widget id="<c:out value="${comment.widgetId}"/>">
+                                                <i class="icon-remove 
icon-white"></i>
+                                            </button>
+                                            <button 
id="comment-edit-${comment.entityId}" class="btn btn-mini commentEditButton"
+                                                    value="Edit" title="Edit 
comment"
+                                                    data-widgetid="<c:out 
value="${comment.widgetId}"/>"
+                                                    data-toggle="modal" 
data-target="#editComment-dialog">
+                                                <i class="icon-pencil"></i>
+                                            </button>
+                                        </c:if>
+                                    </p>
+                                    <p class="commentText"><c:out 
value="${comment.text}"/></p>
+
+                                </li>
+                            </c:forEach>
+                        </ul>
+                    </c:if>
+                </div>
             </div>
         </div>
-        <c:if test="${not empty widget.categories}">
-            <div class="widgetCategories">
-                <fmt:message key="widget.categories"/>
-                <table id="categoriesRow">
-                    <tr>
-                        <c:forEach var="category" items="${widget.categories}">
-                            <td class="storeWidgetDesc"><c:out 
value="${category.text}"/></td>
-                        </c:forEach>
-                    </tr>
-                </table>
-            </div>
-        </c:if>
-        <div class="widgetComments">
-            <div class="new-comment">
-                <h3><fmt:message key="page.widget.comments"/></h3>
-                <textarea id="newComment-${widget.entityId}" rows="3" 
cols="50"></textarea>
-                <button id="comment-new-${widget.entityId}" 
class="commentNewButton"></button>
-            </div>
-            <c:if test="${not empty widget.comments}">
-                <ul class="comments">
-                    <c:forEach var="comment" items="${widget.comments}">
-                        <li class="comment">
-
-                            <fmt:formatDate value="${comment.createdDate}" 
type="both" var="commentDate"/>
-                            <c:choose>
-                                <c:when test="${not empty 
comment.user.displayName}">
-                                    <c:out 
value="${comment.user.displayName}"/>
-                                </c:when>
-                                <c:otherwise><c:out 
value="${comment.user.username}"/></c:otherwise>
-                            </c:choose>
-                            <c:out value=" - ${commentDate} "/>
-
-                            <c:if test="${userProfile.entityId eq 
comment.user.entityId}">
-                                <button 
id="comment-delete-${comment.entityId}" class="commentDeleteButton"
-                                        value="Delete" data-widgetid="<c:out 
value="${comment.widgetId}"/>"></button>
-                                <button id="comment-edit-${comment.entityId}" 
class="commentEditButton" value="Edit"
-                                        data-widgetid="<c:out 
value="${comment.widgetId}"/>"></button>
-                            </c:if>
-
-                            <p class="commentText"><c:out 
value="${comment.text}"/></p>
-
-                        </li>
-                    </c:forEach>
-                </ul>
-            </c:if>
-        </div>
-
-
     </div>
-
 </div>
-
+<!--@Atom Group: replace with twitter modal-->
 <fmt:message key="page.widget.comment.edit" var="editCommentTitle"/>
-<div id="editComment-dialog" title="<c:out value="${editCommentTitle}"/>" 
style="display: none;">
-    <textarea id="editComment" rows="3" cols="50"> </textarea>
+<div id="editComment-dialog" title="<c:out value="${editCommentTitle}"/>" 
class="modal hide">
+    <div class="modal-header">
+        <a class="close" data-dismiss="modal"><i class="icon-remove"></i></a>
+        <h3><c:out value="${editCommentTitle}"/></h3>
+    </div>
+    <div class="modal-body">
+        <textarea id="editComment" rows="5"> </textarea>
+    </div>
+    <div class="modal-footer">
+        <a href="#" class="btn" data-dismiss="modal">Cancel</a>
+            <button id="updateComment" value="Update" class="btn 
btn-primary">Update</button>
+        </a>
+    </div>
 </div>
 
 <portal:register-init-script location="${'AFTER_RAVE'}">

Modified: 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/css/default.css
URL: 
http://svn.apache.org/viewvc/rave/branches/bootstrap/rave-portal-resources/src/main/webapp/css/default.css?rev=1328521&r1=1328520&r2=1328521&view=diff
==============================================================================
--- 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/css/default.css 
(original)
+++ 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/css/default.css 
Fri Apr 20 21:48:56 2012
@@ -489,12 +489,35 @@ header h1{
     margin: 0 0 1em 2%;
     float: right;
 }
+.detail-widget{ padding-top: 20px; }
 
+.detail-widget-preview {
+    text-align: center;
+    float:right;
+}
+.detail-widget-preview img{
+    margin-bottom: 15px;
+}
+.detail-widget-main > .row-fluid{
+    margin-bottom: 20px;
+}
+
+.detail-widget-tags {
+    margin-bottom: 20px;
+}
+.detail-widget-tags .label{
+    width: auto;
+    float: none;
+    display: inline;
+}
 .detailWidgetScreenshot img, .detailWidgetThumbnail img {
     max-width: 100%;
     margin-bottom: 1em;
 }
-
+.widgetTags .form-inline label{
+    display:block;
+    font-weight: bold;
+}
 .detailWidgetThumbnail {
     display: none;
 }
@@ -506,15 +529,30 @@ header h1{
 .new-comment textarea {
     max-width: 95%;
 }
-
+#editComment-dialog textarea{ width: 98%;}
+ul.comments{
+    margin-left: 0;
+}
 .comment {
     margin: 1em 0 2em 0;
 }
 
 ul.comments li {
     list-style: none;
+    border-bottom: 1px solid #ddd;
+}
+ul.comments li:last-child{
+    border-bottom: none;
+}
+.comment-heading{
+    font-size: 1.25em;
+}
+.comment-heading span + .btn{
+    margin-left: 20px;
+}
+.commenter {
+    font-weight: bold;
 }
-
 ul.storeItems {
     padding: 0;
     margin: 1em auto;

Modified: 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/script/rave_store.js
URL: 
http://svn.apache.org/viewvc/rave/branches/bootstrap/rave-portal-resources/src/main/webapp/script/rave_store.js?rev=1328521&r1=1328520&r2=1328521&view=diff
==============================================================================
--- 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/script/rave_store.js
 (original)
+++ 
rave/branches/bootstrap/rave-portal-resources/src/main/webapp/script/rave_store.js
 Fri Apr 20 21:48:56 2012
@@ -96,41 +96,42 @@ rave.store = rave.store || (function() {
                                                 successCallback: function() { 
window.location.reload(); }});
         });
 
-        $(".commentEditButton").button( {
-            icons: {primary: "ui-icon-pencil"},
-            text: false
-        }).click(function() {
+        $(".commentEditButton").click(function() {
             var commentId = this.id.substring("comment-edit-".length);
             var widgetId = this.getAttribute('data-widgetid');
-            var commentText = $(this).parent().find(".commentText").text();
-            $("#editComment").text(commentText);
-            $("#editComment-dialog").dialog({
-               autoOpen: true,
-               height: 150,
-               width: 350,
-               modal: true,
-               buttons : [
-                    {
-                        text : rave.getClientMessage("common.update"),
-                        click : function() {
-                           rave.api.rest.updateWidgetComment({widgetId: 
widgetId,
-                                                            commentId: 
commentId,
-                                                            text: 
$("#editComment").get(0).value,
-                                                            successCallback: 
function() { window.location.reload(); }
-                                                        })
-                        }
-                    }
-               ]
-            });
+            var commentText = 
$(this).parents(".comment").find(".commentText").text();
+            $("#editComment").html(commentText);
+            $("#editComment-dialog #updateComment").click( function(){
+                rave.api.rest.updateWidgetComment({widgetId: widgetId,
+                    commentId: commentId,
+                    text: $("#editComment").get(0).value,
+                    successCallback: function() { window.location.reload(); }
+                });
+            }).html(rave.getClientMessage("common.update"));
         });
     }
 
     function initTags(widgetId) {
+        $('*[data-toggle="basic-slide"]').click(function(){
+            var target;
+
+            if($(this).attr("data-target")){
+                target = $(this).attr("data-target");
+                console.log($(this).attr("data-target"));
+            }
+            else{
+                target = $(this).attr("href");
+                console.log("else");
+            }
 
-        $(".tagNewButton").button({
-            icons:{primary:"ui-icon-disk"},
-            text:false
-        }).click(function () {
+            if($(this).attr('data-toggle-text')){
+                var oldcontent = $(this).html();
+                $(this).html($(this).attr('data-toggle-text'));
+                $(this).attr('data-toggle-text',oldcontent);
+            }
+            $(target).slideToggle();
+        });
+        $(".tagNewButton").click(function () {
                 var widgetId = this.id.substring("tag-new-".length);
                 rave.api.rest.createWidgetTag({widgetId:widgetId,
                     text:$("#tags").get(0).value,
@@ -147,8 +148,7 @@ rave.store = rave.store || (function() {
                         value:tag.keyword
                     }
                 }));
-
-                $("#tags").autocomplete({
+                $("#tags").typeahead({
                     source:result
                 })
             }


Reply via email to