Buttons are sorted according to this method
public function compare($a, $b) {
if (!isset(Base_ActionBarCommon::$available_icons[$a['icon']])) return 1;
if (!isset(Base_ActionBarCommon::$available_icons[$b['icon']])) return -1;
if (!isset($a['position'])) $a['position'] = 0;
if (!isset($b['position'])) $b['position'] = 0;
$ret = $a['position'] - $b['position'];
if($ret==0) $ret = Base_ActionBarCommon::$available_icons[$a['icon']]-Base_ActionBarCommon::$available_icons[$b['icon']];
if($ret==0) $ret = strcmp(strip_tags($a['label']),strip_tags($b['label']));
return $ret;
}
position in most cases is set to 0. It can be used to force order.
Default order is determined by
Base_ActionBarCommon::$available_icons
public static $available_icons = array(
'home' => 0,
'back' => 1,
'report' => 2,
'history' => 3,
'all' => 4,
'favorites' => 5,
'calendar' => 6,
'search' => 7,
'folder' => 8,
'edit' => 9,
'view' => 10,
'add' => 11,
'delete' => 12,
'save' => 13,
'print' => 14,
'clone' => 15,
'settings' => 16,
'scan' => 17,
'filter' => 18,
'retry' => 19,
'send' => 20,
'new-mail' => 21,
'attach' => 22,
'reply' => 23,
'forward' => 24);
You can reassign this static variable in your module's Common file and change default order of buttons. However it will be system-wide - not just dashboard order.
Regards,
Adam