pip-webui
Version:
HTML5 UI for LOB applications
237 lines (166 loc) • 7.12 kB
Markdown
add-image directive](
- [pipCameraDialog](
- [pipPictureUrlDialog](
- [pipGallerySearchDialog](
- [Questions and bugs](
Add dependency to **pip-webui** into your **bower.json** or **package.json** file depending what you use.
```javascript
"dependencies": {
...
"pip-webui": "*"
...
}
```
Alternatively you can install **pip-webui** manually using **bower**:
```bash
bower install pip-webui
```
or install it using **npm**:
```bash
npm install pip-webui
```
Include **pip-webui** files into your web application.
```html
<link rel="stylesheet" href=".../pip-webui-lib.min.css"/>
<link rel="stylesheet" href=".../pip-webui.min.css"/>
...
<script src=".../pip-webui-lib.min.js"></script>
<script src=".../pip-webui.min.js"></script>
```
Register **pipPictures** module in angular module dependencies.
```javascript
angular.module('myApp',[..., 'pipPictures']);
```
**pip-picture** directive is the simplest control that loads from the server and visualizes a single image.
This dialog requires **files** operation in standard REST API.
```html
<pip-picture pip-picture-id="pictureEditId"></pip-picture>
```
<img src="images/img-picture-simple.png"/>
* **pip-picture-id** - id of picture
**pip-picture-edit** directive allows to set a single image and upload it to server.
This dialog requires **files** operation in standard REST API.
```html
<pip-picture-edit
pip-picture-id="pictureEditId"
pip-party-id="partyId"
pip-created="onPictureCreated($event)"
pip-changed="onPictureChanged($control)"
pip-rebind="true"
pip-default-text="Change Picture"
ng-disabled="pictureDisabled">
</pip-picture-edit>
```
<img src="images/img-picture-edit-control.png"/>
Todo: Describe all attributes for this directive
**pip-avatar** directive is identical to **pip-picture**. The only difference is in URL on the server to upload image.
This dialog requires **files** operation in standard REST API.
```html
<pip-avatar pip-rebind-avatar="true"
pip-party-id="avatars[avatarIndex].id"
pip-party-name="avatars[avatarIndex].name">
</pip-avatar>
```
<img src="images/img-avatar-control.png"/>
* **pip-rebind-avatar** - updating picture in control
* **pip-party-id** - party id
* **pip-party-name** - party name
**pip-avatar-edit** directive similar to **pip-picture-edit** allows to upload a single image. The only difference is in URL on the server to upload image. This dialog requires **files** operation in standard REST API.
```html
<pip-avatar-edit
pip-party-id="avatar1.id"
pip-created="onPictureCreated($event)"
pip-changed="onPictureChanged($control)"
pip-default-text="Change avatar"
pip-reset="isReseting()"
ng-disabled="pictureDisabled">
</pip-avatar-edit>
```
<img src="images/img-avatar-edit.png"/>
Todo: Describe all attributes for this directive
**pip-picture-list** directive allows to upload a collection of images at once.
This dialog requires **files** operation in standard REST API.
```html
<pip-picture-list-edit pip-picture-ids="pictureIds"
pip-created="onPictureListCreated($event)"
pip-default-text="CLICK_HERE_OR_DRAG_FILES"
ng-disabled="pictureListDisabled">
</pip-picture-list-edit>
```
<img src="images/img-picture-list-edit.png"/>
Todo: Describe all attributes for this directive
**pip-collage** directive visualizes a collection of images as random collage.
This dialog requires **files** operation in standard REST API.
```html
<pip-collage pip-srcs="srcs_3"
pip-multiple="false"
pip-unique-code="1"
pip-open="true">
</pip-collage>
```
<img src="images/img-picture-collage.png"/>
Todo: Describe all attributes for this directive
**pip-add-picture** directive lets user ability to add image from different sources: from file, camera, web link or image library.
This dialog requires **files** operation in standard REST API.
```html
```
Todo: Add HTML snippet to demonstrate the directive with all attributes
Todo: Add screenshots for every picture dialog except file
<img src="images/img-picture-dialog.png"/>
Todo: Describe all attributes for this directive
**pipCameraDialog** allows to add image from integrated camera. If HTML5 camera access is not available this dialog uses portable webcam.js library. Hybrid applications running in Cordova may use native camera application.
Todo: Add code snippet to demonstrate how to open the dialog
<img src="images/img-camera.png"/>
Todo: Document the dialog public methods
**pipPictureUrlDialog** allows to upload image from external source by its url. The dialog supports only http, https or ftp protocols and jpg, png, gif images.
Todo: Add code snippet to demonstrate how to open the dialog
<img src="images/img-weblink.png"/>
Todo: Document the dialog public methods
**pipGallerySearchDialog** allows to add image from application image gallery or external image search service like Flicker, Google search or Bing. This dialog requires **files**, **imagelib** and **image_sets** operations in standard REST API.
Todo: Add code snippet to demonstrate how to open the dialog
<img src="images/img-image-library.png"/>
Todo: Document the dialog public methods
If you have any questions regarding the module, you can ask them using our
[ ](https://groups.google.com/forum/#!forum/pip-webui).
Bugs related to this module can be reported using [github issues](https://github.com/pip-webui/pip-webui-pictures/issues).
- [Installing](
- [pip-picture directive](
- [pip-picture-edit directive](
- [pip-avatar directive](
- [pip-avatar-edit directive](
- [pip-picture-list-edit directive](
- [pip-collage directive](
- [pip-