Include header_spawn.js in serendipity_editor.js.tpl.
This commit is contained in:
@ -1,41 +0,0 @@
|
||||
// File referenced in:
|
||||
// – templates/*/admin/index.tpl
|
||||
// – templates/*/admin/media_choose.tpl
|
||||
|
||||
// Fires functions which are generated dynamically in backend PHP files
|
||||
// (i.e. include/functions_entries_admin.inc.php) which load the various
|
||||
// WYSIWYG editors in entries editor, HTML nuggets etc.
|
||||
function spawn() {
|
||||
if (self.Spawnextended) {
|
||||
Spawnextended();
|
||||
}
|
||||
|
||||
if (self.Spawnbody) {
|
||||
Spawnbody();
|
||||
}
|
||||
|
||||
if (self.Spawnnugget) {
|
||||
Spawnnugget();
|
||||
}
|
||||
}
|
||||
|
||||
// Generic function to set cookies. Duh.
|
||||
function SetCookie(name, value) {
|
||||
var today = new Date();
|
||||
var expire = new Date();
|
||||
expire.setTime(today.getTime() + (60*60*24*30*1000));
|
||||
document.cookie = 'serendipity[' + name + ']='+escape(value) + ';expires=' + expire.toGMTString();
|
||||
}
|
||||
|
||||
// Some sort of onload wrapper? @onli says jQuery can help with this
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
@ -13,7 +13,6 @@
|
||||
<link rel="stylesheet" href="{$admin_vars.css_file}">
|
||||
<link rel="stylesheet" href="{$admin_vars.admin_css_file}">
|
||||
<script src="{serendipity_getFile file='admin/js/modernizr-2.6.2.min.js'}"></script>
|
||||
<script src="{serendipity_getFile file='admin/header_spawn.js'}"></script>
|
||||
{if $admin_vars.admin_installed}
|
||||
{serendipity_hookPlugin hook="backend_header" hookAll="true"}
|
||||
{/if}
|
||||
|
@ -52,7 +52,6 @@
|
||||
{/if}
|
||||
<script src="{serendipity_getFile file='YahooUI/treeview/YAHOO.js'}"></script>
|
||||
<script src="{serendipity_getFile file='YahooUI/treeview/treeview.js'}"></script>
|
||||
<script src="{serendipity_getFile file='admin/header_spawn.js'}"></script>
|
||||
<script type="text/javascript" src="{$serendipityHTTPPath}serendipity_define.js.php"></script>
|
||||
{serendipity_hookPlugin hook="backend_header" hookAll="true"}
|
||||
<script src="{serendipity_getFile file='admin/serendipity_editor.js'}"></script>
|
||||
|
@ -14,6 +14,44 @@
|
||||
# All rights reserved. See LICENSE file for licensing details
|
||||
*/
|
||||
|
||||
// Fires functions which are generated dynamically in backend PHP files
|
||||
// (i.e. include/functions_entries_admin.inc.php) which load the various
|
||||
// WYSIWYG editors in entries editor, HTML nuggets etc.
|
||||
function spawn() {
|
||||
if (self.Spawnextended) {
|
||||
Spawnextended();
|
||||
}
|
||||
|
||||
if (self.Spawnbody) {
|
||||
Spawnbody();
|
||||
}
|
||||
|
||||
if (self.Spawnnugget) {
|
||||
Spawnnugget();
|
||||
}
|
||||
}
|
||||
|
||||
// Generic function to set cookies. Duh.
|
||||
function SetCookie(name, value) {
|
||||
var today = new Date();
|
||||
var expire = new Date();
|
||||
expire.setTime(today.getTime() + (60*60*24*30*1000));
|
||||
document.cookie = 'serendipity[' + name + ']='+escape(value) + ';expires=' + expire.toGMTString();
|
||||
}
|
||||
|
||||
// Some sort of onload wrapper? @onli says jQuery can help with this
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
} else {
|
||||
window.onload = function() {
|
||||
oldonload();
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Based upon code written by chris wetherell, http://www.massless.org, chris [THE AT SIGN] massless.org
|
||||
*/
|
||||
|
Reference in New Issue
Block a user