From 9796ffd3c2ea71512dce20fca8b5df4295cf5a79 Mon Sep 17 00:00:00 2001 From: Makis Tracend Date: Wed, 26 Jun 2013 05:26:03 -0700 Subject: [PATCH] #88 loading client.js with require, automatically setting require.config --- app/helpers/template.php | 5 +++-- app/views/main/foot.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/helpers/template.php b/app/helpers/template.php index e81cf16..8e70285 100644 --- a/app/helpers/template.php +++ b/app/helpers/template.php @@ -242,7 +242,7 @@ function createClient( $dom ){ } // render the global client vars $client .= 'Object.extend(KISSCMS, '. json_encode_escaped( $GLOBALS['client'] ) .');'; - //$client .= 'var require = KISSCMS["require"];'; + $client .= 'require.config( KISSCMS.require );'; $client = $this->trimWhitespace($client); // #87 not caching client vars as a file @@ -265,6 +265,7 @@ function createClient( $dom ){ self::setCache( $client_file , $client); } */ + /* $client_file = "client"; $client_src= WEB_FOLDER. $client_file; @@ -276,7 +277,7 @@ function createClient( $dom ){ //$script->setAttribute("defer", "defer"); // include the script $dom = $this->updateDom($script, $dom); - + */ // set the client as a session var $_SESSION["_client"] = $client; } diff --git a/app/views/main/foot.php b/app/views/main/foot.php index 80f3e67..fb483f8 100644 --- a/app/views/main/foot.php +++ b/app/views/main/foot.php @@ -4,8 +4,8 @@ - - +