Skip to content

Instantly share code, notes, and snippets.

@mikedfunk
Created October 27, 2011 19:33
Show Gist options
  • Save mikedfunk/1320603 to your computer and use it in GitHub Desktop.
Save mikedfunk/1320603 to your computer and use it in GitHub Desktop.
loading in, loading out
/**
* Admin Scripts
*
* All javascript related to Xulon Press admin.
*
* @license Copyright Xulon Press, Inc. All Rights Reserved.
* @author Xulon Press
* @link http://xulonpress.com
* @email info@xulonpress.com
*
* @file admin_scripts.js
* @version 1.0
* @date 09/22/2011
*
* Copyright (c) 2011
*/
// --------------------------------------------------------------------------
/**
* defaults
*/
var admin_dir = '';
var last_row_count = '';
var form_array = [];
var selected_rows = [];
var success_array = [];
var errors_array = [];
var keys = {};
var select_last_row = false;
// --------------------------------------------------------------------------
// !tested
/**
* loading_in function.
*
* @return void
*/
var loading_in = function($this)
{
if ($this !== undefined)
{
var the_html = $this.html();
$this.data('the_content', the_html);
$this.addClass('disabled');
$this.html('Loading...');
}
}
// --------------------------------------------------------------------------
// !tested
/**
* loading_out function.
*
* @return void
*/
var loading_out = function($this)
{
if ($this !== undefined)
{
var content = $this.data('the_content');
$this.html(content);
$this.removeClass('disabled');
}
}
// --------------------------------------------------------------------------
/* End of file admin_scripts.js */
/* Location: ./booktrack/assets/scripts/admin_scripts.js */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment