1
|
// Discard - no longer relevant
|
2
|
define([
|
3
|
'dojo/_base/array',
|
4
|
'dojo/hash',
|
5
|
'dojo/topic',
|
6
|
'dijit/registry'
|
7
|
], function(arrayUtil, hash, topic, registry){
|
8
|
|
9
|
var backButton = {};
|
10
|
|
11
|
backButton.onHashChange = function(){
|
12
|
var hashValue = hash().slice(1);
|
13
|
if(menu){
|
14
|
if(arrayUtil.indexOf(menu.ids, hashValue) != -1){
|
15
|
if (registry.byId('tabContainer')) {
|
16
|
registry.byId('tabContainer').selectChild(registry.byId(hash));
|
17
|
}
|
18
|
}
|
19
|
}
|
20
|
};
|
21
|
|
22
|
// set the # the _ is to avoid the window moving to the hash tag
|
23
|
// topic.subscribe('tabContainer-selectChild', null, function(e){ hash('_' + e.id);});
|
24
|
topic.subscribe('/dojo/hashchange', null, backButton.onHashChange);
|
25
|
|
26
|
});
|