SkyPHP/skyphp — pull request #51 by stanistan (2012-04-27 20:35:31+00:00)
Title: Major JS Revisions

# JS

- added `Module` object to writing ajax requests easier
- html5.js cleanup
- split up `aql` object namespace into `sky` and `aql`
- fixed ajax page loading
- fixed skybox not displaying an error when a page is not found or json is not returned

---

*NOTE*: There will be a pull request in CMS (and other pull requests) as well to sync these updates.

#### new `sky`object methods

```js

sky.post;
// like $.post but if second param is JSON, contentType is set to JSON

sky.attrHelper(prefix);
// returns a getter setter for data attributes by prefix

sky.attr
// sky.attrHelper('data-')
```

#### moved `sky` object methods from `aql`

```js
sky.call;
// prev: aql._callback

sky.getDivObject;
// prev: aql._getDivObject

sky.loader;
// prev: aql.loader (used for loading a Page via ajax)

sky.hasScript;
// prev: aql.hasScript (if js was loaded already)

sky.deferLoad;
// prev: aql.deferLoad (queues up loading of resources)

sky.parseJSON(val, def);
// prev: aql.parseJSON, tries to make a js object out of val, returns def if fails.
```

# Misc

`create-model.sh` updated