Project

General

Profile

« Previous | Next » 

Revision 1188

Added by Dietmar almost 15 years ago

Fix to load edit_full_area only if needed

View differences:

branches/2.8.x/CHANGELOG
12 12

  
13 13
------------------------------------- 2.8.1 -------------------------------------
14 14
25-Nov-2009 Dietmar Woellbrink (Luisehahne)
15
!	Fix to load edit_full_area only if needed
16
25-Nov-2009 Dietmar Woellbrink (Luisehahne)
15 17
!	change page_title to menu_title for parent dropdown list in index.php and sections.php
16 18
25-Nov-2009 Dietmar Woellbrink (Luisehahne)
17 19
!	more bug fixes language file SK.php
branches/2.8.x/wb/include/editarea/wb_wrapper_edit_area.php
14 14
 * @version		0.7.2.3 
15 15
 * @platform	Website Baker 2.7
16 16
*/
17
function loader_help()
18
{
19
?>
20
   <script type="text/javascript">
21
      var head= document.getElementsByTagName('head')[0];
22
      var script= document.createElement('script');
23
      script.type= 'text/javascript';
24
      script.src= '<?php print WB_URL; ?>/include/editarea/edit_area_full.js';
25
      head.appendChild(script);
26
   </script>
27
<?php
17 28

  
29
}
30

  
18 31
if (!function_exists('registerEditArea')) {
19 32
	function registerEditArea($id = 'code_area', $syntax = 'php', $syntax_selection = true
20 33
		, $allow_resize = 'no', $allow_toggle = true, $start_highlight = true
21 34
		, $min_width = 600, $min_height = 300, $toolbar = 'default')
22
	{ 
35
	{
36

  
23 37
		// set default toolbar if no user defined was specified
24 38
		if ($toolbar == 'default') {
25 39
			$toolbar = 'search, fullscreen, |, undo, redo, |, select_font, syntax_selection, |, highlight, reset_highlight, |, help';
26 40
			$toolbar = (!$syntax_selection) ? str_replace('syntax_selection,', '', $toolbar) : $toolbar;
27 41
		}
28
	
42

  
29 43
		// check if used Website Baker backend language is supported by EditArea
30 44
		$language = 'en';
31 45
		if (defined('LANGUAGE') && file_exists(dirname(__FILE__) . '/langs/' . strtolower(LANGUAGE) . '.js')) {
......
38 52
		// check if resize option is supported by edit_area
39 53
		$allow_resize = in_array($allow_resize, array('no', 'both', 'x', 'y')) ? $allow_resize : 'no';
40 54

  
55
        loader_help();
41 56
		// return the Javascript code
42 57
		$result = <<< EOT
43
		<script language="javascript" type="text/javascript">
58
		<script type="text/javascript">
44 59
			editAreaLoader.init({
45 60
				id: 				'$id'
46 61
				,start_highlight:	$start_highlight
branches/2.8.x/wb/templates/classic_theme/jquery/webkit-focusfix.js
1
/**
2
 * "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
3
 *
4
 * (en) Workaround for Webkit browser to fix focus problems when using skiplinks
5
 * (de) Workaround für Webkit-Browser, um den Focus zu korrigieren, bei Verwendung von Skiplinks
6
 *
7
 * @note			inspired by Paul Ratcliffe's article 
8
 *					http://www.communis.co.uk/blog/2009-06-02-skip-links-chrome-safari-and-added-wai-aria
9
 *
10
 * @copyright       Copyright 2005-2009, Dirk Jesse
11
 * @license         CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
12
 *                  YAML-C (http://www.yaml.de/en/license/license-conditions.html)
13
 * @link            http://www.yaml.de
14
 * @package         yaml
15
 * @version         3.2
16
 * @revision        $Revision: 430 $
17
 * @lastmodified    $Date: 2009-10-27 21:15:57 +0100 (Di, 27. Okt 2009) $
18
 */
19
 
20
var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1;
21

  
22
if(is_webkit) 
23
{
24
	var i;
25
	var skiplinks = []
26
	
27
	if ( document.getElementsByClassName !== undefined) {
28
		skiplinks = document.getElementsByClassName('skip');
29

  
30
		for (i=0; i<skiplinks.length; i++) {
31
			var target = skiplinks[i].href.substr(skiplinks[i].href.indexOf('#')+1);
32
			var targetElement = document.getElementById(target);
33
	
34
			targetElement.href = '#'+target;
35
			targetElement.setAttribute("tabindex", "0");
36
	
37
			skiplinks[i].setAttribute("onclick", "document.getElementById('"+target+"').focus();");
38
		}
39
	}	
40
}
branches/2.8.x/wb/templates/classic_theme/jquery/jquery-plugins.js
1
$(document).ready(function()
2
{
3

  
4
        if($(".jcalendar").length) {
5
            $.insert(WB_URL+"/include/jscalendar/calendar-system.css");
6
          }
7

  
8
        if($(".jsadmin").length) {
9
            $.insert(WB_URL+"/modules/jsadmin/backend.css");
10
          }
11
/*
12
        if($("a[rel^='lightbox']").length) {
13
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2.css");
14
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2-min.js");
15
          }
16
        if($("textarea.markitup").length) {
17
            $.insert(WB_URL+'/modules/markitup/latest/skins/markitup/style.css');
18
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/style.css');
19
            $.insert(WB_URL+'/modules/markitup/latest/jquery.markitup.pack.js');
20
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/set.js');
21

  
22
        	// Add markItUp! to your textarea in one line
23
        	// $('textarea.markitup').markItUp( { Settings }, { OptionalExtraSettings } );
24
        	$('textarea.markitup').markItUp(mySettings);
25

  
26
         }
27
 */
28
});
branches/2.8.x/wb/templates/classic_theme/templates/header.htt
10 10
<link href="{THEME_URL}/theme.css" rel="stylesheet" type="text/css" />
11 11
<link href="{WB_URL}/include/jquery/plugins/jquery-ui.css" rel="stylesheet" type="text/css" />
12 12
{BACKEND_MODULE_CSS}
13
<script type="text/javascript">
14
var WB_URL = '{WB_URL}';
15
var WB_PATH = '{WB_PATH}';
16
var THEME_URL = '{THEME_URL}';
17
var ADMIN_URL = '{ADMIN_URL}';
18
</script>
13 19
{BACKEND_MODULE_JS}
14
<script type="text/javascript" src="{WB_URL}/include/editarea/edit_area_full.js"></script>
15 20
<script language="javascript" type="text/javascript">
16 21
function confirm_link(message, url) {
17 22
	if(confirm(message)) location.href = url;
branches/2.8.x/wb/templates/classic_theme/templates/footer.htt
16 16
</table>
17 17

  
18 18
<script src="{WB_URL}/include/jquery/jquery-min.js" type="text/javascript"></script>
19
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
20 19
<script src="{WB_URL}/include/jquery/jquery-insert.js" type="text/javascript"></script>
21 20
<!--[if lt IE 7]><script type="text/javascript" src="{WB_URL}/include/jquery/plugins/jquery-pngFix.js"></script><![endif]-->
22
<script language="javascript" type="text/javascript">
23

  
24

  
25
        if($(".jcalendar").length) {
26
            $.insert("{WB_URL}/include/jscalendar/calendar-system.css");
27
          }
28

  
29
        if($(".jsadmin").length) {
30
            $.insert("{WB_URL}/modules/jsadmin/backend.css");
31
          }
32

  
33
        if($("a[rel^='lightbox']").length) {
34
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2.css");
35
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2-min.js");
36
          }
37

  
38
</script>
21
<script src="{THEME_URL}/jquery/jquery-plugins.js" type="text/javascript"></script>
39 22
{BACKEND_BODY_MODULE_JS}
40 23
</body>
41 24
</html>
branches/2.8.x/wb/templates/wb_theme/jquery/webkit-focusfix.js
1
/**
2
 * "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
3
 *
4
 * (en) Workaround for Webkit browser to fix focus problems when using skiplinks
5
 * (de) Workaround für Webkit-Browser, um den Focus zu korrigieren, bei Verwendung von Skiplinks
6
 *
7
 * @note			inspired by Paul Ratcliffe's article 
8
 *					http://www.communis.co.uk/blog/2009-06-02-skip-links-chrome-safari-and-added-wai-aria
9
 *
10
 * @copyright       Copyright 2005-2009, Dirk Jesse
11
 * @license         CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
12
 *                  YAML-C (http://www.yaml.de/en/license/license-conditions.html)
13
 * @link            http://www.yaml.de
14
 * @package         yaml
15
 * @version         3.2
16
 * @revision        $Revision: 430 $
17
 * @lastmodified    $Date: 2009-10-27 21:15:57 +0100 (Di, 27. Okt 2009) $
18
 */
19
 
20
var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1;
21

  
22
if(is_webkit) 
23
{
24
	var i;
25
	var skiplinks = []
26
	
27
	if ( document.getElementsByClassName !== undefined) {
28
		skiplinks = document.getElementsByClassName('skip');
29

  
30
		for (i=0; i<skiplinks.length; i++) {
31
			var target = skiplinks[i].href.substr(skiplinks[i].href.indexOf('#')+1);
32
			var targetElement = document.getElementById(target);
33
	
34
			targetElement.href = '#'+target;
35
			targetElement.setAttribute("tabindex", "0");
36
	
37
			skiplinks[i].setAttribute("onclick", "document.getElementById('"+target+"').focus();");
38
		}
39
	}	
40
}
branches/2.8.x/wb/templates/wb_theme/jquery/jquery-plugins.js
1
$(document).ready(function()
2
{
3

  
4
        if($(".jcalendar").length) {
5
            $.insert(WB_URL+"/include/jscalendar/calendar-system.css");
6
          }
7

  
8
        if($(".jsadmin").length) {
9
            $.insert(WB_URL+"/modules/jsadmin/backend.css");
10
          }
11
/*
12
        if($("a[rel^='lightbox']").length) {
13
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2.css");
14
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2-min.js");
15
          }
16
        if($("textarea.markitup").length) {
17
            $.insert(WB_URL+'/modules/markitup/latest/skins/markitup/style.css');
18
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/style.css');
19
            $.insert(WB_URL+'/modules/markitup/latest/jquery.markitup.pack.js');
20
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/set.js');
21

  
22
        	// Add markItUp! to your textarea in one line
23
        	// $('textarea.markitup').markItUp( { Settings }, { OptionalExtraSettings } );
24
        	$('textarea.markitup').markItUp(mySettings);
25

  
26
         }
27
 */
28
});
branches/2.8.x/wb/templates/wb_theme/theme.css
80 80
 margin: -10px 0 0 0;
81 81
}
82 82

  
83
.header {
84
	width: 900px;
85
	margin: 0 auto;
86
}
87

  
83 88
.container {
84 89
 background: #fff url(images/bgtitle.png);
85 90
 background-repeat: repeat-x;
91
 width:80%;
92
 margin: 0 auto;
86 93
}
87 94
 
88 95
.content {
......
372 379
}
373 380

  
374 381
.modify_link {
375
 padding-top: 4px;
376
 padding-left: 7px;
377
 text-indent: 7px;
382
	vertical-align: middle;
383
	padding-top: 4px;
384
	display: inline;
378 385
}
379 386

  
380 387
.header_list_menu_title {text-align:left;}
381 388
.header_list_page_title {width:290px; text-align:left;}
382
.header_list_page_id {width:30px; text-align: right;}
389
.header_list_page_id {width:40px; text-align: left;}
383 390
.header_list_actions {width:150px; text-align:left;}
384 391

  
385 392
.list_menu_title {text-align:left;}
branches/2.8.x/wb/templates/wb_theme/templates/header.htt
8 8
<meta name="description" content="{TEXT_ADMINISTRATION}" />
9 9
<meta name="keywords" content="{TEXT_ADMINISTRATION}" />
10 10
<link href="{THEME_URL}/theme.css" rel="stylesheet" type="text/css" />
11
<link href="{WB_URL}/include/jquery/plugins/jquery-ui.css" rel="stylesheet" type="text/css" />
12 11
{BACKEND_MODULE_CSS}
12
<script type="text/javascript">
13
var WB_URL = '{WB_URL}';
14
var WB_PATH = '{WB_PATH}';
15
var THEME_URL = '{THEME_URL}';
16
var ADMIN_URL = '{ADMIN_URL}';
17
</script>
13 18
{BACKEND_MODULE_JS}
14
<script type="text/javascript" src="{WB_URL}/include/editarea/edit_area_full.js"></script>
15 19
<script language="javascript" type="text/javascript">
16 20
function confirm_link(message, url) {
17 21
	if(confirm(message)) location.href = url;
......
19 23
</script>
20 24
</head>
21 25
<body>
22
<table cellpadding="0" cellspacing="0" border="0" width="770" align="center">
26
<table class="header">
23 27
<tr>
24
	<td width="60" valign="top">
28
	<td>
25 29
		<a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/logo.png" border="0" alt="Logo" /></a>
26 30
	</td>
27
	<td width="5">&nbsp;</td>
28
	<td style="font-size: 14px;" valign="top" align="right">
31
	<td>&nbsp;</td>
32
	<td class="menue">
29 33
         <a href="{ADMIN_URL}" title="{TITLE_START}"><img src="{THEME_URL}/images/home.png" border="0" alt="{TITLE_START}" /></a>
30 34
         &nbsp;&nbsp;<a href="{URL_VIEW}" target="_blank" title="{TITLE_VIEW}"><img src="{THEME_URL}/images/view.png" border="0" alt="{WB_URL}" /></a>
31 35
	&nbsp; <a href="{URL_HELP}" target="_blank" title="{TITLE_HELP}"><img src="{THEME_URL}/images/help.png" border="0" alt="{TITLE_HELP}" /></a>
32 36
         &nbsp; <a href="{ADMIN_URL}/logout" title="{TITLE_LOGOUT}"><img src="{THEME_URL}/images/dl.png" border="0" alt="{TITLE_LOGOUT}" /></a>
33 37
</td>
34
	<td width="100" align="right" style="padding-top: 10px; padding-right: 15px; color: #000;">
38
	<td class="version">
35 39
	Version {VERSION}
36 40
	</td>
37 41
</tr>
38 42
</table>
39 43

  
40
<table cellpadding="0" cellspacing="0" border="0" width="770" align="center" class="container">
44
<table class="container">
41 45
<tr>
42 46
	<td>
43 47
		<ul class="menu">
branches/2.8.x/wb/templates/wb_theme/templates/footer.htt
14 14
	</td>
15 15
</tr>
16 16
</table>
17

  
17
<!-- full skip link functionality in webkit browsers -->
18
<!--
19
<script src="{THEME_URL}/jquery/webkit-focusfix.js" type="text/javascript"></script>
20
-->
18 21
<script src="{WB_URL}/include/jquery/jquery-min.js" type="text/javascript"></script>
19
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
20 22
<script src="{WB_URL}/include/jquery/jquery-insert.js" type="text/javascript"></script>
21 23
<!--[if lt IE 7]><script type="text/javascript" src="{WB_URL}/include/jquery/plugins/jquery-pngFix.js"></script><![endif]-->
22
<script language="javascript" type="text/javascript">
24
<script src="{THEME_URL}/jquery/jquery-plugins.js" type="text/javascript"></script>
23 25

  
24

  
25
        if($(".jcalendar").length) {
26
            $.insert("{WB_URL}/include/jscalendar/calendar-system.css");
27
          }
28

  
29
        if($(".jsadmin").length) {
30
            $.insert("{WB_URL}/modules/jsadmin/backend.css");
31
          }
32

  
33
        if($("a[rel^='lightbox']").length) {
34
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2.css");
35
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2-min.js");
36
          }
37

  
38
</script>
39 26
{BACKEND_BODY_MODULE_JS}
40 27
</body>
41 28
</html>
branches/2.8.x/wb/templates/argos_theme/jquery/webkit-focusfix.js
1
/**
2
 * "Yet Another Multicolumn Layout" - (X)HTML/CSS Framework
3
 *
4
 * (en) Workaround for Webkit browser to fix focus problems when using skiplinks
5
 * (de) Workaround für Webkit-Browser, um den Focus zu korrigieren, bei Verwendung von Skiplinks
6
 *
7
 * @note			inspired by Paul Ratcliffe's article 
8
 *					http://www.communis.co.uk/blog/2009-06-02-skip-links-chrome-safari-and-added-wai-aria
9
 *
10
 * @copyright       Copyright 2005-2009, Dirk Jesse
11
 * @license         CC-A 2.0 (http://creativecommons.org/licenses/by/2.0/),
12
 *                  YAML-C (http://www.yaml.de/en/license/license-conditions.html)
13
 * @link            http://www.yaml.de
14
 * @package         yaml
15
 * @version         3.2
16
 * @revision        $Revision: 430 $
17
 * @lastmodified    $Date: 2009-10-27 21:15:57 +0100 (Di, 27. Okt 2009) $
18
 */
19
 
20
var is_webkit = navigator.userAgent.toLowerCase().indexOf('webkit') > -1;
21

  
22
if(is_webkit) 
23
{
24
	var i;
25
	var skiplinks = []
26
	
27
	if ( document.getElementsByClassName !== undefined) {
28
		skiplinks = document.getElementsByClassName('skip');
29

  
30
		for (i=0; i<skiplinks.length; i++) {
31
			var target = skiplinks[i].href.substr(skiplinks[i].href.indexOf('#')+1);
32
			var targetElement = document.getElementById(target);
33
	
34
			targetElement.href = '#'+target;
35
			targetElement.setAttribute("tabindex", "0");
36
	
37
			skiplinks[i].setAttribute("onclick", "document.getElementById('"+target+"').focus();");
38
		}
39
	}	
40
}
branches/2.8.x/wb/templates/argos_theme/jquery/jquery-plugins.js
1
$(document).ready(function()
2
{
3

  
4
        if($(".jcalendar").length) {
5
            $.insert(WB_URL+"/include/jscalendar/calendar-system.css");
6
          }
7

  
8
        if($(".jsadmin").length) {
9
            $.insert(WB_URL+"/modules/jsadmin/backend.css");
10
          }
11
/*
12
        if($("a[rel^='lightbox']").length) {
13
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2.css");
14
            $.insert(WB_URL+"/include/jquery/plugins/jquery-slimbox2-min.js");
15
          }
16
        if($("textarea.markitup").length) {
17
            $.insert(WB_URL+'/modules/markitup/latest/skins/markitup/style.css');
18
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/style.css');
19
            $.insert(WB_URL+'/modules/markitup/latest/jquery.markitup.pack.js');
20
            $.insert(WB_URL+'/modules/markitup/latest/sets/default/set.js');
21

  
22
        	// Add markItUp! to your textarea in one line
23
        	// $('textarea.markitup').markItUp( { Settings }, { OptionalExtraSettings } );
24
        	$('textarea.markitup').markItUp(mySettings);
25

  
26
         }
27
 */
28
});
branches/2.8.x/wb/templates/argos_theme/templates/footer.htt
17 17
</div>
18 18

  
19 19
<script src="{WB_URL}/include/jquery/jquery-min.js" type="text/javascript"></script>
20
<!--
20 21
<script src="{WB_URL}/include/jquery/jquery-ui-min.js" type="text/javascript"></script>
22
-->
21 23
<script src="{WB_URL}/include/jquery/jquery-insert.js" type="text/javascript"></script>
22 24
<!--[if lt IE 7]><script type="text/javascript" src="{WB_URL}/include/jquery/plugins/jquery-pngFix.js"></script><![endif]-->
23
<script language="javascript" type="text/javascript">
24

  
25

  
26
        if($(".jcalendar").length) {
27
            $.insert("{WB_URL}/include/jscalendar/calendar-system.css");
28
          }
29

  
30
        if($(".jsadmin").length) {
31
            $.insert("{WB_URL}/modules/jsadmin/backend.css");
32
          }
33

  
34
        if($("a[rel^='lightbox']").length) {
35
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2.css");
36
            $.insert("{WB_URL}/include/jquery/plugins/jquery-slimbox2-min.js");
37
          }
38

  
39
</script>
25
<script src="{THEME_URL}/jquery/jquery-plugins.js" type="text/javascript"></script>
40 26
{BACKEND_BODY_MODULE_JS}
41 27
</body>
42 28
</html>
branches/2.8.x/wb/templates/argos_theme/templates/header.htt
8 8
<meta name="description" content="{TEXT_ADMINISTRATION}" />
9 9
<meta name="keywords" content="{TEXT_ADMINISTRATION}" />
10 10
<link href="{THEME_URL}/theme.css" rel="stylesheet" type="text/css" />
11
<!--
11 12
<link href="{WB_URL}/include/jquery/plugins/jquery-ui.css" rel="stylesheet" type="text/css" />
13
-->
12 14
{BACKEND_MODULE_CSS}
15
<script type="text/javascript">
16
var WB_URL = '{WB_URL}';
17
var WB_PATH = '{WB_PATH}';
18
var THEME_URL = '{THEME_URL}';
19
var ADMIN_URL = '{ADMIN_URL}';
20
</script>
13 21
{BACKEND_MODULE_JS}
14
<script type="text/javascript" src="{WB_URL}/include/editarea/edit_area_full.js"></script>
15 22
<script language="javascript" type="text/javascript">
16 23
function confirm_link(message, url) {
17 24
	if(confirm(message)) location.href = url;

Also available in: Unified diff