Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Merged kdfdocs/master #25

Merged
merged 48 commits into from
May 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
12ecbb6
Added Getting Started
Apr 12, 2014
bf94e9f
In Progress commit, previewing on Github
Apr 14, 2014
7552840
Added softlinks to README
Apr 14, 2014
3e32fe4
Removed Quotes
Apr 14, 2014
f0ebe94
Trying different source link
Apr 14, 2014
17b60a2
Arg Formatting Change
Apr 15, 2014
9018cce
More Args
Apr 15, 2014
4bf0280
Added hide, show, toggleClass, getBounds
Apr 15, 2014
cc0d611
Added Index
Apr 15, 2014
5b754fe
Added JView
Apr 15, 2014
50c391b
Added another JView Example
Apr 15, 2014
f0ee4d9
Tweaked the example to be more clear.
Apr 15, 2014
34aa947
Added Sources for JView Methods
Apr 15, 2014
5e30a61
Added HeaderView
Apr 15, 2014
94288e0
fixed wrong param `className` to `cssClass`
sinan Apr 16, 2014
a25e9bf
Added list views
Apr 16, 2014
a0e05f7
Added kdbuttonview
Apr 16, 2014
e78bfde
Loader View File
Apr 16, 2014
8109d9a
Merge branch 'master' of github.com:koding/kdfdocs
Apr 16, 2014
3857184
Removed Views from core index
Apr 16, 2014
a3aa7ed
Added show/hide Loader Methods
Apr 16, 2014
8653b96
Added Source Links
Apr 16, 2014
ef88892
Added Loaderview
Apr 16, 2014
8e310af
Fixed location of buttonview markdown
Apr 16, 2014
07fe6fd
Added kdbuttongroupview
Apr 16, 2014
7fe1b93
Added ToggleButton
Apr 17, 2014
c9e5df6
Fixed Link
Apr 17, 2014
850f9ed
Added KDView Inherited link
Apr 17, 2014
722eb81
Added kdbuttonviewwithmenu
Apr 17, 2014
681613d
Added kdhitenterinputview
Apr 17, 2014
5368f95
Added kdinputview
Apr 17, 2014
7f697cc
Added kdnotificationview
Apr 17, 2014
f4a36fe
Added note on how to use API usage examples
Apr 17, 2014
aee08c8
Removed index links
Apr 17, 2014
05d9d25
Updated Formatting
Apr 18, 2014
b290d1c
Added Summaries
Apr 18, 2014
1adfb5b
Updated kdnotification format
Apr 18, 2014
10118fb
API Index Wording
Apr 18, 2014
e414127
Added `options.foo` notation.
Apr 19, 2014
c50dcb8
Added Keys Description
Apr 19, 2014
8f178ec
Added missing args header
Apr 19, 2014
540cff9
Added Constructor signature
Apr 19, 2014
70b0b3b
Updated to new Index Format
Apr 19, 2014
88ba5b8
Added Class Header
Apr 19, 2014
b9742bb
Added Class Source Links
May 7, 2014
61bf374
Converted to new class syntax
May 8, 2014
6ce5ff1
Added kdnotification image
May 8, 2014
bb2e759
Merge remote-tracking branch 'kdfdocs/master' into master.docs
May 10, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/contents/.agignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git
1 change: 1 addition & 0 deletions docs/contents/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_kdf
4 changes: 4 additions & 0 deletions docs/contents/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# Contributors

- Your name here!
65 changes: 65 additions & 0 deletions docs/contents/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

# Koding Framework Documentation: Source

Welcome to the source for the [Koding][0] Framework Documentation. This is the
*source* for the Koding Framework Documentation. This is generally only
interesting for contributors.

