add api name in hashurl
This commit is contained in:
parent
ae96cf86c7
commit
eb6fdd66de
1 changed files with 9 additions and 1 deletions
|
@ -40,6 +40,11 @@ var app = new Ox.App({
|
||||||
});
|
});
|
||||||
|
|
||||||
$main.appendTo(app.$body);
|
$main.appendTo(app.$body);
|
||||||
|
if(document.location.hash) {
|
||||||
|
var action = document.location.hash.substring(1);
|
||||||
|
//FIXME: how to select item in Ox.TextList?
|
||||||
|
//app.$ui.actionList
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function constructList() {
|
function constructList() {
|
||||||
|
@ -83,12 +88,15 @@ function constructList() {
|
||||||
]
|
]
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
select: function(event, data) {
|
select: function(event, data) {
|
||||||
var info = $('<div>');
|
var info = $('<div>'),
|
||||||
|
hash = '#';
|
||||||
$.each(data.ids, function(v, k) {
|
$.each(data.ids, function(v, k) {
|
||||||
console.log(k)
|
console.log(k)
|
||||||
info.append($("<h2>").html(k));
|
info.append($("<h2>").html(k));
|
||||||
info.append($('<pre>').html(app.docs[k].replace('/\n/<br>\n/g')));
|
info.append($('<pre>').html(app.docs[k].replace('/\n/<br>\n/g')));
|
||||||
|
hash += k + ','
|
||||||
});
|
});
|
||||||
|
document.location.hash = hash.substring(0, hash.length-1);
|
||||||
app.$ui.actionInfo.html(info);
|
app.$ui.actionInfo.html(info);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue