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
SIMPLX Controller V0.7 | |
UPDATE 111109 | |
NEW FEATURES: | |
- Added a whole bunch of modResource fields to the Request object. This means that you can route on stuff like: | |
pagetitle | |
template |
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
var SimplxStudio = {}; | |
SimplxStudio.modx = {}; | |
/* Creating JSON representation for modAccess */ | |
SimplxStudio.modx.modAccess={ | |
"class": "modAccess", | |
"extends":"xPDOSimpleObject", | |
"fields": [ | |
"id","alias","target","principal_class","principal","authority","policy" |
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
<?php | |
interface ISimplxHTTPProxy{ | |
public function setBaseURL($url); | |
public function setServiceURI($uri); | |
public function login($usn,$psw); | |
public function logout(); | |
public function get($res,$data); | |
public function post($res,$data); | |
public function patch($res,$data); | |
public function put($res,$data); |
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
<?php | |
if (!$modx->user->hasSessionContext($modx->context->get('key')) return ''; | |
$userArray = $modx->user->toArray(); | |
$profile = $modx->user->getOne('Profile'); | |
if ($profile) { | |
$userArray = array_merge($profile->toArray(),$userArray); | |
$extended = $profile->get('extended'); | |
if (!empty($extended) && is_array($extended)) { |
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
// if you have analytics, set them in pagevisibility mode to get real-user-trackig according to prerender-issues in Chrome/WebKit. | |
var viewCounted = false; | |
function handleVisibilityChange(evt) { | |
//Only count the view once we're done prerendering AND the document is done loading | |
if (document.webkitVisibilityState == 'prerender' | |
|| document.readyState != 'complete' || viewCounted) | |
return; | |
/* Implementation of view counting system starts here */ | |
// Code for Google Analytics | Change UA-XXXXX-X to be your site's ID |
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
<?php | |
if ($modx->event->name == 'OnManagerPageInit') { | |
$script = <<<SCRIPT | |
<script type="text/javascript"> | |
Ext.ComponentMgr.onAvailable('modx-panel-resource', function(){ | |
Ext.getCmp('modx-panel-resource').on('ready', function(){ | |
window.setTimeout(function(){Ext.getCmp('modx-panel-resource').markDirty()}, 250); | |
}) | |
}) | |
</script> |
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
Ext.onReady(function() { | |
Ext.getCmp('modx-layout').hideLeftbar(); | |
}); |
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
/*! | |
* Ext JS Library 3.2.1 | |
* Copyright(c) 2006-2010 Ext JS, Inc. | |
* [email protected] | |
* http://www.extjs.com/license | |
*/ | |
Ext.onReady(function(){ | |
Ext.QuickTips.init(); | |
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
/** | |
* Ext.ux.grid.GridFilters v0.2.8 | |
**/ | |
Ext.namespace("Ext.ux.grid"); | |
/* PATCH http://extjs.com/forum/showthread.php?t=76280 */ | |
Ext.override(Ext.grid.GridView, { | |
handleHdMenuClick : function(item){ | |
var index = this.hdCtxIndex, | |
cm = this.cm, |
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
var firstCombo = new Ext.form.ComboBox({ | |
store: store_combo_1, | |
typeAhead: true, | |
forceSelection: true, | |
triggerAction: 'all', | |
emptyText:'Select a state...', | |
selectOnFocus:true, | |
id:'combo1' | |
}); |