If you're looking for the documentation, it is available in the
[https://koding.com/APPNAME][1] App.

## Contributing

Contributing to the documentation is encouraged! We do ask that you adhere to
the following guidelines so that everything works properly when loaded into
APPNAME.

## Formatting

The formatting of the documentation is subject to change since the viewing
application is not done yet, however the basic points are as follows.

### Directory Index

All directories should come with an index page, which effectively serves as the
`index.html` page.

### Local URLs

Because these markdown files will be loaded into a Koding Application and viewed
from Koding, your URLs to documents within this document should not include a
full path to this repository. Below are two examples.

#### Bad

```markdown
... the
[KDObject](https://github.com/koding/kdfdocs/blob/master/api/core/object.coffee)
object is the base ...
```

In this example, if a user clicked the *KDObject* link they would be sent from
Koding, to Github. This navigation away from Koding is undesired in the UX.

#### Good

```markdown
... the [KDObject](./api/core/object.coffee) object is the base ...
```

In this example we got rid of all the http junk, so the link is local to
Koding. Now if a user clicks it, they'll go to the item that they wanted to,
rather than going to the raw source for the document. Huzzah!

### Static Resources

Because Koding uses HTTPS for all users, if you link to plain HTTP images on
Koding they will fail to load and throw warnings about unsafe content.

So, for now, link all embedded images to their absolute paths on Github,
**with HTTPS**. This ensures that the image is secure, and everything is happy.



[0]: https://koding.com
[1]: https://koding.com/APPNAME
1 change: 1 addition & 0 deletions docs/contents/api/README.md
1 change: 1 addition & 0 deletions docs/contents/api/core/README.md
5 changes: 5 additions & 0 deletions docs/contents/api/core/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# Core KD Framework Components

- KDEventEmitter
- [KDObject](./kdobject.md)
55 changes: 55 additions & 0 deletions docs/contents/api/core/kdobject.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

# KDObject


## Extends

[KDEventEmitter](./kdeventemitter.md)

## Methods

### constructor:(options = {}, data) ->

### bound: (method) ->

### lazyBound: (method, rest...) ->

### forwardEvent: (target, eventName, prefix="") ->

### forwardEvents: (target, eventNames, prefix="") ->

### ready:(listener) ->

### registerSingleton:KD.registerSingleton

### getSingleton:KD.getSingleton

### getInstance:(instanceId)->

### registerKDObjectInstance: -> KD.registerInstance @

### setData:(@data)->

### getData:-> @data

### setOptions:(@options = {})->

### setOption:(option, value)-> @options[option] = value

### unsetOption:(option)-> delete @options[option] if @options[option]

### getOptions:-> @options

### getOption:(key)-> @options[key] ? null

### changeId:(id)->

### cgetId:->@id

### csetDelegate:(@delegate)->

### cgetDelegate:->@delegate

### cdestroy:->

### cchainNames:(options)->
13 changes: 13 additions & 0 deletions docs/contents/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# KDFramework API


- [Core Components][1]
- [View Components][2]




[0]: https://koding.com
[1]: ./core/index.md
[2]: ./views/index.md
1 change: 1 addition & 0 deletions docs/contents/api/views/README.md
Binary file added docs/contents/api/views/img-kdnotification-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docs/contents/api/views/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

# KDFramework Views

- [KDView](./kdview.md)
- [JView](./jview.md)
- [KDHeaderView](./kdheaderview.md)
- [KDButtonView](./kdbuttonview.md)
- [KDButtonGroupView](./kdbuttongroupview.md)
- [KDButtonViewWithMenu](./kdbuttonviewwithmenu.md)
- [KDHitEnterInputView](./kdhitenterinputview.md)
- [KDInputView](./kdinputview.md)
- [KDListView](./kdlistviewitem.md)
- [KDListItemView](./kdlistview.md)
- [KDListViewController](./kdlistviewcontroller.md)
- [KDLoaderView](./kdloaderview.md)
- [KDNotificationView](./kdnotificationview.md)
- [KDToggleButton](./kdtogglebutton.md)





[0]: https://koding.com
94 changes: 94 additions & 0 deletions docs/contents/api/views/jview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# JView

JView implements a basic [KDView](./kdview.md) with [Pistachio][0] as the
default template language.

## Usage

If you're creating your own class and extending JView, you'll want to define a
`pistachio` method.

```coffee
class Example extends JView
pistachio: ->
"""
<p>
This is a JView!
</p>
"""

example = new Example()
appView.addSubView example
```

If you're looking to create a pistachio view *without* inheriting it, you can
define a `pistachio` property on the JView option.

```coffee
view = new JView
pistachio: """
<p>
This is a JView!
</p>
"""

appView.addSubView view
```

These two are approximately the same. The differences lie in your
implementation needs.

## API Index

> class JView extends [KDView][kdview]
> - [constructor](#constructor): (options={}, data) ->
> - [pistachio](#pistachio): -> "some pistachio"

## [Class](https://github.com/koding/kd/blob/master/src/core/jview.coffee#L3)

JView extends [KDView](./kdview.md). Please see that for inherited methods.

### [Constructor](https://github.com/koding/kd/blob/master/src/core/jview.coffee#L3)
> [constructor](#constructor): (options={}, data) ->

Source for JView constructor is inherited entirely from [KDView][kdview]. The
only difference is the `pistachio` option.

#### Args

1. **options**:
- Type: object
- Default: `{}`

The following keys are supported.

- **options.pistachio**: A pistachio string. This is an alternative to the
`@pistachio` method, and is checked **first** when pistachio is rendered.
- Type: string
- Default: `undefined`

### [pistachio](https://github.com/koding/kd/blob/master/src/core/jview.coffee#L14)
> [pistachio](#pistachio): -> "some pistachio"

The `@pistachio` method is intended for you to implement in your class which is
extending JView. It's sole purpose is to return a string is pistachio
templating.

#### Returns

A string is [Pistachio][0].

Example:

```pistachio
<p>
This is being returned by your class, which inherited JView!
</p>
```




[0]: https://github.com/phidelta/pistachio
[kdview]: ./kdview.md
64 changes: 64 additions & 0 deletions docs/contents/api/views/kdbuttongroupview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

# KDButtonGroupView

A view that creates buttons in a group.

## Usage

```coffee
view = new KDButtonGroupView
buttons:
"Button One!":
cssClass: "clean-red"
callback: ->
new KDNotificationView
content: "You clicked the red button, we're doomed!"
"Button Two!"
cssClass: "cupid-green"
callback: ->
new KDNotificationView
content: "You clicked the green button, we're saved!"

appView.addSubView view
```

In this example we create a `KDButtonGroupView` and pass in a options object.
This buttons object has a key `"buttons"`, with the value of an object also.

Each key in the buttons object is a button title, and the value for that key is
the settings for that button. So, in the above example `"Button One!"` is the
title of a button, and the object within are settings passed directly to the
button being created.

`KDButtonGroupView` will take these button objects, and create instances of
[KDButtonView][kdbuttonview] for each one.

## API Index

> class KDButtonGroupView extends [KDView][kdview]
> - [constructor](#constructor): (options={}, data) ->

## [Class](https://github.com/koding/kd/blob/master/src/components/buttons/buttongroupview.coffee#L3)

KDbuttonView inherits from [KDView][kdview]. Please see that for inherited
methods.

### [Constructor](https://github.com/koding/kd/blob/master/src/components/buttons/buttongroupview.coffee#L5)

1. **options**:
- Type: object
- Default: `{}`

The following keys are supported.

- **options.buttons**: An object containing settings for the
[KDButtonViews][kdbuttonview] that KDButtonGroupView will create. Each key
is the title of a button to be created, and the value is yet another object
that will be given as options to the [KDButtonView][kdbuttonview].
- Type: object




[kdview]: ./kdview.md
[kdbuttonview]: ./kdbuttonview.md
Loading