moved wrapper functions for javascript and stylesheet actions from hopobject/actions.js to site/actions.js
This commit is contained in:
parent
6bb094a240
commit
0a6795757e
2 changed files with 47 additions and 20 deletions
|
@ -5,23 +5,3 @@
|
|||
function colorpicker_action() {
|
||||
this.renderSkin("colorpicker");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wrapper to make style.skin public
|
||||
*/
|
||||
|
||||
function stylesheet_action() {
|
||||
res.contentType = "text/css";
|
||||
this.renderSkin("style");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wrapper to make javascript.skin public
|
||||
*/
|
||||
|
||||
function javascript_action() {
|
||||
res.contentType = "text/javascript";
|
||||
this.renderSkin("javascript");
|
||||
}
|
||||
|
|
47
code/Site/actions.js
Normal file
47
code/Site/actions.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* wrapper to make style.skin public
|
||||
*/
|
||||
|
||||
function stylesheet_action() {
|
||||
var skin = this.skins.fetchSkin("site", "style");
|
||||
if (skin.isModified()) {
|
||||
res.contentType = "text/css";
|
||||
res.lastModified = new Date();
|
||||
this.renderSkin("style");
|
||||
}
|
||||
else
|
||||
res.notModified();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wrapper to make javascript.skin public
|
||||
*/
|
||||
|
||||
function javascript_action() {
|
||||
var skin = this.skins.fetchSkin("site", "javascript");
|
||||
if (skin.isModified()) {
|
||||
res.contentType = "text/javascript";
|
||||
res.lastModified = new Date();
|
||||
this.renderSkin("javascript");
|
||||
}
|
||||
else
|
||||
res.notModified();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* wrapper to make cp_javascript.skin public
|
||||
*/
|
||||
|
||||
function cp_javascript_action() {
|
||||
var skin = this.skins.fetchSkin("site", "cp_javascript");
|
||||
if (skin.isModified()) {
|
||||
res.contentType = "text/javascript";
|
||||
res.lastModified = new Date();
|
||||
this.renderSkin("cp_javascript");
|
||||
}
|
||||
else
|
||||
res.notModified();
|
||||
}
|
Loading…
Add table
Reference in a new issue