Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1). Microhistory added in classes for modular code 2). Code is structured and camel casing of varables is done for removing linter warnings. 3). JQuery plugins are added in some files. 4). jQplot is working for server_status_queries and server_status_monitor. 5). Work started for Dabatase, SQl and Table files. Some changes are stll left for server_status_monitor and sql.js Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
- Loading branch information
1 parent
b4237ac
commit 8c986d8
Showing
49 changed files
with
5,100 additions
and
496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import CommonParams from '../variables/common_params'; | ||
import { AJAX } from '../ajax'; | ||
|
||
/** | ||
* Holds common parameters such as server, db, table, etc | ||
* | ||
* The content for this is normally loaded from Header.php or | ||
* Response.php and executed by ajax.js | ||
*/ | ||
export var PMA_commonActions = { | ||
/** | ||
* Saves the database name when it's changed | ||
* and reloads the query window, if necessary | ||
* | ||
* @param {string} newDb newDb The name of the new database | ||
* | ||
* @return {void} | ||
*/ | ||
setDb: function (newDb) { | ||
if (newDb !== CommonParams.get('db')) { | ||
CommonParams.setAll({ 'db': newDb, 'table': '' }); | ||
} | ||
}, | ||
/** | ||
* Opens a database in the main part of the page | ||
* | ||
* @param {string} newDb The name of the new database | ||
* | ||
* @return void | ||
*/ | ||
openDb: function (newDb) { | ||
CommonParams | ||
.set('db', newDb) | ||
.set('table', ''); | ||
this.refreshMain( | ||
CommonParams.get('opendb_url') | ||
); | ||
}, | ||
/** | ||
* Refreshes the main frame | ||
* | ||
* @param mixed url Undefined to refresh to the same page | ||
* String to go to a different page, e.g: 'index.php' | ||
* | ||
* @return void | ||
*/ | ||
refreshMain: function (url, callback) { | ||
if (! url) { | ||
url = $('#selflink').find('a').attr('href'); | ||
url = url.substring(0, url.indexOf('?')); | ||
} | ||
url += CommonParams.getUrlQuery(); | ||
$('<a />', { href: url }) | ||
.appendTo('body') | ||
.trigger('click') | ||
.remove(); | ||
AJAX._callback = callback; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.