Dotclear

source: themes/ductile/_prepend.php @ 3421:34cfd92ec45a

Revision 3421:34cfd92ec45a, 1.7 KB checked in by franck <carnet.franck.paul@…>, 9 years ago (diff)

No more <![CDATA[ … ]]> but in rss2.xsl (only useful for XML document, as XHTML)

Line 
1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3# This file is part of Ductile, a theme for Dotclear
4#
5# Copyright (c) 2011 - Association Dotclear
6# Licensed under the GPL version 2.0 license.
7# See LICENSE file or
8# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
9#
10# -- END LICENSE BLOCK -----------------------------------------
11
12if (!defined('DC_RC_PATH')) { return; }
13// public part below
14
15if (!defined('DC_CONTEXT_ADMIN')) { return false; }
16// admin part below
17
18# Behaviors
19$GLOBALS['core']->addBehavior('adminPageHTMLHead',array('tplDuctileThemeAdmin','adminPageHTMLHead'));
20
21class tplDuctileThemeAdmin
22{
23     public static function adminPageHTMLHead()
24     {
25          global $core;
26          if ($core->blog->settings->system->theme != 'ductile') { return; }
27
28          echo "\n".'<!-- Header directives for Ductile configuration -->'."\n";
29          $core->auth->user_prefs->addWorkspace('accessibility');
30          if (!$core->auth->user_prefs->accessibility->nodragdrop) {
31               echo
32                    dcPage::jsLoad('js/jquery/jquery-ui.custom.js').
33                    dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js');
34                    echo <<<EOT
35<script type="text/javascript">
36$(function() {
37     $("#stickerslist").sortable({'cursor':'move'});
38     $("#stickerslist tr").hover(function () {
39          $(this).css({'cursor':'move'});
40     }, function () {
41          $(this).css({'cursor':'auto'});
42     });
43     $('#theme_config').submit(function() {
44          var order=[];
45          $("#stickerslist tr td input.position").each(function() {
46               order.push(this.name.replace(/^order\[([^\]]+)\]$/,'$1'));
47          });
48          $("input[name=ds_order]")[0].value = order.join(',');
49          return true;
50     });
51     $("#stickerslist tr td input.position").hide();
52     $("#stickerslist tr td.handle").addClass('handler');
53});
54</script>
55EOT;
56          }
57
58     }
59}
Note: See TracBrowser for help on using the repository browser.

Sites map