Forums / Setup & design / Settings only for admin interface

Settings only for admin interface

Author Message

Jérôme Vieilledent

Saturday 19 September 2009 4:32:10 am

Hi

I would like to know if there was a <i>clean</i> way to add design settings such as new CSS/JS <b>ONLY</b> to the admin interface (the admin siteaccess).
I'd like to use a generic way to do, not to rename a siteaccess folder (this is for my extension Noven Image Cropper http://projects.ez.no/novenimagecropper)

Thanks !

André R.

Saturday 19 September 2009 5:28:10 am

Take advantage of ezjscore(formally ezyui, formally ezcore), its included in 4.2 when you install webin or flow, aim to support all 4.x versions and is going to be fully bundled in 4.3 (like ezoe).

http://projects.ez.no/ezjscore

It has:
* jQuery, YUI 2.x and YUI 3.0 is bundled (but CDN used by default)
* On demand JavaScript / css loading
* Packing and minification of loaded files
* Files are served by Apache/web server so only overhead on generation witch is cached and can be placed inside cache blocks that are pr uri
* Supports php and template handlers to generate JavaScript and css dynamically (same one used to integrate eZ Publish i18n with tinymce in ezoe)
* including php handlers to automatically get jQuery/Yui[2|3] from either cdn or locally based on settings in ezjscore.ini (see examples on project page)
* These handlers can also be called directly from JavaScript as a an very simple to setup Ajax call, as done in example on project site.
* Above handlers have full permission support as defined in ezjscore.ini
* Ajax call's can be accelerated out of the box by using index_ajax.php

What it currently lacks (and would be great to get some help / hints / requirements on):
* Documentation on how to get started. Currently there is only example on project page and in ezjscore.ini, as well as advance example in ezstarrating* and almost as advance example in ezoe 5.1.0alpha1**.
* Possibility to clear js/css cache from admin interface (currently you'll have to clear var/<site>/cache/public/*)
* template handlers does not let you specify expiry time like static files (modified time) and php handlers do ( ::getCacheTime )
* Instructions on how to setup "[ezscript|ezcss]_load()" on plain setup as well as ezwebin versions lower then 1.4 (aka ezflow lower then 1.1)
* Possibility to specify version you want of jQuery/YUI, currently you'll get what the ezjscore is configured for, should maybe be possible to select major branches like YUI 2.7 vs 2.8, but this is non issue in YUI 3.0 as it handles version loading in JavaScript..

* http://svn.projects.ez.no/ezstarrating/trunk/packages/ezstarrating_extension/ezextension/ezstarrating/design/standard/templates/content/datatype/view/ezsrrating.tpl

** http://svn.projects.ez.no/ezoe/trunk/ezoe/design/standard/templates/content/datatype/edit/ezxmltext_ezoe.tpl

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Jérôme Vieilledent

Monday 21 September 2009 9:04:03 am

Hi Andre

Thanks for the tip !
This <i>ezjscore</i> extension seems to be really great !
I'm going to plan a migration to ezjscore server functions of all my module views for my extension :-)

I have an issue : I can't load jQuery from my local FS. It always load the CDN one, even with <i>LoadFromCDN=disabled</i>. Any idea ?

eZ debug

Timing: Jan 18 2025 11:02:14
Script start
Timing: Jan 18 2025 11:02:14
Module start 'content'
Timing: Jan 18 2025 11:02:14
Module end 'content'
Timing: Jan 18 2025 11:02:15
Script end

Main resources:

Total runtime0.1864 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0100 588.8672180.8281
Module start 'content' 0.01000.0070 769.695397.8828
Module end 'content' 0.01690.1694 867.5781526.2031
Script end 0.1864  1,393.7813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00422.2790200.0002
Check MTime0.00150.8084200.0001
Mysql Total
Database connection0.00150.814310.0015
Mysqli_queries0.133071.36631410.0009
Looping result0.00311.68441390.0000
Template Total0.169190.710.1691
Template load0.00080.452710.0008
Template processing0.168290.241710.1682
Override
Cache load0.00060.316010.0006
Sytem overhead
Fetch class attribute can translate value0.00080.404010.0008
XML
Image XML parsing0.00050.249010.0005
General
dbfile0.00472.5031200.0002
String conversion0.00000.004030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs