[Bps-public-commit] RT-Extension-FeaturedTickets branch, master, updated. d23543073e4578996fc13510e6b0307b63cb4a29

Craig Kaiser craig at bestpractical.com
Tue Mar 20 21:05:16 EDT 2018


The branch, master has been updated
       via  d23543073e4578996fc13510e6b0307b63cb4a29 (commit)
       via  4803eeab21ba8d1ccd56b5252147392ae7ab2f64 (commit)
      from  5cb70033b71549f8a2b5087fa2b506f2d674d8e8 (commit)

Summary of changes:
 .../FeaturedTickets/Elements/Tabs/Privileged       | 35 --------
 html/NoAuth/Featured/index.html                    | 54 ++----------
 lib/RT/Extension/FeaturedTickets.pm                |  7 --
 static/css/featured-tickets.css                    | 97 +++++++++++++++++++++-
 4 files changed, 105 insertions(+), 88 deletions(-)
 delete mode 100644 html/Callbacks/FeaturedTickets/Elements/Tabs/Privileged

- Log -----------------------------------------------------------------
commit 4803eeab21ba8d1ccd56b5252147392ae7ab2f64
Author: craig Kaiser <craig at bestpractical.com>
Date:   Tue Mar 20 16:29:18 2018 -0400

    Remove ticket clone feature

diff --git a/html/Callbacks/FeaturedTickets/Elements/Tabs/Privileged b/html/Callbacks/FeaturedTickets/Elements/Tabs/Privileged
deleted file mode 100644
index 604f0c5..0000000
--- a/html/Callbacks/FeaturedTickets/Elements/Tabs/Privileged
+++ /dev/null
@@ -1,35 +0,0 @@
-
-<%init>
-return unless RT::Extension::FeaturedTickets::IsStaff($session{'CurrentUser'});
-
-my $args = $DECODED_ARGS;
-my $id = $args->{id};
-
-my $queue = RT::Queue->new($session{'CurrentUser'});
-my ($ret, $msg) = $queue->Load(RT->Config->Get('FeaturedTicketsQueue'));
-return ($ret, $msg) unless $ret;
-
-my $ticket = RT::Ticket->new($session{'CurrentUser'});
-($ret, $msg) = $ticket->Load( $id );
-return ($ret, $msg) unless $ret;
-
-my %params = (
-    Queue          => $queue->Name,
-    Subject        => $ticket->Subject,
-    'CustomField-' . $ticket->LoadCustomFieldByIdentifier('Description')->Id  => $ticket->FirstCustomFieldValue('Description'),
-    TimeEstimated  => $ticket->TimeEstimated,
-);
-
-my $url = RT->Config->Get('WebURL') . "/Ticket/Create.html?"
-        . $m->comp("/Elements/QueryString", %params);
-
-if ( $ticket->QueueObj->Name ne $queue->Name ) {
-    if (my $actions = PageMenu->child('actions')) {
-        $actions->child('Feature Ticket' =>
-            title => loc('Feature Ticket'),
-            path  => $url,
-        );
-    }
-}
-
-</%init>
diff --git a/lib/RT/Extension/FeaturedTickets.pm b/lib/RT/Extension/FeaturedTickets.pm
index 0cb8176..be8ef13 100644
--- a/lib/RT/Extension/FeaturedTickets.pm
+++ b/lib/RT/Extension/FeaturedTickets.pm
@@ -6,13 +6,6 @@ our $VERSION = '0.01';
 
 RT->AddStyleSheets("featured-tickets.css");
 
-sub IsStaff {
-    my $cu = shift;
-
-    my $group = RT::Group->new($cu);
-    $group->LoadUserDefinedGroup('BPS Staff');
-    return $group->HasMemberRecursively($cu->UserObj->PrincipalObj);
-}
 
 =head1 NAME
 

commit d23543073e4578996fc13510e6b0307b63cb4a29
Author: craig Kaiser <craig at bestpractical.com>
Date:   Tue Mar 20 21:04:00 2018 -0400

    Update Styling

diff --git a/html/NoAuth/Featured/index.html b/html/NoAuth/Featured/index.html
index 65a1639..cee64bc 100644
--- a/html/NoAuth/Featured/index.html
+++ b/html/NoAuth/Featured/index.html
@@ -27,44 +27,6 @@
         <script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
     <![endif]-->
 <!-- Add google analytics tags here -->
-    <style>
-        .modal {
-            display: none; /* Hidden by default */
-            position: fixed; /* Stay in place */
-            z-index: 1; /* Sit on top */
-            left: 0;
-            top: 0;
-            width: 100%; /* Full width */
-            height: 100%; /* Full height */
-            overflow: auto; /* Enable scroll if needed */
-            background-color: rgb(0,0,0); /* Fallback color */
-            background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
-        }
-
-        /* Modal Content/Box */
-        .modal-content {
-            background-color: #fefefe;
-            margin: 15% auto; /* 15% from the top and centered */
-            padding: 20px;
-            border: 1px solid #888;
-            width: 80%; /* Could be more or less, depending on screen size */
-        }
-
-        /* The Close Button */
-        .close {
-            color: #aaa;
-            float: right;
-            font-size: 28px;
-            font-weight: bold;
-        }
-
-        .close:hover,
-        .close:focus {
-            color: black;
-            text-decoration: none;
-            cursor: pointer;
-        }
-    </style>
 </head>
 <body>
 
@@ -82,14 +44,14 @@
 <!-- The Modal -->
 <div id="myModal" class="modal">
     <!-- Modal content -->
-    <div class="modal-content">
-        <div id='sponsor-subject'></div>
-        <div id='sponsor-details'></div>
-        <div id='sponsor-goal'></div>
+    <div class="modal-content details">
+        <h1 class='sponsor-header'>Sponsor This Feature!</h1>
+        <h1 id='sponsor-subject'></h1>
+        <h3 id='sponsor-details'></h3>
+        <h2 id='sponsor-goal'></h2>
 
         <div>
-            <p>I Want To Contribute</p>
-            <form action="/NoAuth/Featured">
+            <form class='box' action="/NoAuth/Featured">
                 <input placeholder="Name" name="Name" type="text">
                 <input placeholder="Email" type="email" name="Email" required>
                 <input placeholder="Contribution Amount" name="Amount">
@@ -147,7 +109,9 @@
                     <li>Awesome point 1</li>
                     <li>Awesome point 2</li>
 %   if ( $ticket->FirstCustomFieldValue('Funded') ) {
-        <li>Funded!</li>
+    <div class='ribbon-wrapper'>
+        <div class='ribbon'>Funded!</div>
+    </div>
 %   }
                 </ul>
 %   my $args = {'ticket_id' => $ticket->Id, 'Subject' => $ticket->Subject, 'Goal' => $ticket->FirstCustomFieldValue('Goal'), 'Details' => $ticket->FirstCustomFieldValue('Description') };
diff --git a/static/css/featured-tickets.css b/static/css/featured-tickets.css
index 04bbf0c..278efa9 100644
--- a/static/css/featured-tickets.css
+++ b/static/css/featured-tickets.css
@@ -103,6 +103,7 @@ p {
     border: 1px solid #ddd;
     margin: 0 0.5em 2em;
     padding: 0 0 3em;
+    position: relative;
 }
 
 /*
@@ -110,7 +111,7 @@ p {
  * Choose a different color based on the type of pricing table.
  */
 .pricing-table-free .pricing-table-header {
-    background: #519251;
+    background: #006699;
 }
 
 .pricing-table-biz .pricing-table-header {
@@ -241,4 +242,98 @@ p {
     .banner-head {
         font-size: 3em;
     }
+
+/*
+ * -- DETAILS POP-UP --
+ */
+ .modal {
+    display: none; /* Hidden by default */
+    position: fixed; /* Stay in place */
+    z-index: 1; /* Sit on top */
+    left: 0;
+    top: 0;
+    width: 100%; /* Full width */
+    height: 100%; /* Full height */
+    overflow: auto; /* Enable scroll if needed */
+    background-color: rgb(0,0,0); /* Fallback color */
+    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
+}
+
+/* Modal Content/Box */
+.modal-content {
+    background-color: #fefefe;
+    margin: 15% auto; /* 15% from the top and centered */
+    padding: 20px;
+    border: 1px solid #888;
+    width: 80%; /* Could be more or less, depending on screen size */
+}
+
+/* The Close Button */
+.close {
+    color: #aaa;
+    float: right;
+    font-size: 28px;
+    font-weight: bold;
+}
+
+.close:hover,
+.close:focus {
+    color: black;
+    text-decoration: none;
+    cursor: pointer;
+    }
+
+ .details {
+    width: 50%;
+    margin: center;
+    padding: 35px;
+    border: 2px solid #006699;
+    border-radius: 20px/50px;
+    background-clip: padding-box;
+    text-align: center;
+  }
+
+  .sponsor-header {
+    color: #006699;
+    padding: 5px;
+    text-align: center;
+  }
+
+/*
+ * -- FUNDED SASH --
+ */
+ .ribbon-wrapper {
+    width: 85px;
+    height: 88px;
+    overflow: hidden;
+    position: absolute;
+    top: -3px;
+    right: -3px;
+    }
+
+ .ribbon {
+    font: bold 15px Sans-Serif;
+    color: #333;
+    text-align: center;
+    text-shadow: rgba(255, 255, 255, 0.5) 0px 1px 0px;
+    -webkit-transform: rotate(45deg);
+    -moz-transform: rotate(45deg);
+    -ms-transform: rotate(45deg);
+    -o-transform: rotate(45deg);
+    position: relative;
+    padding: 7px 0;
+    left: -5px;
+    top: 15px;
+    width: 120px;
+    background-color: #006699;
+    background-image: -webkit-gradient(linear, left top, left bottom, from(#006699), to(#33b4ce));
+    background-image: -webkit-linear-gradient(top, #006699, #33b4ce);
+    background-image: -moz-linear-gradient(top, #006699, #33b4ce);
+    background-image: -ms-linear-gradient(top, #006699, #33b4ce);
+    background-image: -o-linear-gradient(top, #006699, #33b4ce);
+    color: #e0f2f2;
+    -webkit-box-shadow: 0px 0px 3px rgba(51, 30, 170, 0.3);
+    -moz-box-shadow: 0px 0px 3px rgba(51, 30, 170, 0.3);
+    box-shadow: 0px 0px 3px rgba(51, 30, 170, 0.3);
+    }
 }

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list