├── .gitignore ├── .bowerrc ├── public ├── libs │ ├── ionic │ │ ├── docs │ │ │ ├── templates │ │ │ │ ├── version-data.template.json │ │ │ │ ├── api │ │ │ │ │ ├── type.template.html │ │ │ │ │ ├── function.template.html │ │ │ │ │ ├── provider.template.html │ │ │ │ │ ├── controller.template.html │ │ │ │ │ ├── service.template.html │ │ │ │ │ ├── utility.template.html │ │ │ │ │ ├── componentGroup.template.html │ │ │ │ │ ├── object.template.html │ │ │ │ │ ├── filter.template.html │ │ │ │ │ ├── directive.template.html │ │ │ │ │ └── api.template.html │ │ │ │ ├── lib │ │ │ │ │ ├── returns.template.html │ │ │ │ │ ├── this.template.html │ │ │ │ │ ├── yaml.template.html │ │ │ │ │ ├── properties.template.html │ │ │ │ │ ├── methods.template.html │ │ │ │ │ ├── events.template.html │ │ │ │ │ └── macros.html │ │ │ │ ├── index.template.html │ │ │ │ └── pages-data.template.html │ │ │ ├── filters │ │ │ │ └── capital.js │ │ │ ├── processors │ │ │ │ ├── version-data.js │ │ │ │ ├── index-page.js │ │ │ │ ├── latest-version.js │ │ │ │ ├── keywords.js │ │ │ │ └── pages-data.js │ │ │ ├── tag-defs │ │ │ │ └── index.js │ │ │ ├── README.md │ │ │ ├── inline-tag-defs │ │ │ │ └── link.js │ │ │ ├── generate-versions.js │ │ │ └── docs.config.js │ │ ├── release │ │ │ ├── fonts │ │ │ │ ├── ionicons.eot │ │ │ │ ├── ionicons.ttf │ │ │ │ └── ionicons.woff │ │ │ └── version.json │ │ ├── scss │ │ │ ├── ionicons │ │ │ │ ├── ionicons.scss │ │ │ │ ├── _ionicons-font.scss │ │ │ │ └── _ionicons-animation.scss │ │ │ ├── _split-pane.scss │ │ │ ├── ionic.scss │ │ │ ├── _menu.scss │ │ │ ├── _button-bar.scss │ │ │ ├── _slide-box.scss │ │ │ ├── _platform.scss │ │ │ ├── _radio.scss │ │ │ ├── _modal.scss │ │ │ ├── _badge.scss │ │ │ ├── _action-sheet.scss │ │ │ ├── _list.scss │ │ │ ├── _popup.scss │ │ │ ├── _grid.scss │ │ │ ├── _range.scss │ │ │ ├── _checkbox.scss │ │ │ ├── _type.scss │ │ │ ├── _toggle.scss │ │ │ ├── _util.scss │ │ │ └── _tabs.scss │ │ ├── LICENSE │ │ ├── bower.json │ │ └── .bower.json │ ├── angular │ │ ├── angular.min.js.gzip │ │ ├── bower.json │ │ ├── angular-csp.css │ │ ├── .bower.json │ │ └── README.md │ ├── angular-ui-router │ │ ├── config │ │ │ ├── jsdoc.js │ │ │ └── karma.js │ │ ├── sample │ │ │ ├── contacts.detail.item.html │ │ │ ├── contacts.detail.item.edit.html │ │ │ ├── contacts.list.html │ │ │ ├── styles.css │ │ │ ├── module.js │ │ │ ├── contacts.detail.html │ │ │ ├── contacts.json │ │ │ ├── contacts.html │ │ │ ├── factory.js │ │ │ └── index.html │ │ ├── .gitignore │ │ ├── bower.json │ │ ├── test │ │ │ ├── templateFactorySpec.js │ │ │ ├── compat │ │ │ │ └── routeParamsSpec.js │ │ │ ├── stateFiltersSpec.js │ │ │ ├── debug.js │ │ │ ├── testUtils.js │ │ │ ├── urlRouterSpec.js │ │ │ └── urlMatcherFactorySpec.js │ │ ├── .travis.yml │ │ ├── component.json │ │ ├── src │ │ │ ├── stateFilters.js │ │ │ ├── view.js │ │ │ ├── compat.js │ │ │ ├── stateDirectives.js │ │ │ ├── templateFactory.js │ │ │ ├── urlRouter.js │ │ │ ├── viewDirective.js │ │ │ └── common.js │ │ ├── .bower.json │ │ ├── release │ │ │ └── doc │ │ │ │ ├── scripts │ │ │ │ ├── linenumber.js │ │ │ │ └── prettify │ │ │ │ │ └── lang-css.js │ │ │ │ ├── index.html │ │ │ │ └── styles │ │ │ │ ├── prettify-jsdoc.css │ │ │ │ └── prettify-tomorrow.css │ │ ├── LICENSE │ │ └── package.json │ ├── firebase │ │ ├── README.md │ │ ├── bower.json │ │ └── .bower.json │ ├── angular-animate │ │ ├── bower.json │ │ ├── .bower.json │ │ └── README.md │ ├── angular-sanitize │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── README.md │ │ └── angular-sanitize.min.js │ ├── mockfirebase │ │ ├── MAINTAINING.md │ │ ├── CONTRIBUTING.md │ │ ├── bower.json │ │ ├── .bower.json │ │ └── README.md │ ├── angularfire │ │ ├── bower.json │ │ ├── .bower.json │ │ └── README.md │ └── firebase-simple-login │ │ ├── LICENSE │ │ ├── bower.json │ │ └── .bower.json ├── css │ └── app.css ├── js │ ├── factory.js │ ├── app.js │ └── controllers.js └── partials │ ├── chat.html │ ├── signup.html │ ├── login.html │ └── home.html ├── routes └── index.js ├── README.md ├── bower.json ├── gulpFile.js ├── package.json ├── app.js ├── views └── index.ejs └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory" : "public/libs" 3 | } -------------------------------------------------------------------------------- /public/libs/ionic/docs/templates/version-data.template.json: -------------------------------------------------------------------------------- 1 | <$ version.list | json $> 2 | -------------------------------------------------------------------------------- /public/libs/ionic/docs/templates/api/type.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | -------------------------------------------------------------------------------- /public/libs/ionic/docs/templates/api/function.template.html: -------------------------------------------------------------------------------- 1 | <@ extends "api/object.template.html" @> 2 | -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | /* GET home page. */ 2 | exports.index = function(req, res){ 3 | res.render('index'); 4 | }; 5 | -------------------------------------------------------------------------------- /public/libs/angular/angular.min.js.gzip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/chatter/HEAD/public/libs/angular/angular.min.js.gzip -------------------------------------------------------------------------------- /public/libs/ionic/release/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/chatter/HEAD/public/libs/ionic/release/fonts/ionicons.eot -------------------------------------------------------------------------------- /public/libs/ionic/release/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/chatter/HEAD/public/libs/ionic/release/fonts/ionicons.ttf -------------------------------------------------------------------------------- /public/libs/ionic/release/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arvindr21/chatter/HEAD/public/libs/ionic/release/fonts/ionicons.woff -------------------------------------------------------------------------------- /public/libs/angular-ui-router/config/jsdoc.js: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ "plugins/markdown" ], 3 | "markdown": { 4 | "parser": "gfm" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /public/libs/angular/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular", 3 | "version": "1.2.12", 4 | "main": "./angular.js", 5 | "dependencies": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /public/libs/ionic/docs/templates/lib/returns.template.html: -------------------------------------------------------------------------------- 1 | <@ if doc.returns -@> 2 |
<$ property.name $>| Name | 16 |Description | 17 |
|---|---|
| <$ page.id | link(page.name, page) $> | 21 |<$ page.description | firstParagraph | marked $> | 22 |
| <@ if isDirective @>Attr<@ else @>Param<@ endif @> | 11 |Type | 12 |Details | 13 |
|---|---|---|
|
19 | <$ param.name $>
20 | <@ if param.alias @>| <$ param.alias $><@ endif @>
21 | <@ if param.type.optional @> (optional) <@ endif @>
22 | |
23 | 24 | <$ typeList(param.typeList) $> 25 | | 26 |
27 | <$ param.description | marked $>
28 | <@ if param.default @> (default: <$ param.default $>) <@ endif @> 29 | |
30 |
<$ fn.name $>(<@- for param in fn.params @><$ sep() $>
46 | <@- if param.type.optional @>[<@ endif -@>
47 | <$ param.name $>
48 | <@- if param.type.optional @>]<@ endif -@>
49 | <@ endfor @>)<@ if fn.alias @>(alias: <$ fn.alias $>)<@ endif @>
50 | <@ endmacro -@>
51 |
52 | <@- macro typeInfo(fn) -@>
53 | <$ typeList(fn.typeList) $> <$ fn.description $>
54 | <@- endmacro -@>
55 |
--------------------------------------------------------------------------------
/public/libs/angular/README.md:
--------------------------------------------------------------------------------
1 | # bower-angular
2 |
3 | This repo is for distribution on `bower`. The source for this module is in the
4 | [main AngularJS repo](https://github.com/angular/angular.js).
5 | Please file issues and pull requests against that repo.
6 |
7 | ## Install
8 |
9 | Install with `bower`:
10 |
11 | ```shell
12 | bower install angular
13 | ```
14 |
15 | Add a `
19 | ```
20 |
21 | ## Documentation
22 |
23 | Documentation is available on the
24 | [AngularJS docs site](http://docs.angularjs.org/).
25 |
26 | ## License
27 |
28 | The MIT License
29 |
30 | Copyright (c) 2010-2012 Google, Inc. http://angularjs.org
31 |
32 | Permission is hereby granted, free of charge, to any person obtaining a copy
33 | of this software and associated documentation files (the "Software"), to deal
34 | in the Software without restriction, including without limitation the rights
35 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36 | copies of the Software, and to permit persons to whom the Software is
37 | furnished to do so, subject to the following conditions:
38 |
39 | The above copyright notice and this permission notice shall be included in
40 | all copies or substantial portions of the Software.
41 |
42 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
48 | THE SOFTWARE.
49 |
--------------------------------------------------------------------------------
/public/libs/ionic/docs/templates/api/api.template.html:
--------------------------------------------------------------------------------
1 | ---
2 | <@ include "lib/yaml.template.html" @>
3 | title: "<@ if doc.docType == "directive" @><$ doc.name | dashCase $><@ else @><$ doc.name $><@ endif @>"
4 | header_sub_title: "<$ doc.docType | capital $> in module <$ doc.module $>"
5 | doc: "<$ doc.name $>"
6 | docType: "<$ doc.docType $>"
7 | ---
8 |
9 |
58 |
59 | $state = {{$state.current.name}}
60 | $stateParams = {{$stateParams}}
61 | $state full url = {{ $state.$current.url.source }}
62 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/public/libs/ionic/scss/_range.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Range
4 | * --------------------------------------------------
5 | */
6 |
7 | input[type="range"] {
8 | display: inline-block;
9 | overflow: hidden;
10 | margin-top: 5px;
11 | margin-bottom: 5px;
12 | padding-right: 2px;
13 | padding-left: 1px;
14 | width: auto;
15 | height: $range-slider-height + 15;
16 | outline: none;
17 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg));
18 | background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%);
19 | background-position: center;
20 | background-size: 99% $range-track-height;
21 | background-repeat: no-repeat;
22 | -webkit-appearance: none;
23 |
24 | &::-webkit-slider-thumb {
25 | position: relative;
26 | width: $range-slider-width;
27 | height: $range-slider-height;
28 | border-radius: $range-slider-border-radius;
29 | background-color: $toggle-handle-off-bg-color;
30 | box-shadow: 0 0 2px rgba(0,0,0,.5), 1px 3px 5px rgba(0,0,0,0.25);
31 | cursor: pointer;
32 | -webkit-appearance: none;
33 | }
34 |
35 | &::-webkit-slider-thumb:before {
36 | /* what creates the colorful line on the left side of the slider */
37 | position: absolute;
38 | top: ($range-slider-height / 2) - ($range-track-height / 2);
39 | left: -2001px;
40 | width: 2000px;
41 | height: $range-track-height;
42 | background: $dark;
43 | content: ' ';
44 | }
45 |
46 | &::-webkit-slider-thumb:after {
47 | /* create a larger (but hidden) hit area */
48 | position: absolute;
49 | top: -20px;
50 | left: -20px;
51 | padding: 30px;
52 | content: ' ';
53 | //background: red;
54 | //opacity: .5;
55 | }
56 |
57 | }
58 |
59 | .range {
60 | @include display-flex();
61 | @include align-items(center);
62 | padding: 2px 4px;
63 |
64 | &.range-light {
65 | input { @include range-style($range-light-track-bg); }
66 | }
67 | &.range-stable {
68 | input { @include range-style($range-stable-track-bg); }
69 | }
70 | &.range-positive {
71 | input { @include range-style($range-positive-track-bg); }
72 | }
73 | &.range-calm {
74 | input { @include range-style($range-calm-track-bg); }
75 | }
76 | &.range-balanced {
77 | input { @include range-style($range-balanced-track-bg); }
78 | }
79 | &.range-assertive {
80 | input { @include range-style($range-assertive-track-bg); }
81 | }
82 | &.range-energized {
83 | input { @include range-style($range-energized-track-bg); }
84 | }
85 | &.range-royal {
86 | input { @include range-style($range-royal-track-bg); }
87 | }
88 | &.range-dark {
89 | input { @include range-style($range-dark-track-bg); }
90 | }
91 | }
92 |
93 | .range .icon {
94 | @include flex(0);
95 | display: block;
96 | min-width: $range-icon-size;
97 | text-align: center;
98 | font-size: $range-icon-size;
99 | }
100 |
101 | .range input {
102 | @include flex(1);
103 | display: block;
104 | margin-right: 10px;
105 | margin-left: 10px;
106 | }
107 |
108 | .range-label {
109 | @include flex(0, 0, auto);
110 | display: block;
111 | white-space: nowrap;
112 | }
113 |
114 | .range-label:first-child {
115 | padding-left: 5px;
116 | }
117 | .range input + .range-label {
118 | padding-right: 5px;
119 | padding-left: 0;
120 | }
121 |
122 |
--------------------------------------------------------------------------------
/public/libs/ionic/scss/_checkbox.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Checkbox
4 | * --------------------------------------------------
5 | */
6 |
7 | .checkbox {
8 | // set the color defaults
9 | @include checkbox-style($checkbox-off-border-default, $checkbox-on-bg-default);
10 |
11 | position: relative;
12 | display: inline-block;
13 | padding: ($checkbox-height / 4) ($checkbox-width / 4);
14 | cursor: pointer;
15 |
16 | &.checkbox-light {
17 | @include checkbox-style($checkbox-off-border-light, $checkbox-on-bg-light);
18 | }
19 | &.checkbox-stable {
20 | @include checkbox-style($checkbox-off-border-stable, $checkbox-on-bg-stable);
21 | }
22 | &.checkbox-positive {
23 | @include checkbox-style($checkbox-off-border-positive, $checkbox-on-bg-positive);
24 | }
25 | &.checkbox-calm {
26 | @include checkbox-style($checkbox-off-border-calm, $checkbox-on-bg-calm);
27 | }
28 | &.checkbox-assertive {
29 | @include checkbox-style($checkbox-off-border-assertive, $checkbox-on-bg-assertive);
30 | }
31 | &.checkbox-balanced {
32 | @include checkbox-style($checkbox-off-border-balanced, $checkbox-on-bg-balanced);
33 | }
34 | &.checkbox-energized {
35 | @include checkbox-style($checkbox-off-border-energized, $checkbox-on-bg-energized);
36 | }
37 | &.checkbox-royal {
38 | @include checkbox-style($checkbox-off-border-royal, $checkbox-on-bg-royal);
39 | }
40 | &.checkbox-dark {
41 | @include checkbox-style($checkbox-off-border-dark, $checkbox-on-bg-dark);
42 | }
43 | }
44 |
45 | .checkbox input {
46 | position: relative;
47 | width: $checkbox-width;
48 | height: $checkbox-height;
49 | border: 0;
50 | background: transparent;
51 | cursor: pointer;
52 | -webkit-appearance: none;
53 |
54 | &:before {
55 | /* what the checkbox looks like when its not checked */
56 | display: table;
57 | width: 100%;
58 | height: 100%;
59 | border-radius: $checkbox-border-radius;
60 | background: $checkbox-off-bg-color;
61 | content: ' ';
62 | transition: background-color .1s ease-in-out;
63 | }
64 | }
65 |
66 | /* the checkmark within the box */
67 | .checkbox input:after {
68 | @include transition(opacity .05s ease-in-out);
69 | @include rotate(-45deg);
70 | position: absolute;
71 | top: 30%;
72 | left: 26%;
73 | display: table;
74 | width: ($checkbox-width / 2) + 1;
75 | height: ($checkbox-width / 3) + 1;
76 | border: $checkbox-check-width solid $checkbox-check-color;
77 | border-top: 0;
78 | border-right: 0;
79 | content: ' ';
80 | opacity: 0;
81 | }
82 |
83 | .grade-c .checkbox input:after {
84 | @include rotate(0);
85 | top: 3px;
86 | left: 4px;
87 | border: none;
88 | color: $checkbox-check-color;
89 | font-weight: bold;
90 | font-size: 20px;
91 | content: '\2713';
92 | }
93 |
94 | /* what the checkmark looks like when its checked */
95 | .checkbox input:checked:after {
96 | opacity: 1;
97 | }
98 |
99 | /* make sure item content have enough padding on left to fit the checkbox */
100 | .item-checkbox {
101 | padding-left: ($item-padding * 2) + $checkbox-width;
102 |
103 | &.active {
104 | box-shadow: none;
105 | }
106 | }
107 |
108 | /* position the checkbox to the left within an item */
109 | .item-checkbox .checkbox {
110 | @include display-flex();
111 | @include align-items(center);
112 | position: absolute;
113 | top: 0;
114 | left: $item-padding / 2;
115 | z-index: $z-index-item-checkbox;
116 | height: 100%;
117 | }
118 |
--------------------------------------------------------------------------------
/public/libs/ionic/scss/_type.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Typography
4 | * --------------------------------------------------
5 | */
6 |
7 |
8 | // Body text
9 | // -------------------------
10 |
11 | p {
12 | margin: 0 0 ($line-height-computed / 2);
13 | }
14 |
15 |
16 | // Emphasis & misc
17 | // -------------------------
18 |
19 | small { font-size: 85%; }
20 | cite { font-style: normal; }
21 |
22 |
23 | // Alignment
24 | // -------------------------
25 |
26 | .text-left { text-align: left; }
27 | .text-right { text-align: right; }
28 | .text-center { text-align: center; }
29 |
30 |
31 | // Headings
32 | // -------------------------
33 |
34 | h1, h2, h3, h4, h5, h6,
35 | .h1, .h2, .h3, .h4, .h5, .h6 {
36 | color: $base-color;
37 | font-weight: $headings-font-weight;
38 | font-family: $headings-font-family;
39 | line-height: $headings-line-height;
40 |
41 | small {
42 | font-weight: normal;
43 | line-height: 1;
44 | }
45 | }
46 |
47 | h1, .h1,
48 | h2, .h2,
49 | h3, .h3 {
50 | margin-top: $line-height-computed;
51 | margin-bottom: ($line-height-computed / 2);
52 |
53 | &:first-child {
54 | margin-top: 0;
55 | }
56 |
57 | + h1, + .h1,
58 | + h2, + .h2,
59 | + h3, + .h3 {
60 | margin-top: ($line-height-computed / 2);
61 | }
62 | }
63 |
64 | h4, .h4,
65 | h5, .h5,
66 | h6, .h6 {
67 | margin-top: ($line-height-computed / 2);
68 | margin-bottom: ($line-height-computed / 2);
69 | }
70 |
71 | h1, .h1 { font-size: floor($font-size-base * 2.60); } // ~36px
72 | h2, .h2 { font-size: floor($font-size-base * 2.15); } // ~30px
73 | h3, .h3 { font-size: ceil($font-size-base * 1.70); } // ~24px
74 | h4, .h4 { font-size: ceil($font-size-base * 1.25); } // ~18px
75 | h5, .h5 { font-size: $font-size-base; }
76 | h6, .h6 { font-size: ceil($font-size-base * 0.85); } // ~12px
77 |
78 | h1 small, .h1 small { font-size: ceil($font-size-base * 1.70); } // ~24px
79 | h2 small, .h2 small { font-size: ceil($font-size-base * 1.25); } // ~18px
80 | h3 small, .h3 small,
81 | h4 small, .h4 small { font-size: $font-size-base; }
82 |
83 |
84 | // Description Lists
85 | // -------------------------
86 |
87 | dl {
88 | margin-bottom: $line-height-computed;
89 | }
90 | dt,
91 | dd {
92 | line-height: $line-height-base;
93 | }
94 | dt {
95 | font-weight: bold;
96 | }
97 |
98 |
99 | // Blockquotes
100 | // -------------------------
101 |
102 | blockquote {
103 | margin: 0 0 $line-height-computed;
104 | padding: ($line-height-computed / 2) $line-height-computed;
105 | border-left: 5px solid gray;
106 |
107 | p {
108 | font-weight: 300;
109 | font-size: ($font-size-base * 1.25);
110 | line-height: 1.25;
111 | }
112 |
113 | p:last-child {
114 | margin-bottom: 0;
115 | }
116 |
117 | small {
118 | display: block;
119 | line-height: $line-height-base;
120 | &:before {
121 | content: '\2014 \00A0';// EM DASH, NBSP;
122 | }
123 | }
124 | }
125 |
126 |
127 | // Quotes
128 | // -------------------------
129 |
130 | q:before,
131 | q:after,
132 | blockquote:before,
133 | blockquote:after {
134 | content: "";
135 | }
136 |
137 |
138 | // Addresses
139 | // -------------------------
140 |
141 | address {
142 | display: block;
143 | margin-bottom: $line-height-computed;
144 | font-style: normal;
145 | line-height: $line-height-base;
146 | }
147 |
148 |
149 | // Links
150 | // -------------------------
151 |
152 | a.subdued {
153 | padding-right: 10px;
154 | color: #888;
155 | text-decoration: none;
156 |
157 | &:hover {
158 | text-decoration: none;
159 | }
160 | &:last-child {
161 | padding-right: 0;
162 | }
163 | }
164 |
--------------------------------------------------------------------------------
/public/libs/angular-ui-router/src/stateDirectives.js:
--------------------------------------------------------------------------------
1 | function parseStateRef(ref) {
2 | var parsed = ref.replace(/\n/g, " ").match(/^([^(]+?)\s*(\((.*)\))?$/);
3 | if (!parsed || parsed.length !== 4) throw new Error("Invalid state ref '" + ref + "'");
4 | return { state: parsed[1], paramExpr: parsed[3] || null };
5 | }
6 |
7 | function stateContext(el) {
8 | var stateData = el.parent().inheritedData('$uiView');
9 |
10 | if (stateData && stateData.state && stateData.state.name) {
11 | return stateData.state;
12 | }
13 | }
14 |
15 | $StateRefDirective.$inject = ['$state', '$timeout'];
16 | function $StateRefDirective($state, $timeout) {
17 | return {
18 | restrict: 'A',
19 | require: '?^uiSrefActive',
20 | link: function(scope, element, attrs, uiSrefActive) {
21 | var ref = parseStateRef(attrs.uiSref);
22 | var params = null, url = null, base = stateContext(element) || $state.$current;
23 | var isForm = element[0].nodeName === "FORM";
24 | var attr = isForm ? "action" : "href", nav = true;
25 |
26 | var update = function(newVal) {
27 | if (newVal) params = newVal;
28 | if (!nav) return;
29 |
30 | var newHref = $state.href(ref.state, params, { relative: base });
31 |
32 | if (!newHref) {
33 | nav = false;
34 | return false;
35 | }
36 | element[0][attr] = newHref;
37 | if (uiSrefActive) {
38 | uiSrefActive.$$setStateInfo(ref.state, params);
39 | }
40 | };
41 |
42 | if (ref.paramExpr) {
43 | scope.$watch(ref.paramExpr, function(newVal, oldVal) {
44 | if (newVal !== params) update(newVal);
45 | }, true);
46 | params = scope.$eval(ref.paramExpr);
47 | }
48 | update();
49 |
50 | if (isForm) return;
51 |
52 | element.bind("click", function(e) {
53 | var button = e.which || e.button;
54 |
55 | if ((button === 0 || button == 1) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
56 | // HACK: This is to allow ng-clicks to be processed before the transition is initiated:
57 | $timeout(function() {
58 | scope.$apply(function() {
59 | $state.go(ref.state, params, { relative: base });
60 | });
61 | });
62 | e.preventDefault();
63 | }
64 | });
65 | }
66 | };
67 | }
68 |
69 | $StateActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];
70 | function $StateActiveDirective($state, $stateParams, $interpolate) {
71 | return {
72 | restrict: "A",
73 | controller: function($scope, $element, $attrs) {
74 | var state, params, activeClass;
75 |
76 | // There probably isn't much point in $observing this
77 | activeClass = $interpolate($attrs.uiSrefActive || '', false)($scope);
78 |
79 | // Allow uiSref to communicate with uiSrefActive
80 | this.$$setStateInfo = function(newState, newParams) {
81 | state = $state.get(newState, stateContext($element));
82 | params = newParams;
83 | update();
84 | };
85 |
86 | $scope.$on('$stateChangeSuccess', update);
87 |
88 | // Update route state
89 | function update() {
90 | if ($state.$current.self === state && matchesParams()) {
91 | $element.addClass(activeClass);
92 | } else {
93 | $element.removeClass(activeClass);
94 | }
95 | }
96 |
97 | function matchesParams() {
98 | return !params || equalForKeys(params, $stateParams);
99 | }
100 | }
101 | };
102 | }
103 |
104 | angular.module('ui.router.state')
105 | .directive('uiSref', $StateRefDirective)
106 | .directive('uiSrefActive', $StateActiveDirective);
107 |
--------------------------------------------------------------------------------
/public/libs/angular-ui-router/test/urlRouterSpec.js:
--------------------------------------------------------------------------------
1 | describe("UrlRouter", function () {
2 |
3 | var $urp, $ur, location, match, scope;
4 |
5 | beforeEach(function() {
6 | angular.module('ui.router.router.test', function() {}).config(function ($urlRouterProvider) {
7 | $urp = $urlRouterProvider;
8 |
9 | $urp.rule(function ($injector, $location) {
10 | var path = $location.path();
11 | if (!/baz/.test(path)) return false;
12 | return path.replace('baz', 'b4z');
13 | }).when('/foo/:param', function($match) {
14 | match = ['/foo/:param', $match];
15 | }).when('/bar', function($match) {
16 | match = ['/bar', $match];
17 | });
18 | });
19 |
20 | module('ui.router.router', 'ui.router.router.test');
21 |
22 | inject(function($rootScope, $location, $injector) {
23 | scope = $rootScope.$new();
24 | location = $location;
25 | $ur = $injector.invoke($urp.$get);
26 | });
27 | });
28 |
29 | describe("provider", function () {
30 |
31 | it("should throw on non-function rules", function () {
32 | expect(function() { $urp.rule(null); }).toThrow("'rule' must be a function")
33 | expect(function() { $urp.otherwise(null); }).toThrow("'rule' must be a function")
34 | });
35 |
36 | });
37 |
38 | describe("service", function() {
39 | it("should execute rewrite rules", function () {
40 | location.path("/foo");
41 | scope.$emit("$locationChangeSuccess");
42 | expect(location.path()).toBe("/foo");
43 |
44 | location.path("/baz");
45 | scope.$emit("$locationChangeSuccess");
46 | expect(location.path()).toBe("/b4z");
47 | });
48 |
49 | it("should keep otherwise last", function () {
50 | $urp.otherwise('/otherwise');
51 |
52 | location.path("/lastrule");
53 | scope.$emit("$locationChangeSuccess");
54 | expect(location.path()).toBe("/otherwise");
55 |
56 | $urp.when('/lastrule', function($match) {
57 | match = ['/lastrule', $match];
58 | });
59 |
60 | location.path("/lastrule");
61 | scope.$emit("$locationChangeSuccess");
62 | expect(location.path()).toBe("/lastrule");
63 | });
64 |
65 | it("should allow custom URL matchers", function () {
66 | var custom = {
67 | url: { exec: function() {}, format: function() {}, concat: function() {} },
68 | handler: function() {}
69 | };
70 |
71 | spyOn(custom.url, "exec").andReturn({});
72 | spyOn(custom.url, "format").andReturn("/foo-bar");
73 | spyOn(custom, "handler").andReturn(true);
74 |
75 | $urp.when(custom.url, custom.handler);
76 | scope.$broadcast("$locationChangeSuccess");
77 | scope.$apply();
78 |
79 | expect(custom.url.exec).toHaveBeenCalled();
80 | expect(custom.url.format).not.toHaveBeenCalled();
81 | expect(custom.handler).toHaveBeenCalled();
82 | });
83 |
84 | it('can be cancelled by preventDefault() in $locationChangeSuccess', inject(function () {
85 | var called;
86 | location.path("/baz");
87 | scope.$on('$locationChangeSuccess', function (ev) {
88 | ev.preventDefault();
89 | called = true;
90 | });
91 | scope.$emit("$locationChangeSuccess");
92 | expect(called).toBeTruthy();
93 | expect(location.path()).toBe("/baz");
94 | }));
95 |
96 | it('can be deferred and updated in $locationChangeSuccess', inject(function ($urlRouter, $timeout) {
97 | var called;
98 | location.path("/baz");
99 | scope.$on('$locationChangeSuccess', function (ev) {
100 | ev.preventDefault();
101 | called = true;
102 | $timeout($urlRouter.sync, 2000);
103 | });
104 | scope.$emit("$locationChangeSuccess");
105 | $timeout.flush();
106 | expect(called).toBeTruthy();
107 | expect(location.path()).toBe("/b4z");
108 | }));
109 | });
110 |
111 | });
--------------------------------------------------------------------------------
/public/libs/ionic/scss/_toggle.scss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Toggle
4 | * --------------------------------------------------
5 | */
6 |
7 | /* the overall container of the toggle */
8 | .toggle {
9 | // set the color defaults
10 | @include toggle-style($toggle-on-default-border, $toggle-on-default-bg);
11 |
12 | position: relative;
13 | display: inline-block;
14 | margin: -$toggle-hit-area-expansion;
15 | padding: $toggle-hit-area-expansion;
16 |
17 | &.dragging {
18 | .handle {
19 | background-color: $toggle-handle-dragging-bg-color !important;
20 | }
21 | }
22 |
23 | &.toggle-light {
24 | @include toggle-style($toggle-on-light-border, $toggle-on-light-bg);
25 | }
26 | &.toggle-stable {
27 | @include toggle-style($toggle-on-stable-border, $toggle-on-stable-bg);
28 | }
29 | &.toggle-positive {
30 | @include toggle-style($toggle-on-positive-border, $toggle-on-positive-bg);
31 | }
32 | &.toggle-calm {
33 | @include toggle-style($toggle-on-calm-border, $toggle-on-calm-bg);
34 | }
35 | &.toggle-assertive {
36 | @include toggle-style($toggle-on-assertive-border, $toggle-on-assertive-bg);
37 | }
38 | &.toggle-balanced {
39 | @include toggle-style($toggle-on-balanced-border, $toggle-on-balanced-bg);
40 | }
41 | &.toggle-energized {
42 | @include toggle-style($toggle-on-energized-border, $toggle-on-energized-bg);
43 | }
44 | &.toggle-royal {
45 | @include toggle-style($toggle-on-royal-border, $toggle-on-royal-bg);
46 | }
47 | &.toggle-dark {
48 | @include toggle-style($toggle-on-dark-border, $toggle-on-dark-bg);
49 | }
50 | }
51 |
52 | /* hide the actual input checkbox */
53 | .toggle input {
54 | display: none;
55 | }
56 |
57 | /* the track appearance when the toggle is "off" */
58 | .toggle .track {
59 | @include transition-timing-function(ease-in-out);
60 | @include transition-duration($toggle-transition-duration);
61 | @include transition-property((background-color, border));
62 |
63 | display: inline-block;
64 | box-sizing: border-box;
65 | width: $toggle-width;
66 | height: $toggle-height;
67 | border: solid $toggle-border-width $toggle-off-border-color;
68 | border-radius: $toggle-border-radius;
69 | background-color: $toggle-off-bg-color;
70 | content: ' ';
71 | cursor: pointer;
72 | }
73 |
74 | /* the handle (circle) thats inside the toggle's track area */
75 | /* also the handle's appearance when it is "off" */
76 | .toggle .handle {
77 | @include transition($toggle-transition-duration ease-in-out);
78 | position: absolute;
79 | top: $toggle-border-width + $toggle-hit-area-expansion;
80 | left: $toggle-border-width + $toggle-hit-area-expansion;
81 | display: block;
82 | width: $toggle-handle-width;
83 | height: $toggle-handle-height;
84 | border-radius: $toggle-handle-radius;
85 | background-color: $toggle-handle-off-bg-color;
86 |
87 | /* used to create a larger (but hidden) hit area to slide the handle */
88 | &:before {
89 | position: absolute;
90 | top: -4px;
91 | left: ( ($toggle-handle-width / 2) * -1) - 8;
92 | padding: ($toggle-handle-height / 2) + 5 ($toggle-handle-width + 7);
93 | content: " ";
94 | }
95 | }
96 |
97 | /* the handle when the toggle is "on" */
98 | .toggle input:checked + .track .handle {
99 | @include translate3d($toggle-width - $toggle-handle-width - ($toggle-border-width * 2), 0, 0);
100 | background-color: $toggle-handle-on-bg-color;
101 | }
102 |
103 | /* make sure list item content have enough padding on right to fit the toggle */
104 | .item-toggle {
105 | padding-right: ($item-padding * 3) + $toggle-width;
106 |
107 | &.active {
108 | box-shadow: none;
109 | }
110 | }
111 |
112 | /* position the toggle to the right within a list item */
113 | .item-toggle .toggle {
114 | position: absolute;
115 | top: $item-padding / 2;
116 | right: $item-padding;
117 | z-index: $z-index-item-toggle;
118 | }
119 |
120 | .toggle input:disabled + .track {
121 | opacity: .6;
122 | }
123 |
--------------------------------------------------------------------------------
/public/libs/angular-ui-router/src/templateFactory.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Service. Manages loading of templates.
3 | * @constructor
4 | * @name $templateFactory
5 | * @requires $http
6 | * @requires $templateCache
7 | * @requires $injector
8 | */
9 | $TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
10 | function $TemplateFactory( $http, $templateCache, $injector) {
11 |
12 | /**
13 | * Creates a template from a configuration object.
14 | * @function
15 | * @name $templateFactory#fromConfig
16 | * @methodOf $templateFactory
17 | * @param {Object} config Configuration object for which to load a template. The following
18 | * properties are search in the specified order, and the first one that is defined is
19 | * used to create the template:
20 | * @param {string|Function} config.template html string template or function to load via
21 | * {@link $templateFactory#fromString fromString}.
22 | * @param {string|Function} config.templateUrl url to load or a function returning the url
23 | * to load via {@link $templateFactory#fromUrl fromUrl}.
24 | * @param {Function} config.templateProvider function to invoke via
25 | * {@link $templateFactory#fromProvider fromProvider}.
26 | * @param {Object} params Parameters to pass to the template function.
27 | * @param {Object} [locals] Locals to pass to `invoke` if the template is loaded via a
28 | * `templateProvider`. Defaults to `{ params: params }`.
29 | * @return {string|Promise.' + $scope.loggedInUser + ' says :
' + chatMsg + '