[Rt-commit] rt branch, 4.2/user-accordion, created. rt-4.1.17-2-g3a2b34d
Alex Vandiver
alexmv at bestpractical.com
Thu Jul 11 15:19:00 EDT 2013
The branch, 4.2/user-accordion has been created
at 3a2b34d0367fe0e95b6a81fb41789bcf227ffbd8 (commit)
- Log -----------------------------------------------------------------
commit 3a2b34d0367fe0e95b6a81fb41789bcf227ffbd8
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Jul 11 15:18:15 2013 -0400
Generalize requestor accordion to a "user accordion"
diff --git a/share/html/Ticket/Elements/ShowRequestor b/share/html/Ticket/Elements/ShowRequestor
index fb19662..3dfe177 100644
--- a/share/html/Ticket/Elements/ShowRequestor
+++ b/share/html/Ticket/Elements/ShowRequestor
@@ -45,34 +45,24 @@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
+% if ($ShowTickets) {
<script type="text/javascript">
jQuery(function() {
- jQuery("#requestor-accordion").accordion({
- active: <% $count == 1 ? 0 : 'false' %>,
- collapsible: true,
- heightStyle: 'content',
- header: "h3"
- }).find("h3 a.user-summary").click(function(ev){
- ev.stopPropagation();
- return true;
- });
-
-% if ($ShowTickets) {
jQuery(".more-about-requestor-tickets").tabs({
cache: true,
collapsible: true,
selected: <% $selected %>
});
-% }
});
</script>
+% }
<&| /Widgets/TitleBox,
title_raw => loc("More about the requestors"),
class => 'ticket-info-requestor'
&>
-<div id="requestor-accordion" class="rt-accordion">
+<div id="requestor-accordion" class="user-accordion">
% while ( my $requestor = $people->Next ) {
<h3><a href="#"><& /Elements/ShowUser, User => $requestor, Link => 0 &></a>
diff --git a/share/static/css/base/accordion.css b/share/static/css/base/accordion.css
index 1e91259..6737579 100644
--- a/share/static/css/base/accordion.css
+++ b/share/static/css/base/accordion.css
@@ -1,8 +1,8 @@
-.rt-accordion {
+.user-accordion {
margin: 0;
}
-.rt-accordion .ui-accordion-content {
+.user-accordion .ui-accordion-content {
padding: 0 0 0 20px;
margin: 0 0 0.5em 0;
border: none;
@@ -10,27 +10,44 @@
color: black;
}
-.rt-accordion .ui-accordion-header .ui-icon {
+.user-accordion .ui-accordion-header .ui-icon {
background-image: url(../../../static/images/jquery_ui/ui-icons_2e83ff_256x240.png);
left: 0;
}
-.rt-accordion .ui-accordion-header {
+.user-accordion .ui-accordion-header {
padding: 0;
background: none;
}
-.rt-accordion .ui-accordion-header, .rt-accordion .ui-accordion-header a {
+.user-accordion .ui-accordion-header, .user-accordion .ui-accordion-header a {
color: black;
border: none;
margin: 0;
}
-.rt-accordion .ui-accordion-header a {
+.user-accordion .ui-accordion-header a {
padding: 0 0 0.25em 20px;
}
-.rt-accordion .ui-accordion-header a:hover,
-.rt-accordion .ui-accordion-header.ui-state-active a {
+.user-accordion .ui-accordion-header a:hover,
+.user-accordion .ui-accordion-header.ui-state-active a {
text-decoration: underline;
}
+
+
+
+.user-accordion h3 {
+ position: relative;
+}
+.user-accordion a.user-summary {
+ position: absolute;
+ right: 0;
+ text-decoration: none;
+}
+.user-accordion a.user-summary:hover { text-decoration: underline }
+
+.user-accordion a.modify-user {
+ font-size: 80%;
+ color: black !important;
+}
diff --git a/share/static/css/base/ticket.css b/share/static/css/base/ticket.css
index b074aa8..7345f27 100644
--- a/share/static/css/base/ticket.css
+++ b/share/static/css/base/ticket.css
@@ -1,18 +1,3 @@
-#requestor-accordion h3 {
- position: relative;
-}
-#requestor-accordion a.user-summary {
- position: absolute;
- right: 0;
- text-decoration: none;
-}
-#requestor-accordion a.user-summary:hover { text-decoration: underline }
-
-#requestor-accordion a.modify-user {
- font-size: 80%;
- color: black !important;
-}
-
/* More about requestor ticket lists */
.more-about-requestor-tickets {
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 8b91092..bd78392 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -323,3 +323,18 @@ function addprincipal_onchange(ev, ui) {
function escapeCssSelector(str) {
return str.replace(/([^A-Za-z0-9_-])/g,'\\$1');
}
+
+
+jQuery(function() {
+ jQuery(".user-accordion").each(function(){
+ jQuery(this).accordion({
+ active: (jQuery(this).find("h3").length == 1 ? 0 : false),
+ collapsible: true,
+ heightStyle: "content",
+ header: "h3"
+ }).find("h3 a.user-summary").click(function(ev){
+ ev.stopPropagation();
+ return true;
+ });
+ });
+});
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list