[Bps-public-commit] RT-Extension-PreviewInSearch branch, master, updated. 47c816f4afd7dd7b17546ddb50666a4d5591981c
Wallace Reis
wreis at bestpractical.com
Thu Nov 6 15:40:44 EST 2014
The branch, master has been updated
via 47c816f4afd7dd7b17546ddb50666a4d5591981c (commit)
via 97a51b5af2992a481463fa4e18808b85313b09cf (commit)
via 8a290c2cd0bb93dd682f0302c120724f650cfa98 (commit)
via fa6c6a87ffde5a79be6a9216a7c3527b7a480fe7 (commit)
via 283f211822d4e28b6a6acf5f6c4d63d60852ceeb (commit)
from 3091b700107a6bab66c1b04cf6ea5803a90ab5ea (commit)
Summary of changes:
.../Search/Results.html/AfterResults | 27 ++++++++++++++++++----
lib/RT/Extension/PreviewInSearch.pm | 10 +++++++-
2 files changed, 32 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit 283f211822d4e28b6a6acf5f6c4d63d60852ceeb
Author: Wallace Reis <wreis at bestpractical.com>
Date: Thu Nov 6 15:00:34 2014 -0300
Add SideBySidePreview option
This allow the preview box to be displayed aside of search results box.
diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
index bba9a63..3af994f 100644
--- a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
+++ b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
@@ -1,5 +1,21 @@
<style>
tr.in-preview td { background: #ffb }
+% if ( RT->Config->Get('SideBySidePreview') ) {
+table.collection-as-table-smaller-left {
+ position: relative;
+ width: 43%;
+}
+#ticket-preview-container {
+ float: right;
+ width: 56%;
+ margin-top: -137%;
+}
+ at -moz-document url-prefix() {
+ #ticket-preview-container {
+ margin-top: -102%;
+ }
+}
+% }
</style>
<div id="ticket-preview-container" ></div>
<script type="text/javascript">
@@ -28,6 +44,9 @@ jQuery(function(){
jQuery('html, body').animate({
scrollTop: '+='+(jQuery("#ticket-preview-container").offset().top-jQuery(window).scrollTop())
}, 1000);
+% if ( RT->Config->Get('SideBySidePreview') ) {
+ jQuery('table.collection-as-table').addClass('collection-as-table-smaller-left');
+% }
});
});
</script>
commit fa6c6a87ffde5a79be6a9216a7c3527b7a480fe7
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Nov 7 03:04:54 2014 +0800
fix sidebyside css to make preview box show in parallel with search results
diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
index 3af994f..03a30f7 100644
--- a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
+++ b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
@@ -2,18 +2,16 @@
tr.in-preview td { background: #ffb }
% if ( RT->Config->Get('SideBySidePreview') ) {
table.collection-as-table-smaller-left {
- position: relative;
+ float: left;
width: 43%;
}
#ticket-preview-container {
- float: right;
- width: 56%;
- margin-top: -137%;
+ position: fixed;
+ left: 45%;
+ right: 3%;
}
- at -moz-document url-prefix() {
- #ticket-preview-container {
- margin-top: -102%;
- }
+.refresh {
+ clear: both;
}
% }
</style>
@@ -41,11 +39,13 @@ jQuery(function(){
.load( url, function (response, status, xhr) {
console.log(status);
} );
+% if ( RT->Config->Get('SideBySidePreview') ) {
+ jQuery('table.collection-as-table').addClass('collection-as-table-smaller-left');
+% }
+% else {
jQuery('html, body').animate({
scrollTop: '+='+(jQuery("#ticket-preview-container").offset().top-jQuery(window).scrollTop())
}, 1000);
-% if ( RT->Config->Get('SideBySidePreview') ) {
- jQuery('table.collection-as-table').addClass('collection-as-table-smaller-left');
% }
});
});
commit 8a290c2cd0bb93dd682f0302c120724f650cfa98
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Thu Nov 6 12:23:43 2014 -0800
Fix the position in the viewport
diff --git a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
index 03a30f7..7edb7b9 100644
--- a/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
+++ b/html/Callbacks/RT-Extension-PreviewInSearch/Search/Results.html/AfterResults
@@ -2,16 +2,18 @@
tr.in-preview td { background: #ffb }
% if ( RT->Config->Get('SideBySidePreview') ) {
table.collection-as-table-smaller-left {
- float: left;
width: 43%;
}
#ticket-preview-container {
position: fixed;
+ top: 10em;
left: 45%;
- right: 3%;
-}
-.refresh {
- clear: both;
+ right: 0;
+ bottom: 0;
+ overflow-y: auto;
+ background: inherit;
+ z-index: 10;
+ display: none;
}
% }
</style>
@@ -36,13 +38,11 @@ jQuery(function(){
row.siblings('tr').removeClass('in-preview');
row.addClass('in-preview');
jQuery('#ticket-preview-container').text(<% loc('Loading...') |n,j %>)
- .load( url, function (response, status, xhr) {
- console.log(status);
- } );
+ .load( url );
% if ( RT->Config->Get('SideBySidePreview') ) {
jQuery('table.collection-as-table').addClass('collection-as-table-smaller-left');
-% }
-% else {
+ jQuery('#ticket-preview-container').show();
+% } else {
jQuery('html, body').animate({
scrollTop: '+='+(jQuery("#ticket-preview-container").offset().top-jQuery(window).scrollTop())
}, 1000);
@@ -53,4 +53,4 @@ jQuery(function(){
<%ARGS>
</%ARGS>
<%INIT>
-</%INIT>
\ No newline at end of file
+</%INIT>
commit 97a51b5af2992a481463fa4e18808b85313b09cf
Author: Wallace Reis <wreis at bestpractical.com>
Date: Thu Nov 6 17:39:35 2014 -0300
Add docs for SideBySidePreview
diff --git a/lib/RT/Extension/PreviewInSearch.pm b/lib/RT/Extension/PreviewInSearch.pm
index 6e80bd1..f5c394a 100644
--- a/lib/RT/Extension/PreviewInSearch.pm
+++ b/lib/RT/Extension/PreviewInSearch.pm
@@ -64,6 +64,14 @@ Starting with RT 4.2 you can also use:
=cut
+=head1 CONFIGURATION
+
+=head2 C<$SideBySidePreview>
+
+This allow the preview box to be displayed aside of search results box.
+
+ Set($SideBySidePreview, 1);
+
=head1 AUTHOR
Ruslan Zakirov E<lt>ruz at bestpractical.comE<gt>
@@ -85,4 +93,4 @@ This is free software, licensed under:
=cut
-1;
\ No newline at end of file
+1;
commit 47c816f4afd7dd7b17546ddb50666a4d5591981c
Merge: 3091b70 97a51b5
Author: Wallace Reis <wreis at bestpractical.com>
Date: Thu Nov 6 17:40:23 2014 -0300
Merge branch 'side-by-side-preview'
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list