Skip to content

Commit

Permalink
Restructure
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Chatfield <[email protected]>
  • Loading branch information
danielchatfield committed Apr 15, 2012
1 parent 0af2ec1 commit f3f672d
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 7 deletions.
1 change: 0 additions & 1 deletion README

This file was deleted.

2 changes: 1 addition & 1 deletion _classes/lavaPrivateBlogAccessLogsPage.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
class lavaPrivateBlogAccessLogsPage extends lavaTablePage
class lavaPrivateBlogAccessLogsPage extends lavaAdvancedTablePage
{

}
Expand Down
65 changes: 65 additions & 0 deletions lava/_classes/lavaAdvancedTablePage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

<?php
class lavaAdvancedTablePage extends lavaPage
{
public $dataSource;
public $dataCache;
public $displayOrder = array();


function loadPage() {
$this->addAction( "toolbarButtons" );
$this->_pages()->addScript( $this->_slug( "lavaTableScripts" ), "lava/_static/table_scripts.js", array( "jquery" ) );
}

function setDataSource( $dataSource )
{
$this->dataSource = $dataSource;
return $this->_pages( false );
}

function setDisplayOrder( $displayString )
{
$this->displayOrder = explode( ";", $displayString );
$dataSourceSlug = $this->dataSource;
$hookTag = "_dataSourceAjax_row/dataSource:{$dataSourceSlug}";
$this->addFilter( $hookTag, "doDisplayOrder" );
return $this->_pages( false );
}

function setOrderBy( $order ) {
$this->_tables()->fetchTable( $this->dataSource )->setOrderBy( $order );
return $this->_pages( false );
}

function displayPage() {
if( is_null( $this->dataSource ) ) {
$this->dieWith( "No data source specified for this page" );
}
$this->doTablePage();
}

function doTablePage() {
//$this->setHiddenField( "" )
?>
<div class="lava-layout lava-layout-full-width bleed-left bleed-right">
<div class="lava-inset-module lava-filters">

</div>
</div>
<?php
}


function toolbarButtons()
{
?>
<div class="toolbar-block toolbar-overground">
<button class="lava-btn lava-btn-action lava-btn-inline lava-btn-action-white lava-table-loader-refresh-button" data-clicked-text="<?php _e( "Refreshing", $this->_framework() ) ?>"><?php _e( "Refresh", $this->_framework() ) ?></button>
<button class="lava-btn lava-btn-action lava-btn-inline lava-btn-action-white lava-btn-form-submit lava-btn-confirmation not-implemented" data-form="lava-table-reset" data-clicked-text="<?php _e( "Resetting", $this->_framework() ) ?>"><?php _e( "Reset Settings", $this->_framework() ) ?></button>
</div>
<?php
}

}
?>
2 changes: 1 addition & 1 deletion lava/_classes/lavaMiscFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function versionMatch( $ver1, $ver2 = null ) {
if( $ver1 == $ver2 ) {
return true;
}
return fasle;
return false;
}

function userAgentInfo() {
Expand Down
1 change: 1 addition & 0 deletions lava/_classes/lavaPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function lavaConstruct()
//$this->addStyle( $this->_slug( "colorpicker-theme" ), "lava/_static/colorpicker/colorpicker.css" );

$this->addScript( $this->_slug( "lavaScripts" ), "lava/_static/scripts.js", array( "jquery" ) );
$this->addScript( $this->_slug( "lavaScriptsNew" ), "lava/_static/scripts_new.js", array( "jquery" ) );
$this->addScript( $this->_slug( "dropkick" ), "lava/_static/dropkick.js", array( "jquery" ) );
$this->addScript( $this->_slug( "modernizr" ), "lava/_static/modernizr.js" );
$this->addScript( $this->_slug( "tiptip" ), "lava/_static/tiptip.js", array( "jquery" ) );
Expand Down
2 changes: 2 additions & 0 deletions lava/_classes/lavaTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ function doInstall() {

$sql .= "\n);";
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');


dbDelta($sql);
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion lava/_static/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ function bindButtons() {
hideUnderground();
});
//not implemented buttons
jQuery(".lava-btn.not-implemented").addClass("lava-btn-disabled").addClass("tiptip-right").attr("title", "This feature hasn't been imlemented yet :(");
jQuery(".lava-btn.not-implemented").addClass("lava-btn-disabled").addClass("tiptip-right").attr("title", "This feature hasn't been implemented yet :(");
}

function bindSticky()
Expand Down
Empty file added lava/_static/scripts_new.js
Empty file.
Empty file added lava/_static/table_scripts.js
Empty file.
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: http://www.spiders-design.co.uk/donate/
Tags: password,protect,password protect,wordpress,blog, security
Requires at least: 3.3.1
Tested up to: 3.3.1
Stable tag: 3.9
Stable tag: 3.9.1

This plugin password protects your wordpress blog with a single password.

Expand Down
6 changes: 4 additions & 2 deletions vendor.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
class private_blog_vendor extends lavaExtension {

public $isLocal = false;
public $apiVersion = 1;

function init() {
Expand Down Expand Up @@ -161,7 +160,10 @@ function getInstallId() {
}

function getVendorUrl( $append = "" ) {
if( $this->isLocal ) {
if( ! defined( 'LAVA_API_IS_LOCAL' ) ) {
define( 'LAVA_API_IS_LOCAL', false );
}
if( LAVA_API_IS_LOCAL ) {
return "http://localhost:8082/" . $append;
} else {
return 'http://www.volcanicpixels.com/' . $append;
Expand Down

0 comments on commit f3f672d

Please sign in to comment.