Skip to content

Commit

Permalink
Cleaned up javascript files
Browse files Browse the repository at this point in the history
  • Loading branch information
leveille committed Jan 30, 2009
1 parent ddd1686 commit a3eb7fc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions smc/core/admin/index.php
Expand Up @@ -65,8 +65,8 @@
(defined('SMC_MINIFY_ENABLED') && !SMC_MINIFY_ENABLED)): ?>
<script type="text/javascript" src="<?php echo SMC_EXT_REL; ?>/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<?php echo SMC_EXT_REL; ?>/ext-all.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/utils.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/auth.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/smc_utils.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/smc_auth.js"></script>
<script type="text/javascript" src="<?php echo SMC_ADMIN_REL; ?>/state/SessionProvider.js"></script>
<script type="text/javascript" src="<?php echo SMC_FCK_REL; ?>/fckeditor.js"></script>
<?php else: ?>
Expand All @@ -91,15 +91,15 @@
{
//throughout the duration of this administrative session
//ensure that the administrator is logged in
var auth = new Auth({path : SMC_ADMIN.smc_core, timer : 120});
var auth = new SMC_AUTH({path : SMC_ADMIN.smc_core, timer : 120});
auth.initiateAuthTaskRunner();

Ext.BLANK_IMAGE_URL = '<?php echo SMC_EXT_REL; ?>/resources/images/default/s.gif';

SMC_ADMIN.oFCKeditor = new FCKeditor('baiEditor');
SMC_ADMIN.oFCKeditor.BasePath = "<?php echo SMC_FCK_REL; ?>/";
SMC_ADMIN.oFCKeditor.ToolbarSet = "SMC";
SMC_ADMIN.oFCKeditor.Height = smc_client.viewportHeight() - 200;
SMC_ADMIN.oFCKeditor.Height = SMC_UTILS.viewportHeight() - 200;

//remove load mask
setTimeout(function(){
Expand Down
10 changes: 5 additions & 5 deletions smc/core/admin/javascripts/ContentGrid.js
Expand Up @@ -265,7 +265,7 @@ Ext.extend(ContentGrid, Ext.grid.EditorGridPanel, {
contentSave: function(action){

//let's ensure that the user is authenticated prior to saving any content
var auth = new Auth({path : SMC_ADMIN.smc_core});
var auth = new SMC_AUTH({path : SMC_ADMIN.smc_core});
auth.authenticate();

var record, panel, win, contentForm, icon;
Expand All @@ -289,7 +289,7 @@ Ext.extend(ContentGrid, Ext.grid.EditorGridPanel, {
name: 'baiEditor',
fieldLabel: 'Content',
allowBlank: false,
height: smc_client.viewportHeight() - 200,
height: SMC_UTILS.viewportHeight() - 200,
value: '<p>Temporary data holder.</p>',
anchor: '96%'
});
Expand All @@ -298,7 +298,7 @@ Ext.extend(ContentGrid, Ext.grid.EditorGridPanel, {
labelWidth: 80, // label settings here cascade unless overridden
bodyStyle: 'padding:10px',
autoWidth: true,
height: smc_client.viewportHeight() - 110,
height: SMC_UTILS.viewportHeight() - 110,
border: false,
autoDestroy: false,
labelPad: 10,
Expand Down Expand Up @@ -335,9 +335,9 @@ Ext.extend(ContentGrid, Ext.grid.EditorGridPanel, {
shadow: true,
modal: true,
minWidth: 800,
width: smc_client.viewportWidth() - 100,
width: SMC_UTILS.viewportWidth() - 100,
minHeight: 500,
height: smc_client.viewportHeight() - 60,
height: SMC_UTILS.viewportHeight() - 60,
resizable: true,
layout: 'border',
items: [this.panel],
Expand Down
6 changes: 3 additions & 3 deletions smc/core/libraries/javascripts/smc.js
Expand Up @@ -133,7 +133,7 @@ SMC = function(){
Ext.get(SMC.editorName + '___Frame').setHeight(dialog.getInnerHeight());
}, this);

dialog.setSize(smc_client.viewportWidth() - 100, smc_client.viewportHeight() - 60)
dialog.setSize(SMC_UTILS.viewportWidth() - 100, SMC_UTILS.viewportHeight() - 60)
.setTitle("Content Editor " + $this.title)
.show($this);
}
Expand All @@ -155,7 +155,7 @@ SMC = function(){
* is opened, and the admin walks away and comes back
*/

var auth = new Auth({path : SMC.smcCore});
var auth = new SMC_AUTH({path : SMC.smcCore});
auth.authenticate()

var id = getId($this);
Expand Down Expand Up @@ -217,7 +217,7 @@ SMC = function(){
//set up the authentication timer to ensure authentication
//check every x seconds
//ensure this user remains logged in
var auth = new Auth({path : SMC.smcCore, timer : 120});
var auth = new SMC_AUTH({path : SMC.smcCore, timer : 120});
auth.initiateAuthTaskRunner()

/***
Expand Down
@@ -1,6 +1,6 @@
Ext.namespace('Auth');
Ext.namespace('SMC_AUTH');

Auth = function(config){
SMC_AUTH = function(config){

var defaultConfig = {
path : '',
Expand All @@ -10,7 +10,7 @@ Auth = function(config){
Ext.applyIf(this, config, defaultConfig);
}

Ext.apply(Auth.prototype, {
Ext.apply(SMC_AUTH.prototype, {
authTask: null,
authRunner: null,

Expand Down
@@ -1,5 +1,5 @@
//Thanks http://codylindley.com/Webdev/295/javascript-get-page-height-with-scroll
var smc_client = {
var SMC_UTILS = {
viewportWidth: function(){
return self.innerWidth || (document.documentElement.clientWidth || document.body.clientWidth);
},
Expand Down
6 changes: 3 additions & 3 deletions smc/core/support/includes/smc_javascripts.inc.php
Expand Up @@ -10,9 +10,9 @@
<script type="text/javascript" src="<?php echo SMC_EXT_REL; ?>/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="<?php echo SMC_EXT_REL; ?>/ext-all.js"></script>
<script type="text/javascript" src="<?php echo SMC_FCK_REL; ?>/fckeditor.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/utils.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/smc_utils.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/smc.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/auth.js"></script>
<script type="text/javascript" src="<?php echo SMC_JAVASCRIPTS_REL; ?>/smc_auth.js"></script>
<?php else: ?>
<script type="text/javascript" src="<?php echo SMC_MINIFY_REL; ?>/min/?g=jsfront"></script>
<?php endif; ?>
Expand All @@ -26,7 +26,7 @@
oFCKeditor = new FCKeditor(SMC.editorName);
oFCKeditor.BasePath = "<?php echo SMC_FCK_REL; ?>/"
oFCKeditor.ToolbarSet = "SMC";
oFCKeditor.Height = smc_client.viewportHeight() - 130;
oFCKeditor.Height = SMC_UTILS.viewportHeight() - 130;
oFCKeditor.ReplaceTextarea();

SMC.init();
Expand Down
8 changes: 4 additions & 4 deletions smc/core/vendors/minify/min/groupsConfig.php
Expand Up @@ -24,9 +24,9 @@
sprintf('%s/adapter/ext/ext-base.js', SMC_EXT),
sprintf('%s/ext-all.js', SMC_EXT),
sprintf('%s/fckeditor.js', SMC_FCK),
sprintf('%s/utils.js', SMC_JAVASCRIPTS),
sprintf('%s/smc_utils.js', SMC_JAVASCRIPTS),
sprintf('%s/smc.js', SMC_JAVASCRIPTS),
sprintf('%s/auth.js', SMC_JAVASCRIPTS)
sprintf('%s/smc_auth.js', SMC_JAVASCRIPTS)
),
'cssfront' => array(
sprintf('%s/resources/css/ext-all.css', SMC_EXT),
Expand All @@ -37,8 +37,8 @@
'jsadmin_1' => array(
sprintf('%s/adapter/ext/ext-base.js', SMC_EXT),
sprintf('%s/ext-all.js', SMC_EXT),
sprintf('%s/utils.js', SMC_JAVASCRIPTS),
sprintf('%s/auth.js', SMC_JAVASCRIPTS),
sprintf('%s/smc_utils.js', SMC_JAVASCRIPTS),
sprintf('%s/smc_auth.js', SMC_JAVASCRIPTS),
sprintf('%s/state/SessionProvider.js', SMC_ADMIN),
sprintf('%s/fckeditor.js', SMC_FCK)
),
Expand Down

0 comments on commit a3eb7fc

Please sign in to comment.