Skip to content

Commit

Permalink
Merge branch 'release-2.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
archetyped committed Nov 5, 2013
2 parents 01dae4b + ffce20b commit 1d8bf58
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 deletions.
3 changes: 3 additions & 0 deletions client/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
html.slb_overlay object, html.slb_overlay embed, html.slb_overlay iframe {
visibility: hidden;
}
16 changes: 13 additions & 3 deletions client/js/lib.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -2061,6 +2061,7 @@ var Viewer = {
//Get theme output
var v = this;
var thm = this.get_theme();
v.dom_prep();
//Register theme event handlers
if ( !this.get_status('render-events') ) {
this.set_status('render-events');
Expand Down Expand Up @@ -2193,12 +2194,21 @@ var Viewer = {
thm.render(true);
},

/**
* Prepare DOM for viewer
*/
dom_prep: function(mode) {
var m = ( this.util.is_bool(mode) && !mode ) ? 'removeClass' : 'addClass';
$('html')[m](this.util.add_prefix('overlay'));
},

/**
* Restore DOM
* Show overlapping DOM elements, etc.
* @TODO Build functionality
* Required after viewer is closed
*/
dom_restore: function() {},
dom_restore: function() {
this.dom_prep(false);
},

/* Layout */

Expand Down
5 changes: 5 additions & 0 deletions client/sass/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
html.slb_overlay {
object,embed,iframe {
visibility: hidden;
}
}
7 changes: 7 additions & 0 deletions controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ class SLB_Lightbox extends SLB_Base {
'in_footer' => true,
),
);

var $styles = array (
'core' => array (
'file' => 'client/css/app.css',
'context' => array('public'),
)
);

/**
* Fields
Expand Down
6 changes: 5 additions & 1 deletion includes/class.base_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ protected function get_file($type, $handle, $format = null) {
if ( !$this->util->is_uri($ret) ) {
$ret = $this->util->normalize_path(site_url(), $ret);
}
$ret = file_get_contents($ret);
$ch = curl_init($ret);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$ret = curl_exec($ch);
curl_close($ch);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Simple Lightbox
Plugin URI: http://archetyped.com/tools/simple-lightbox/
Description: The highly customizable lightbox for WordPress
Version: 2.1.2
Version: 2.1.3
Author: Archetyped
Author URI: http://archetyped.com
Support URI: https://github.com/archetyped/simple-lightbox/wiki/Reporting-Issues
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ Get more information on [Simple Lightbox's official page](http://archetyped.com/
3. Dark Theme

== Changelog ==
= 2.1.3 =
* Fix: PHP configuration issue on some web hosts (Tim's got (config) issues)
* Optimize: Hide overlapping elements when lightbox is displayed (e.g. Flash, etc.)

= 2.1.2 =
* Fix: Incorrect paths when WP in subdirectory (Kim's Van Repair)

Expand Down

0 comments on commit 1d8bf58

Please sign in to comment.