Ignore:
Timestamp:
Jul 23, 2012, 12:06:27 PM (12 years ago)
Author:
mistic100
Message:

Merged revision(s) 16925 from trunk:
feature 2703: make it easy for plugins to add tabs in admin screens
add a trigger a give an id to each core tabsheets

Location:
branches/2.4/admin/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/admin/include/albums_tab.inc.php

    r13282 r16926  
    2727
    2828$tabsheet = new tabsheet();
     29$tabsheet->set_id('cat_list');
    2930$tabsheet->add('list', l10n('List'), $my_base_url.'cat_list');
    3031$tabsheet->add('move', l10n('Move'), $my_base_url.'cat_move');
  • branches/2.4/admin/include/functions_history.inc.php

    r14688 r16926  
    3030  // TabSheet
    3131  $tabsheet = new tabsheet();
     32  $tabsheet->set_id('history');
    3233  // TabSheet initialization
    3334  $tabsheet->add('stats', l10n('Statistics'), $link_start.'stats');
  • branches/2.4/admin/include/tabsheet.class.php

    r12922 r16926  
    2525{
    2626  var $sheets;
     27  var $uniqid;
    2728  var $name;
    2829  var $titlename;
     
    3637  {
    3738    $this->sheets = array();
     39    $this->uniqid = null;
    3840    $this->name = $name;
    3941    $this->titlename = $titlename;
    4042    $this->selected = "";
     43  }
     44 
     45  function set_id($id)
     46  {
     47    $this->uniqid = $id;
    4148  }
    4249
     
    8289  function select($name)
    8390  {
     91    $this->sheets = trigger_event('tabsheet_before_select', $this->sheets, $this->uniqid);
    8492    $this->selected = $name;
    8593  }
Note: See TracChangeset for help on using the changeset viewer.