Introduction
Introduction Statistics Contact Development Disclaimer Help
Fixed up lightbox display - warvox - VoIP based wardialing tool, forked from ra…
Log
Files
Refs
README
---
commit 4fc4e0581fc91a4856e94c089aa1f34c4f2aa001
parent 13450230bbbb5422710e2640661828c46f043df3
Author: HD Moore <[email protected]>
Date: Wed, 26 Dec 2012 23:47:14 -0600
Fixed up lightbox display
Diffstat:
M app/assets/javascripts/application… | 2 +-
M app/assets/javascripts/jquery.ligh… | 69 +++++++++++++++------------…
M app/helpers/application_helper.rb | 38 ++++++++++++++++-------------…
M app/views/analyze/view.html.erb | 6 +++---
M app/views/analyze/view_matches.htm… | 6 +++---
5 files changed, 60 insertions(+), 61 deletions(-)
---
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/app…
@@ -2,5 +2,5 @@
// This file is automatically included by javascript_include_tag :defaults
//= require jquery
//= require jquery_ujs
+//= require jquery.lightbox-0.5
//= require highcharts
-// require_tree
diff --git a/app/assets/javascripts/jquery.lightbox-0.5.js b/app/assets/javascr…
@@ -27,11 +27,11 @@
// Configuration related to navigation
fixedNavigation: false, …
// Configuration related to images
- imageLoading: 'images/lightbox-…
- imageBtnPrev: 'images/lightbox-…
- imageBtnNext: 'images/lightbox-…
- imageBtnClose: 'images/lightbox…
- imageBlank: 'images/lig…
+ imageLoading: '/assets/lightbox…
+ imageBtnPrev: '/assets/lightbox…
+ imageBtnNext: '/assets/lightbox…
+ imageBtnClose: '/assets/lightbo…
+ imageBlank: '/assets/li…
// Configuration related to container image box
containerBorderSize: 10, …
containerResizeSpeed: 400, // (i…
@@ -42,7 +42,7 @@
keyToClose: 'c', …
keyToPrev: 'p', …
keyToNext: 'n', …
- // Don�t alter these variables in any way
+ // Don't alter these variables in any way
imageArray: [],
activeImage: 0
},settings);
@@ -72,11 +72,11 @@
settings.imageArray.length = 0;
// Unset image active information
settings.activeImage = 0;
- // We have an image set? Or just an image? Let�s see i…
+ // We have an image set? Or just an image? Let's see i…
if ( jQueryMatchedObj.length == 1 ) {
settings.imageArray.push(new Array(objClicked.…
} else {
- // Add an Array (as many as we have), with hre…
+ // Add an Array (as many as we have), with hre…
for ( var i = 0; i < jQueryMatchedObj.length; …
settings.imageArray.push(new Array(jQu…
}
@@ -102,7 +102,7 @@
</div>
<div id="lightbox-loading">
<a href="#" id="lightb…
- <img src="../i…
+ <img src="..//…
</a>
</div>
</div>
@@ -115,7 +115,7 @@
</div>
<div id="lightbox-secNav">
<a href="#" id="lightb…
- <img src="../i…
+ <img src="..//…
</a>
</div>
</div>
@@ -125,7 +125,7 @@
*/
function _set_interface() {
// Apply the HTML markup into body tag
- $('body').append('<div id="jquery-overlay"></div><div …
+ $('body').append('<div id="jquery-overlay"></div><div …
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
@@ -144,7 +144,7 @@
}).show();
// Assigning click events in elements to close overlay
$('#jquery-overlay,#jquery-lightbox').click(function()…
- _finish(); …
+ _finish();
});
// Assign the _finish function to lightbox-loading-lin…
$('#lightbox-loading-link,#lightbox-secNav-btnClose').…
@@ -170,7 +170,7 @@
});
}
/**
- * Prepares image exibition; doing a image�s preloader to calc…
+ * Prepares image exibition; doing a image???s preloader to ca…
*
*/
function _set_image_to_view() { // show the loading
@@ -196,16 +196,16 @@
/**
* Perfomance an effect in the image container resizing it
*
- * @param integer intImageWidth The image�s width that will be…
- * @param integer intImageHeight The image�s height that will …
+ * @param integer intImageWidth The image???s width that will …
+ * @param integer intImageHeight The image???s height that wil…
*/
function _resize_container_image_box(intImageWidth,intImageHei…
// Get current width and height
var intCurrentWidth = $('#lightbox-container-image-box…
var intCurrentHeight = $('#lightbox-container-image-bo…
// Get the width and height of the selected image plus…
- var intWidth = (intImageWidth + (settings.containerBor…
- var intHeight = (intImageHeight + (settings.containerB…
+ var intWidth = (intImageWidth + (settings.containerBor…
+ var intHeight = (intImageHeight + (settings.containerB…
// Diferences
var intDiffW = intCurrentWidth - intWidth;
var intDiffH = intCurrentHeight - intHeight;
@@ -215,9 +215,9 @@
if ( $.browser.msie ) {
___pause(250);
} else {
- ___pause(100);
+ ___pause(100);
}
- }
+ }
$('#lightbox-container-image-data-box').css({ width: i…
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({…
};
@@ -246,7 +246,7 @@
// If we have a image set, display 'Image X of X'
if ( settings.imageArray.length > 1 ) {
$('#lightbox-image-details-currentNumber').htm…
- }
+ }
}
/**
* Display the button navigations
@@ -255,9 +255,9 @@
function _set_navigation() {
$('#lightbox-nav').show();
- // Instead to define this configuration in CSS file, w…
+ // Instead to define this configuration in CSS file, w…
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({…
-
+
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
@@ -281,7 +281,7 @@
});
}
}
-
+
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.len…
if ( settings.fixedNavigation ) {
@@ -346,7 +346,7 @@
}
// Verify the key to show the previous image
if ( ( key == settings.keyToPrev ) || ( keycode == 37 …
- // If we�re not showing the first image, call …
+ // If we???re not showing the first image, cal…
if ( settings.activeImage != 0 ) {
settings.activeImage = settings.active…
_set_image_to_view();
@@ -355,7 +355,7 @@
}
// Verify the key to show the next image
if ( ( key == settings.keyToNext ) || ( keycode == 39 …
- // If we�re not showing the last image, call t…
+ // If we???re not showing the last image, call…
if ( settings.activeImage != ( settings.imageA…
settings.activeImage = settings.active…
_set_image_to_view();
@@ -395,7 +395,7 @@
*/
function ___getPageSize() {
var xScroll, yScroll;
- if (window.innerHeight && window.scrollMaxY) {
+ if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMax…
yScroll = window.innerHeight + window.scrollMa…
} else if (document.body.scrollHeight > document.body.…
@@ -408,7 +408,7 @@
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
- windowWidth = document.documentElement…
+ windowWidth = document.documentElement…
} else {
windowWidth = self.innerWidth;
}
@@ -419,16 +419,16 @@
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
- }
+ }
// for small pages with total height less then height …
if(yScroll < windowHeight){
pageHeight = windowHeight;
- } else {
+ } else {
pageHeight = yScroll;
}
// for small pages with total width less then width of…
- if(xScroll < windowWidth){
- pageWidth = xScroll;
+ if(xScroll < windowWidth){
+ pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
@@ -451,7 +451,7 @@
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
- xScroll = document.body.scrollLeft;
+ xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
@@ -461,7 +461,7 @@
*
*/
function ___pause(ms) {
- var date = new Date();
+ var date = new Date();
curDate = null;
do { var curDate = new Date(); }
while ( curDate - date < ms);
@@ -469,4 +469,4 @@
// Return the jQuery object for chaining. The unbind method is…
return this.unbind('click').click(_initialize);
};
-})(jQuery); // Call and execute the function immediately passing the jQuery ob…
-\ No newline at end of file
+})(jQuery); // Call and execute the function immediately passing the jQuery ob…
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper…
@@ -2,33 +2,33 @@
module ApplicationHelper
def get_sections
-
+
count = 0
html = ""
asection = nil
- sections =
+ sections =
[
{ :name => 'Home', :link => '/', …
] },
{ :name => 'Jobs' , :link => '/dial_jobs/', …
- #
+ #
] },
{ :name => 'Results', :link => '/dial_results/', …
- #
+ #
] },
{ :name => 'Analysis', :link => '/analyze/', …
- #
- ] },
+ #
+ ] },
{ :name => 'Providers', :link => '/providers/', …
- #
+ #
] },
{ :name => 'About', :link => '/home/about/', …
- #
- ] }
+ #
+ ] }
]
-
+
html << "<div id='sections_container'>\n"
html << "<ul id='sections_ul'>\n"
sections.each do |section|
@@ -40,7 +40,7 @@ module ApplicationHelper
html << "<li><a #{lactive} href='#{section[:link]}'>#{…
end
html << "\n</ul></div>\n"
-
+
count = 0
html << "<div id='subsections_container'>\n"
html << "<ul id='subsections_ul'>\n"
@@ -50,21 +50,21 @@ module ApplicationHelper
html << "\n</ul></div>\n"
raw(html)
end
-
+
def select_tag_for_filter(nvpairs, params)
_url = ( url_for :overwrite_params => { }).split('?')[0]
- _html = %{<label for="show">Filter: </label>}
- _html << %{<select name="show" id="show"}
- _html << %{onchange="window.location='#{_url}' + '?show=' + this.val…
+ _html = %{<label for="show">Filter: </label> }
+ _html << %{<select name="show" id="show" }
+ _html << %{onchange="window.location='#{_url}' + '?show=' + this.val…
nvpairs.each do |pair|
- _html << %{<option value="#{pair[:scope]}"}
+ _html << %{<option value="#{pair[:scope]}" }
if params[:show] == pair[:scope] || ((params[:show].nil? || params…
- _html << %{ selected="selected"}
+ _html << %{ selected="selected" }
end
- _html << %{>#{pair[:label]}}
+ _html << %{>#{pair[:label]} }
_html << %{</option>}
end
_html << %{</select>}
raw(_html)
- end
+ end
end
diff --git a/app/views/analyze/view.html.erb b/app/views/analyze/view.html.erb
@@ -41,8 +41,8 @@
</td>
<td align='center'>
<b><%=h dial_result.line_type.upcase %></b><br/>
- <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
- <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
+ <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
+ <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
<% (dial_result.signatures||"").split("\n").each do |s|
sid,mat,name = s.split(':', 3)
str = [mat.to_i * 6.4, 255].min
@@ -63,6 +63,6 @@
<script type="text/javascript">
$(function() {
// Use this example, or...
- $('a[@rel*=lightbox]').lightBox();
+ $('a.lightbox').lightBox();
});
</script>
diff --git a/app/views/analyze/view_matches.html.erb b/app/views/analyze/view_m…
@@ -78,8 +78,8 @@
</td>
<td align='center'>
<b><%=h dial_result.line_type.upcase %></b><br/>
- <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
- <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
+ <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
+ <a href="<%=resource_analyze_path(@job_id, dial_result.id, "bi…
<% (dial_result.signatures||"").split("\n").each do |s|
sid,mat,name = s.split(':', 3)
str = [mat.to_i * 6.4, 255].min
@@ -98,6 +98,6 @@
<script type="text/javascript">
$(function() {
// Use this example, or...
- $('a[@rel*=lightbox]').lightBox();
+ $('a.lightbox').lightBox();
});
</script>
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.