Changeset 3333:11107ba2fc59
- Timestamp:
- 09/01/16 12:21:43 (9 years ago)
- Branch:
- default
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/js/jquery/jquery.pageTabs.js
r2479 r3333 1 1 (function($) { 2 2 'use strict'; 3 3 4 4 $.pageTabs = function(start_tab, opts) { 5 5 var defaults = { … … 10 10 idTabPrefix: 'part-tabs-' 11 11 }; 12 12 13 13 $.pageTabs.options = $.extend({}, defaults, opts); 14 14 var active_tab = start_tab || ''; 15 15 var hash = $.pageTabs.getLocationHash(); 16 var subhash = $.pageTabs.getLocationSubhash(); 16 17 17 18 if (hash !== undefined && hash) { … … 23 24 24 25 createTabs(); 25 26 26 27 $('ul li', '.'+$.pageTabs.options.containerClass).click(function(e) { 27 28 if ($(this).hasClass($.pageTabs.options.activeClass)) { … … 40 41 part_to_activate.addClass('loaded'); 41 42 } 42 43 43 44 part_to_activate.tabload(); 44 45 }); … … 49 50 50 51 $.pageTabs.clickTab(active_tab); 51 52 53 if (subhash !== undefined) { 54 // Tab displayed, now scroll to the sub-part if defined in original document.location (#tab.sub-part) 55 document.getElementById(subhash).scrollIntoView(); 56 } 57 52 58 return this; 53 59 }; 54 60 55 61 var createTabs = function createTabs() { 56 62 var lis = [], li_class = ''; 57 63 58 64 $('.'+$.pageTabs.options.contentClass).each(function() { 59 65 $(this).hide(); … … 62 68 $(this).attr('id', $.pageTabs.options.partPrefix + $(this).attr('id')).prop('title',''); 63 69 }); 64 70 65 71 $('<div class="'+$.pageTabs.options.containerClass+'"><ul>'+lis.join('')+'</ul></div>') 66 72 .insertBefore($('.'+$.pageTabs.options.contentClass).get(0)); 67 73 }; 68 74 69 75 var getHash = function getHash(href) { 70 76 var href = href || ''; … … 72 78 return href.replace(/.*#/, ''); 73 79 }; 74 80 75 81 $.pageTabs.clickTab = function(tab) { 76 82 if (tab=='') { … … 96 102 97 103 $.pageTabs.getLocationHash = function() { 98 return getHash(document.location.hash); 104 // Return the URL hash (without subhash — #hash[.subhash]) 105 var h = getHash(document.location.hash).split('.'); 106 return h[0]; 107 }; 108 $.pageTabs.getLocationSubhash = function() { 109 // Return the URL subhash if present (without hash — #hash[.subhash]) 110 var sh = getHash(document.location.hash).split('.'); 111 return sh[1]; 99 112 }; 100 113 })(jQuery); -
admin/plugin.php
r2708 r3333 78 78 call_user_func($open_f,$p_title,$p_head); 79 79 echo $p_content; 80 if (!$popup) { 81 // Add direct links to plugin settings if any 82 $settings = adminModulesList::getSettingsUrls($core,$p,true,false); 83 if (!empty($settings)) { 84 echo '<hr class="clear"/><p class="right modules">'.implode(' - ',$settings).'</p>'; 85 } 86 } 80 87 call_user_func($close_f); 81 88 } -
admin/preferences.php
r3330 r3333 490 490 echo 491 491 '<div class="fieldset">'. 492 '<h4 >'.__('Interface').'</h4>'.492 '<h4 id="user_options_interface">'.__('Interface').'</h4>'. 493 493 494 494 '<p><label for="user_ui_enhanceduploader" class="classic">'. … … 524 524 echo 525 525 '<div class="fieldset">'. 526 '<h4 >'.__('Optional columns displayed in lists').'</h4>';526 '<h4 id="user_options_columns">'.__('Optional columns displayed in lists').'</h4>'; 527 527 $odd = true; 528 528 foreach ($cols as $col_type => $col_list) { … … 541 541 echo 542 542 '<div class="fieldset">'. 543 '<h4 >'.__('Edition').'</h4>';543 '<h4 id="user_options_edition">'.__('Edition').'</h4>'; 544 544 545 545 echo '<div class="two-boxes odd">'; -
inc/admin/lib.moduleslist.php
r3327 r3333 466 466 'sshot' => '', 467 467 'score' => 0, 468 'type' => null 468 'type' => null, 469 'require' => array(), 470 'settings' => array() 469 471 ), 470 472 # Module's values … … 744 746 if (!empty($more)) { 745 747 echo 746 '<li>'.implode(' - ', 748 '<li>'.implode(' - ',$more).'</li>'; 747 749 } 748 750 … … 753 755 $config = !empty($module['root']) && file_exists(path::real($module['root'].'/_config.php')); 754 756 755 if ($config || !empty($module['section']) || !empty($module['tags']) ) {757 if ($config || !empty($module['section']) || !empty($module['tags']) || !empty($module['settings'])) { 756 758 echo 757 759 '<div><ul class="mod-more">'; 758 760 759 if ($config) {760 echo761 '<li><a class="module-config" href="'.$this->getURL('module='.$id.'&conf=1').'">'.__('Configure plugin').'</a></li>';761 $settings = $this->getSettingsUrls($this->core,$id); 762 if (!empty($settings)) { 763 echo '<li>'.implode(' - ',$settings).'</li>'; 762 764 } 763 765 … … 806 808 807 809 return $this; 810 } 811 812 /** 813 * Get settings URLs if any 814 * 815 * @param object $core 816 * @param string $id module ID 817 * @param boolean $check check permission 818 * @param boolean $self include self URL (→ plugin index.php URL) 819 * @return Array of settings URLs 820 */ 821 public static function getSettingsUrls($core,$id,$check=false,$self=true) 822 { 823 $st = array(); 824 825 $config = !empty($core->plugins->moduleRoot($id)) && 826 file_exists(path::real($core->plugins->moduleRoot($id).'/_config.php')); 827 $settings = $core->plugins->moduleInfo($id,'settings'); 828 if ($config || !empty($settings)) { 829 if ($config) { 830 $st[] = '<a class="module-config" href="'. 831 $core->adminurl->get('admin.plugins',array('module' => $id,'conf' => '1')). 832 '">'.__('Configure plugin').'</a>'; 833 } 834 if (is_array($settings)) { 835 foreach ($settings as $sk => $sv) { 836 switch ($sk) { 837 case 'blog': 838 if ((!$check) || 839 ($check && $core->auth->check('admin',$core->blog->id))) { 840 $st[] = '<a class="module-config" href="'. 841 $core->adminurl->get('admin.blog.pref').$sv. 842 '">'.__('Plugin settings (in blog parameters)').'</a>'; 843 } 844 break; 845 case 'pref': 846 if ((!$check) || 847 ($check && $core->auth->check('usage,contentadmin',$core->blog->id))) { 848 $st[] = '<a class="module-config" href="'. 849 $core->adminurl->get('admin.user.preferences').$sv. 850 '">'.__('Plugin settings (in user preferences)').'</a>'; 851 } 852 break; 853 case 'self': 854 if ($self) { 855 if ((!$check) || 856 ($check && $core->auth->check($core->plugins->moduleInfo($id,'permissions'),$core->blog->id))) { 857 $st[] = '<a class="module-config" href="'. 858 $core->adminurl->get('admin.plugin.'.$id).$sv. 859 '">'.__('Plugin settings').'</a>'; 860 } 861 } 862 break; 863 } 864 } 865 } 866 } 867 868 return $st; 808 869 } 809 870 -
inc/core/class.dc.modules.php
r3135 r3333 283 283 (currently available keys : permissions, priority, type) 284 284 */ 285 public function registerModule($name,$desc,$author,$version, 285 public function registerModule($name,$desc,$author,$version,$properties = array()) 286 286 { 287 287 if ($this->disabled_mode) { … … 320 320 'type' => null, 321 321 'enabled' => true, 322 'requires' => array() 322 'requires' => array(), 323 'settings' => array() 323 324 ), $properties 324 325 ); -
locales/fr/main.po
r3330 r3333 2979 2979 msgstr "Configurer le plugin" 2980 2980 2981 msgid "Plugin settings (in blog parameters)" 2982 msgstr "Réglages du plugin (paramètres du blog)" 2983 2984 msgid "Plugin settings (in user preferences)" 2985 msgstr "Réglages du plugin (mes préférences)" 2986 2987 msgid "Plugin settings" 2988 msgstr "Réglages du plugin" 2989 2981 2990 msgid "No plugins matched your search." 2982 2991 msgstr "Aucun plugin ne correspond à votre recherche." -
plugins/antispam/_admin.php
r2849 r3333 91 91 $ttl = $settings->antispam->antispam_moderation_ttl; 92 92 echo 93 '<div class="fieldset"><h4 >Antispam</h4>'.93 '<div class="fieldset"><h4 id="antispam_params">Antispam</h4>'. 94 94 '<p><label for="antispam_moderation_ttl" class="classic">'.__('Delete junk comments older than').' '. 95 95 form::field('antispam_moderation_ttl', 3, 3, $ttl). -
plugins/antispam/_define.php
r2566 r3333 19 19 array( 20 20 'permissions' => 'usage,contentadmin', 21 'priority' => 10 21 'priority' => 10, 22 'settings' => array( 23 'self' => '', 24 'blog' => '#params.antispam_params' 25 ) 22 26 ) 23 27 ); -
plugins/breadcrumb/_admin.php
r3009 r3333 25 25 $settings->addNameSpace('breadcrumb'); 26 26 echo 27 '<div class="fieldset"><h4 >'.__('Breadcrumb').'</h4>'.27 '<div class="fieldset"><h4 id="breadcrumb_params">'.__('Breadcrumb').'</h4>'. 28 28 '<p><label class="classic">'. 29 29 form::checkbox('breadcrumb_enabled','1',$settings->breadcrumb->breadcrumb_enabled). -
plugins/breadcrumb/_define.php
r3085 r3333 20 20 array( 21 21 /* Permissions */ 'permissions' => 'usage,contentadmin', 22 /* Type */ 'type' => 'plugin' 22 /* Type */ 'type' => 'plugin', 23 'settings' => array( 24 'blog' => '#params.breadcrumb_params' 25 ) 23 26 ) 24 27 ); -
plugins/dcCKEditor/_define.php
r3090 r3333 19 19 array( 20 20 'permissions' => 'usage,contentadmin', 21 'type' => 'plugin' 21 'type' => 'plugin', 22 'settings' => array( 23 'self' => '', 24 'pref' => '#user-options.user_options_edition' 25 ) 22 26 ) 23 27 ); -
plugins/dcLegacyEditor/_define.php
r3258 r3333 19 19 array( 20 20 'permissions' => 'usage,contentadmin', 21 'type' => 'plugin' 21 'type' => 'plugin', 22 'settings' => array( 23 'self' => '', 24 'pref' => '#user-options.user_options_edition' 25 ) 22 26 ) 23 27 ); -
plugins/maintenance/_define.php
r2257 r3333 19 19 array( 20 20 'permissions' => 'admin', 21 'type' => 'plugin' 21 'type' => 'plugin', 22 'settings' => array( 23 'self' => '#settings' 24 ) 22 25 ) 23 26 -
plugins/pings/_define.php
r2566 r3333 19 19 array( 20 20 'permissions' => 'usage,contentadmin', 21 'type' => 'plugin' 21 'type' => 'plugin', 22 'settings' => array( 23 'self' => '' 24 ) 22 25 ) 23 26 ); -
plugins/simpleMenu/_define.php
r2773 r3333 19 19 array( 20 20 'permissions' => 'admin', 21 'type' => 'plugin' 21 'type' => 'plugin', 22 'settings' => array( 23 'self' => '' 24 ) 22 25 ) 23 26 ); -
plugins/tags/_define.php
r2924 r3333 20 20 'permissions' => 'usage,contentadmin', 21 21 'priority' => 1001, // Must be higher than dcLegacyEditor/dcCKEditor priority (ie 1000) 22 'type' => 'plugin' 22 'type' => 'plugin', 23 'settings' => array( 24 'pref' => '#user-options.tags_prefs' 25 ) 23 26 ) 24 27 ); -
plugins/tags/inc/tags.behaviors.php
r3024 r3333 363 363 364 364 echo 365 '<div class="fieldset"><h5 id="tags_prefs">'.__('Tags').'</h5>'. 365 366 '<p><label for="user_tag_list_format" class="classic">'.__('Tags list format:').'</label> '. 366 367 form::combo('user_tag_list_format',$combo,$value). 367 '</p> ';368 '</p></div>'; 368 369 } 369 370 -
plugins/themeEditor/_admin.php
r3257 r3333 60 60 echo 61 61 '<div class="fieldset two-cols clearfix">'. 62 '<h5 >'.__('Syntax highlighting').'</h5>';62 '<h5 id="themeEditor_prefs">'.__('Syntax highlighting').'</h5>'; 63 63 echo 64 64 '<div class="col">'. -
plugins/themeEditor/_define.php
r3251 r3333 18 18 /* Version */ '1.3', 19 19 array( 20 'type' => 'plugin' 20 'type' => 'plugin', 21 'settings' => array( 22 'pref' => '#user-options.themeEditor_prefs' 23 ) 21 24 ) 22 25 );
Note: See TracChangeset
for help on using the changeset viewer.