mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-24 20:14:37 -04:00
Refactor.
This commit is contained in:
parent
69cc1bd281
commit
003b3f3edb
3 changed files with 4 additions and 4 deletions
|
@ -95,7 +95,7 @@ modulejs.define('core/location', ['_', 'modernizr', 'core/event', 'core/settings
|
|||
|
||||
_.each(json.items, function (jsonItem) {
|
||||
|
||||
var e = Item.get(jsonItem.absHref, jsonItem.time, jsonItem.size, jsonItem.isManaged, jsonItem.content);
|
||||
var e = Item.get(jsonItem.href, jsonItem.time, jsonItem.size, jsonItem.isManaged, jsonItem.content);
|
||||
found[e.absHref] = true;
|
||||
});
|
||||
|
||||
|
|
|
@ -104,8 +104,8 @@ modulejs.define('model/item', ['_', 'core/event', 'core/location', 'core/server'
|
|||
server.request({action: 'get', items: true, itemsHref: self.absHref, itemsWhat: 1}, function (response) {
|
||||
|
||||
if (response.items) {
|
||||
_.each(response.items, function (item) {
|
||||
getItem(item.absHref, item.time, item.size, item.isManaged, item.content);
|
||||
_.each(response.items, function (jsonItem) {
|
||||
getItem(jsonItem.href, jsonItem.time, jsonItem.size, jsonItem.isManaged, jsonItem.content);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class Item {
|
|||
public function to_json_object() {
|
||||
|
||||
$obj = array(
|
||||
"absHref" => $this->href,
|
||||
"href" => $this->href,
|
||||
"time" => $this->date * 1000, // seconds (PHP) to milliseconds (JavaScript)
|
||||
"size" => $this->size
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue