Changeset 3730:5c45a5df9a59 for themes/ductile/_prepend.php
- Timestamp:
- 03/08/18 17:58:39 (7 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
themes/ductile/_prepend.php
r3709 r3730 12 12 # -- END LICENSE BLOCK ----------------------------------------- 13 13 14 if (!defined('DC_RC_PATH')) { return;}14 if (!defined('DC_RC_PATH')) {return;} 15 15 // public part below 16 16 17 if (!defined('DC_CONTEXT_ADMIN')) { return false;}17 if (!defined('DC_CONTEXT_ADMIN')) {return false;} 18 18 // admin part below 19 19 20 20 # Behaviors 21 $GLOBALS['core']->addBehavior('adminPageHTMLHead', array(__NAMESPACE__.'\tplDuctileThemeAdmin','adminPageHTMLHead'));21 $GLOBALS['core']->addBehavior('adminPageHTMLHead', array(__NAMESPACE__ . '\tplDuctileThemeAdmin', 'adminPageHTMLHead')); 22 22 23 23 class tplDuctileThemeAdmin 24 24 { 25 26 27 28 if ($core->blog->settings->system->theme != 'ductile') { return;}25 public static function adminPageHTMLHead() 26 { 27 global $core; 28 if ($core->blog->settings->system->theme != 'ductile') {return;} 29 29 30 echo "\n".'<!-- Header directives for Ductile configuration -->'."\n";31 32 33 34 \dcPage::jsLoad('js/jquery/jquery-ui.custom.js').35 36 30 echo "\n" . '<!-- Header directives for Ductile configuration -->' . "\n"; 31 $core->auth->user_prefs->addWorkspace('accessibility'); 32 if (!$core->auth->user_prefs->accessibility->nodragdrop) { 33 echo 34 \dcPage::jsLoad('js/jquery/jquery-ui.custom.js') . 35 \dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'); 36 echo <<<EOT 37 37 <script type="text/javascript"> 38 38 $(function() { 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 39 $('#stickerslist').sortable({'cursor':'move'}); 40 $('#stickerslist tr').hover(function () { 41 $(this).css({'cursor':'move'}); 42 }, function () { 43 $(this).css({'cursor':'auto'}); 44 }); 45 $('#theme_config').submit(function() { 46 var order=[]; 47 $('#stickerslist tr td input.position').each(function() { 48 order.push(this.name.replace(/^order\[([^\]]+)\]$/,'$1')); 49 }); 50 $('input[name=ds_order]')[0].value = order.join(','); 51 return true; 52 }); 53 $('#stickerslist tr td input.position').hide(); 54 $('#stickerslist tr td.handle').addClass('handler'); 55 55 }); 56 56 </script> 57 57 EOT; 58 58 } 59 59 60 60 } 61 61 }
Note: See TracChangeset
for help on using the changeset viewer.