Dotclear

source: themes/ductile/_prepend.php @ 2566:9bf417837888

Revision 2566:9bf417837888, 1.6 KB checked in by franck <carnet.franck.paul@…>, 12 years ago (diff)

Add some people in CREDITS, remove trailing spaces and tabs.

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
14# Behaviors
15$GLOBALS['core']->addBehavior('adminPageHTMLHead',array('tplDuctileThemeAdmin','adminPageHTMLHead'));
16
17class tplDuctileThemeAdmin
18{
19     public static function adminPageHTMLHead()
20     {
21          global $core;
22          if ($core->blog->settings->system->theme != 'ductile') { return; }
23
24          echo "\n".'<!-- Header directives for Ductile configuration -->'."\n";
25          $core->auth->user_prefs->addWorkspace('accessibility');
26          if (!$core->auth->user_prefs->accessibility->nodragdrop) {
27               echo
28                    dcPage::jsLoad('js/jquery/jquery-ui.custom.js');
29                    echo <<<EOT
30<script type="text/javascript">
31//<![CDATA[
32$(function() {
33     $("#stickerslist").sortable({'cursor':'move'});
34     $("#stickerslist tr").hover(function () {
35          $(this).css({'cursor':'move'});
36     }, function () {
37          $(this).css({'cursor':'auto'});
38     });
39     $('#theme_config').submit(function() {
40          var order=[];
41          $("#stickerslist tr td input.position").each(function() {
42               order.push(this.name.replace(/^order\[([^\]]+)\]$/,'$1'));
43          });
44          $("input[name=ds_order]")[0].value = order.join(',');
45          return true;
46     });
47     $("#stickerslist tr td input.position").hide();
48     $("#stickerslist tr td.handle").addClass('handler');
49});
50//]]>
51</script>
52EOT;
53          }
54
55     }
56}
Note: See TracBrowser for help on using the repository browser.

Sites map