.
8 | .list-group {
9 | // No need to set list-style: none; since .list-group-item is block level
10 | margin-bottom: 20px;
11 | padding-left: 0; // reset padding because ul and ol
12 | }
13 |
14 | // Individual list items
15 | // -------------------------
16 |
17 | .list-group-item {
18 | position: relative;
19 | display: block;
20 | padding: 10px 15px;
21 | // Place the border on the list items and negative margin up for better styling
22 | margin-bottom: -1px;
23 | background-color: @list-group-bg;
24 | border: 1px solid @list-group-border;
25 |
26 | // Round the first and last items
27 | &:first-child {
28 | .border-top-radius(@list-group-border-radius);
29 | }
30 | &:last-child {
31 | margin-bottom: 0;
32 | .border-bottom-radius(@list-group-border-radius);
33 | }
34 |
35 | // Align badges within list items
36 | > .badge {
37 | float: right;
38 | }
39 | > .badge + .badge {
40 | margin-right: 5px;
41 | }
42 | }
43 |
44 | // Linked list items
45 | a.list-group-item {
46 | color: @list-group-link-color;
47 |
48 | .list-group-item-heading {
49 | color: @list-group-link-heading-color;
50 | }
51 |
52 | // Hover state
53 | &:hover,
54 | &:focus {
55 | text-decoration: none;
56 | background-color: @list-group-hover-bg;
57 | }
58 |
59 | // Active class on item itself, not parent
60 | &.active,
61 | &.active:hover,
62 | &.active:focus {
63 | z-index: 2; // Place active items above their siblings for proper border styling
64 | color: @list-group-active-color;
65 | background-color: @list-group-active-bg;
66 | border-color: @list-group-active-border;
67 |
68 | // Force color to inherit for custom content
69 | .list-group-item-heading {
70 | color: inherit;
71 | }
72 | .list-group-item-text {
73 | color: lighten(@list-group-active-bg, 40%);
74 | }
75 | }
76 | }
77 |
78 | // Custom content options
79 | // -------------------------
80 |
81 | .list-group-item-heading {
82 | margin-top: 0;
83 | margin-bottom: 5px;
84 | }
85 | .list-group-item-text {
86 | margin-bottom: 0;
87 | line-height: 1.3;
88 | }
89 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/media.less:
--------------------------------------------------------------------------------
1 | // Media objects
2 | // Source: http://stubbornella.org/content/?p=497
3 | // --------------------------------------------------
4 |
5 |
6 | // Common styles
7 | // -------------------------
8 |
9 | // Clear the floats
10 | .media,
11 | .media-body {
12 | overflow: hidden;
13 | zoom: 1;
14 | }
15 |
16 | // Proper spacing between instances of .media
17 | .media,
18 | .media .media {
19 | margin-top: 15px;
20 | }
21 | .media:first-child {
22 | margin-top: 0;
23 | }
24 |
25 | // For images and videos, set to block
26 | .media-object {
27 | display: block;
28 | }
29 |
30 | // Reset margins on headings for tighter default spacing
31 | .media-heading {
32 | margin: 0 0 5px;
33 | }
34 |
35 |
36 | // Media image alignment
37 | // -------------------------
38 |
39 | .media {
40 | > .pull-left {
41 | margin-right: 10px;
42 | }
43 | > .pull-right {
44 | margin-left: 10px;
45 | }
46 | }
47 |
48 |
49 | // Media list variation
50 | // -------------------------
51 |
52 | // Undo default ul/ol styles
53 | .media-list {
54 | padding-left: 0;
55 | list-style: none;
56 | }
57 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/pager.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pager pagination
3 | // --------------------------------------------------
4 |
5 |
6 | .pager {
7 | padding-left: 0;
8 | margin: @line-height-computed 0;
9 | list-style: none;
10 | text-align: center;
11 | .clearfix();
12 | li {
13 | display: inline;
14 | > a,
15 | > span {
16 | display: inline-block;
17 | padding: 5px 14px;
18 | background-color: @pagination-bg;
19 | border: 1px solid @pagination-border;
20 | border-radius: @pager-border-radius;
21 | }
22 |
23 | > a:hover,
24 | > a:focus {
25 | text-decoration: none;
26 | background-color: @pagination-hover-bg;
27 | }
28 | }
29 |
30 | .next {
31 | > a,
32 | > span {
33 | float: right;
34 | }
35 | }
36 |
37 | .previous {
38 | > a,
39 | > span {
40 | float: left;
41 | }
42 | }
43 |
44 | .disabled {
45 | > a,
46 | > a:hover,
47 | > a:focus,
48 | > span {
49 | color: @pager-disabled-color;
50 | background-color: @pagination-bg;
51 | cursor: not-allowed;
52 | }
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/pagination.less:
--------------------------------------------------------------------------------
1 | //
2 | // Pagination (multiple pages)
3 | // --------------------------------------------------
4 | .pagination {
5 | display: inline-block;
6 | padding-left: 0;
7 | margin: @line-height-computed 0;
8 | border-radius: @border-radius-base;
9 |
10 | > li {
11 | display: inline; // Remove list-style and block-level defaults
12 | > a,
13 | > span {
14 | position: relative;
15 | float: left; // Collapse white-space
16 | padding: @padding-base-vertical @padding-base-horizontal;
17 | line-height: @line-height-base;
18 | text-decoration: none;
19 | background-color: @pagination-bg;
20 | border: 1px solid @pagination-border;
21 | margin-left: -1px;
22 | }
23 | &:first-child {
24 | > a,
25 | > span {
26 | margin-left: 0;
27 | .border-left-radius(@border-radius-base);
28 | }
29 | }
30 | &:last-child {
31 | > a,
32 | > span {
33 | .border-right-radius(@border-radius-base);
34 | }
35 | }
36 | }
37 |
38 | > li > a,
39 | > li > span {
40 | &:hover,
41 | &:focus {
42 | background-color: @pagination-hover-bg;
43 | }
44 | }
45 |
46 | > .active > a,
47 | > .active > span {
48 | &,
49 | &:hover,
50 | &:focus {
51 | z-index: 2;
52 | color: @pagination-active-color;
53 | background-color: @pagination-active-bg;
54 | border-color: @pagination-active-bg;
55 | cursor: default;
56 | }
57 | }
58 |
59 | > .disabled {
60 | > span,
61 | > span:hover,
62 | > span:focus,
63 | > a,
64 | > a:hover,
65 | > a:focus {
66 | color: @pagination-disabled-color;
67 | background-color: @pagination-bg;
68 | border-color: @pagination-border;
69 | cursor: not-allowed;
70 | }
71 | }
72 | }
73 |
74 | // Sizing
75 | // --------------------------------------------------
76 |
77 | // Large
78 | .pagination-lg {
79 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large);
80 | }
81 |
82 | // Small
83 | .pagination-sm {
84 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small);
85 | }
86 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/print.less:
--------------------------------------------------------------------------------
1 | //
2 | // Basic print styles
3 | // --------------------------------------------------
4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css
5 |
6 | @media print {
7 |
8 | * {
9 | text-shadow: none !important;
10 | color: #000 !important; // Black prints faster: h5bp.com/s
11 | background: transparent !important;
12 | box-shadow: none !important;
13 | }
14 |
15 | a,
16 | a:visited {
17 | text-decoration: underline;
18 | }
19 |
20 | a[href]:after {
21 | content: " (" attr(href) ")";
22 | }
23 |
24 | abbr[title]:after {
25 | content: " (" attr(title) ")";
26 | }
27 |
28 | // Don't show links for images, or javascript/internal links
29 | a[href^="javascript:"]:after,
30 | a[href^="#"]:after {
31 | content: "";
32 | }
33 |
34 | pre,
35 | blockquote {
36 | border: 1px solid #999;
37 | page-break-inside: avoid;
38 | }
39 |
40 | thead {
41 | display: table-header-group; // h5bp.com/t
42 | }
43 |
44 | tr,
45 | img {
46 | page-break-inside: avoid;
47 | }
48 |
49 | img {
50 | max-width: 100% !important;
51 | }
52 |
53 | @page {
54 | margin: 2cm .5cm;
55 | }
56 |
57 | p,
58 | h2,
59 | h3 {
60 | orphans: 3;
61 | widows: 3;
62 | }
63 |
64 | h2,
65 | h3 {
66 | page-break-after: avoid;
67 | }
68 |
69 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245
70 | // Once fixed, we can just straight up remove this.
71 | select {
72 | background: #fff !important;
73 | }
74 |
75 | // Bootstrap components
76 | .navbar {
77 | display: none;
78 | }
79 | .table {
80 | td,
81 | th {
82 | background-color: #fff !important;
83 | }
84 | }
85 | .btn,
86 | .dropup > .btn {
87 | > .caret {
88 | border-top-color: #000 !important;
89 | }
90 | }
91 | .label {
92 | border: 1px solid #000;
93 | }
94 |
95 | .table {
96 | border-collapse: collapse !important;
97 | }
98 | .table-bordered {
99 | th,
100 | td {
101 | border: 1px solid #ddd !important;
102 | }
103 | }
104 |
105 | }
106 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/progress-bars.less:
--------------------------------------------------------------------------------
1 | //
2 | // Progress bars
3 | // --------------------------------------------------
4 |
5 |
6 | // Bar animations
7 | // -------------------------
8 |
9 | // WebKit
10 | @-webkit-keyframes progress-bar-stripes {
11 | from { background-position: 40px 0; }
12 | to { background-position: 0 0; }
13 | }
14 |
15 | // Firefox
16 | @-moz-keyframes progress-bar-stripes {
17 | from { background-position: 40px 0; }
18 | to { background-position: 0 0; }
19 | }
20 |
21 | // Opera
22 | @-o-keyframes progress-bar-stripes {
23 | from { background-position: 0 0; }
24 | to { background-position: 40px 0; }
25 | }
26 |
27 | // Spec and IE10+
28 | @keyframes progress-bar-stripes {
29 | from { background-position: 40px 0; }
30 | to { background-position: 0 0; }
31 | }
32 |
33 |
34 |
35 | // Bar itself
36 | // -------------------------
37 |
38 | // Outer container
39 | .progress {
40 | overflow: hidden;
41 | height: @line-height-computed;
42 | margin-bottom: @line-height-computed;
43 | background-color: @progress-bg;
44 | border-radius: @border-radius-base;
45 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));
46 | }
47 |
48 | // Bar of progress
49 | .progress-bar {
50 | float: left;
51 | width: 0%;
52 | height: 100%;
53 | font-size: @font-size-small;
54 | line-height: @line-height-computed;
55 | color: @progress-bar-color;
56 | text-align: center;
57 | background-color: @progress-bar-bg;
58 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));
59 | .transition(width .6s ease);
60 | }
61 |
62 | // Striped bars
63 | .progress-striped .progress-bar {
64 | #gradient > .striped();
65 | background-size: 40px 40px;
66 | }
67 |
68 | // Call animation for the active one
69 | .progress.active .progress-bar {
70 | .animation(progress-bar-stripes 2s linear infinite);
71 | }
72 |
73 |
74 |
75 | // Variations
76 | // -------------------------
77 |
78 | .progress-bar-success {
79 | .progress-bar-variant(@progress-bar-success-bg);
80 | }
81 |
82 | .progress-bar-info {
83 | .progress-bar-variant(@progress-bar-info-bg);
84 | }
85 |
86 | .progress-bar-warning {
87 | .progress-bar-variant(@progress-bar-warning-bg);
88 | }
89 |
90 | .progress-bar-danger {
91 | .progress-bar-variant(@progress-bar-danger-bg);
92 | }
93 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/scaffolding.less:
--------------------------------------------------------------------------------
1 | //
2 | // Scaffolding
3 | // --------------------------------------------------
4 |
5 |
6 | // Reset the box-sizing
7 |
8 | *,
9 | *:before,
10 | *:after {
11 | .box-sizing(border-box);
12 | }
13 |
14 |
15 | // Body reset
16 |
17 | html {
18 | font-size: 62.5%;
19 | -webkit-tap-highlight-color: rgba(0,0,0,0);
20 | }
21 |
22 | body {
23 | font-family: @font-family-base;
24 | font-size: @font-size-base;
25 | line-height: @line-height-base;
26 | color: @text-color;
27 | background-color: @body-bg;
28 | }
29 |
30 | // Reset fonts for relevant elements
31 | input,
32 | button,
33 | select,
34 | textarea {
35 | font-family: inherit;
36 | font-size: inherit;
37 | line-height: inherit;
38 | }
39 |
40 |
41 | // Links
42 |
43 | a {
44 | color: @link-color;
45 | text-decoration: none;
46 |
47 | &:hover,
48 | &:focus {
49 | color: @link-hover-color;
50 | text-decoration: underline;
51 | }
52 |
53 | &:focus {
54 | .tab-focus();
55 | }
56 | }
57 |
58 |
59 | // Images
60 |
61 | img {
62 | vertical-align: middle;
63 | }
64 |
65 | // Responsive images (ensure images don't scale beyond their parents)
66 | .img-responsive {
67 | .img-responsive();
68 | }
69 |
70 | // Rounded corners
71 | .img-rounded {
72 | border-radius: @border-radius-large;
73 | }
74 |
75 | // Image thumbnails
76 | //
77 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.
78 | .img-thumbnail {
79 | padding: @thumbnail-padding;
80 | line-height: @line-height-base;
81 | background-color: @thumbnail-bg;
82 | border: 1px solid @thumbnail-border;
83 | border-radius: @thumbnail-border-radius;
84 | .transition(all .2s ease-in-out);
85 |
86 | // Keep them at most 100% wide
87 | .img-responsive(inline-block);
88 | }
89 |
90 | // Perfect circle
91 | .img-circle {
92 | border-radius: 50%; // set radius in percents
93 | }
94 |
95 |
96 | // Horizontal rules
97 |
98 | hr {
99 | margin-top: @line-height-computed;
100 | margin-bottom: @line-height-computed;
101 | border: 0;
102 | border-top: 1px solid @hr-border;
103 | }
104 |
105 |
106 | // Only display content to screen readers
107 | //
108 | // See: http://a11yproject.com/posts/how-to-hide-content/
109 |
110 | .sr-only {
111 | position: absolute;
112 | width: 1px;
113 | height: 1px;
114 | margin: -1px;
115 | padding: 0;
116 | overflow: hidden;
117 | clip: rect(0,0,0,0);
118 | border: 0;
119 | }
120 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/thumbnails.less:
--------------------------------------------------------------------------------
1 | //
2 | // Thumbnails
3 | // --------------------------------------------------
4 |
5 |
6 | // Mixin and adjust the regular image class
7 | .thumbnail {
8 | .img-thumbnail();
9 | display: block; // Override the inline-block from `.img-thumbnail`
10 | margin-bottom: @line-height-computed;
11 |
12 | > img {
13 | .img-responsive();
14 | margin-left: auto;
15 | margin-right: auto;
16 | }
17 |
18 | // Add a hover state for linked versions only
19 | a&:hover,
20 | a&:focus,
21 | a&.active {
22 | border-color: @link-color;
23 | }
24 |
25 | // Image captions
26 | .caption {
27 | padding: @thumbnail-caption-padding;
28 | color: @thumbnail-caption-color;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/tooltip.less:
--------------------------------------------------------------------------------
1 | //
2 | // Tooltips
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .tooltip {
8 | position: absolute;
9 | z-index: @zindex-tooltip;
10 | display: block;
11 | visibility: visible;
12 | font-size: @font-size-small;
13 | line-height: 1.4;
14 | .opacity(0);
15 |
16 | &.in { .opacity(.9); }
17 | &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }
18 | &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }
19 | &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }
20 | &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }
21 | }
22 |
23 | // Wrapper for the tooltip content
24 | .tooltip-inner {
25 | max-width: @tooltip-max-width;
26 | padding: 3px 8px;
27 | color: @tooltip-color;
28 | text-align: center;
29 | text-decoration: none;
30 | background-color: @tooltip-bg;
31 | border-radius: @border-radius-base;
32 | }
33 |
34 | // Arrows
35 | .tooltip-arrow {
36 | position: absolute;
37 | width: 0;
38 | height: 0;
39 | border-color: transparent;
40 | border-style: solid;
41 | }
42 | .tooltip {
43 | &.top .tooltip-arrow {
44 | bottom: 0;
45 | left: 50%;
46 | margin-left: -@tooltip-arrow-width;
47 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
48 | border-top-color: @tooltip-arrow-color;
49 | }
50 | &.top-left .tooltip-arrow {
51 | bottom: 0;
52 | left: @tooltip-arrow-width;
53 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
54 | border-top-color: @tooltip-arrow-color;
55 | }
56 | &.top-right .tooltip-arrow {
57 | bottom: 0;
58 | right: @tooltip-arrow-width;
59 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
60 | border-top-color: @tooltip-arrow-color;
61 | }
62 | &.right .tooltip-arrow {
63 | top: 50%;
64 | left: 0;
65 | margin-top: -@tooltip-arrow-width;
66 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
67 | border-right-color: @tooltip-arrow-color;
68 | }
69 | &.left .tooltip-arrow {
70 | top: 50%;
71 | right: 0;
72 | margin-top: -@tooltip-arrow-width;
73 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
74 | border-left-color: @tooltip-arrow-color;
75 | }
76 | &.bottom .tooltip-arrow {
77 | top: 0;
78 | left: 50%;
79 | margin-left: -@tooltip-arrow-width;
80 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
81 | border-bottom-color: @tooltip-arrow-color;
82 | }
83 | &.bottom-left .tooltip-arrow {
84 | top: 0;
85 | left: @tooltip-arrow-width;
86 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
87 | border-bottom-color: @tooltip-arrow-color;
88 | }
89 | &.bottom-right .tooltip-arrow {
90 | top: 0;
91 | right: @tooltip-arrow-width;
92 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
93 | border-bottom-color: @tooltip-arrow-color;
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/utilities.less:
--------------------------------------------------------------------------------
1 | //
2 | // Utility classes
3 | // --------------------------------------------------
4 |
5 |
6 | // Floats
7 | // -------------------------
8 |
9 | .clearfix {
10 | .clearfix();
11 | }
12 | .center-block {
13 | .center-block();
14 | }
15 | .pull-right {
16 | float: right !important;
17 | }
18 | .pull-left {
19 | float: left !important;
20 | }
21 |
22 |
23 | // Toggling content
24 | // -------------------------
25 |
26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1
27 | .hide {
28 | display: none !important;
29 | }
30 | .show {
31 | display: block !important;
32 | }
33 | .invisible {
34 | visibility: hidden;
35 | }
36 | .text-hide {
37 | .text-hide();
38 | }
39 |
40 |
41 | // Hide from screenreaders and browsers
42 | //
43 | // Credit: HTML5 Boilerplate
44 |
45 | .hidden {
46 | display: none !important;
47 | visibility: hidden !important;
48 | }
49 |
50 |
51 | // For Affix plugin
52 | // -------------------------
53 |
54 | .affix {
55 | position: fixed;
56 | }
57 |
--------------------------------------------------------------------------------
/src/libs/bootstrap/less/wells.less:
--------------------------------------------------------------------------------
1 | //
2 | // Wells
3 | // --------------------------------------------------
4 |
5 |
6 | // Base class
7 | .well {
8 | min-height: 20px;
9 | padding: 19px;
10 | margin-bottom: 20px;
11 | background-color: @well-bg;
12 | border: 1px solid darken(@well-bg, 7%);
13 | border-radius: @border-radius-base;
14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));
15 | blockquote {
16 | border-color: #ddd;
17 | border-color: rgba(0,0,0,.15);
18 | }
19 | }
20 |
21 | // Sizes
22 | .well-lg {
23 | padding: 24px;
24 | border-radius: @border-radius-large;
25 | }
26 | .well-sm {
27 | padding: 9px;
28 | border-radius: @border-radius-small;
29 | }
30 |
--------------------------------------------------------------------------------
/src/style/fonts/cisco/CiscoSansExtraLight.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/CiscoSansExtraLight.otf
--------------------------------------------------------------------------------
/src/style/fonts/cisco/CiscoSansRegular.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/CiscoSansRegular.otf
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansextralight-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansextralight-webfont.eot
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansextralight-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansextralight-webfont.ttf
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansextralight-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansextralight-webfont.woff
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansregular-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansregular-webfont.eot
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansregular-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansregular-webfont.ttf
--------------------------------------------------------------------------------
/src/style/fonts/cisco/ciscosansregular-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/cisco/ciscosansregular-webfont.woff
--------------------------------------------------------------------------------
/src/style/fonts/next-font.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/next-font.eot
--------------------------------------------------------------------------------
/src/style/fonts/next-font.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/next-font.ttf
--------------------------------------------------------------------------------
/src/style/fonts/next-font.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/fonts/next-font.woff
--------------------------------------------------------------------------------
/src/style/topology/common.less:
--------------------------------------------------------------------------------
1 | .n-userselect,
2 | .n-userselect * {
3 | .user-select(none);
4 | }
5 |
6 | .n-transition {
7 | -webkit-transition: all 0.4 !important; /* For Safari 3.1 to 6.0 */
8 | transition: all 0.4s !important;
9 | }
10 |
11 | .n-moveCursor {
12 | cursor: move !important;
13 | }
14 |
15 | .n-dragCursor {
16 | cursor: pointer;
17 | }
18 |
19 | .n-crosshairCursor,
20 | .n-crosshairCursor * {
21 | cursor: crosshair !important;
22 | }
23 |
24 | .n-zoomInCursor {
25 | cursor: -webkit-zoom-in;
26 | cursor: zoom-in;
27 | }
28 |
29 | .n-waitCursor {
30 | cursor: wait;
31 | }
32 |
33 | .n-blockEvent,
34 | .n-blockEvent * {
35 | pointer-events: none;
36 | }
37 |
38 | .n-hidden {
39 | display: none !important;
40 | }
--------------------------------------------------------------------------------
/src/style/topology/common/topology-3d.less:
--------------------------------------------------------------------------------
1 |
2 | .n-topology-3d {
3 | transition: all 0.6s;
4 | -moz-transition: all 0.6s;
5 | position: absolute;
6 | #gradient > .vertical(#8996A7 ,#C2C8D4);
7 | //-webkit-transform-style: preserve-3d;
8 |
9 | canvas {
10 | position: absolute;
11 | top: 0px;
12 | }
13 |
14 | &-transparent {
15 | opacity: 0;
16 | }
17 |
18 | &-frame {
19 | position: absolute;
20 | perspective: 600;
21 | transform-style: preserve-3d;
22 | transform: translateY(100%);
23 |
24 | -webkit-perspective: 600;
25 | -webkit-transform-style: preserve-3d;
26 | -webkit-transform: translateY(100%);
27 |
28 | -moz-transform-style: preserve-3d;
29 | -moz-transform: ~"perspective(600px) translateY(100%)";
30 |
31 | transition: all 0.6s;
32 | -moz-transition: all 0.6s;
33 | }
34 | &-frame-content {
35 | box-sizing: border-box;
36 | position: absolute;
37 | opacity: 0;
38 | background: #F2F2F2;
39 | border: solid 2px #3F94E9;
40 | transition: all 0.6s;
41 | transform: rotateY(0deg);
42 | transform-origin: 0% 50%;
43 | -webkit-transform: rotateY(0deg);
44 | -webkit-transform-origin: 0% 50%;
45 |
46 | -moz-transform: rotateY(0deg);
47 | -moz-transform-origin: 0% 50%;
48 |
49 | &:hover {
50 | opacity: 1 !important;
51 | box-shadow: 0px 0px 30px #5DA8FF;
52 | }
53 |
54 | h1 {
55 | position: absolute;
56 | top: -62px;
57 | }
58 |
59 | &:after {
60 | // box-sizing: border-box;
61 | opacity: 0.4;
62 | content: " ";
63 | display: inline-block;
64 | width: 100%;
65 | // margin-left: -100%;
66 | margin-bottom: -3px;
67 | background: #F2F2F2;
68 | height: 50px;
69 | border: solid 2px #3F94E9;
70 | -webkit-mask-box-image: -webkit-linear-gradient(white, transparent 50%);
71 | -moz-mask-box-image: -webkit-linear-gradient(white, transparent 50%);
72 | }
73 |
74 | }
75 |
76 | &-transformed {
77 | .n-topology3d-frame-content {
78 | opacity: 0.5;
79 | -webkit-transform: rotateY(30deg) scale(0.6);
80 | -moz-transform: rotateY(30deg) scale(0.6);
81 | }
82 | }
83 |
84 | [transform=true] {
85 | left: 50% !important;
86 |
87 | z-index: 1000;
88 | .n-topology3d-frame-content {
89 | opacity: 1;
90 | -webkit-transform: rotateY(0deg) scale(1);
91 | -moz-transform: rotateY(0deg) scale(1);
92 | box-shadow: 0px 0px 0px;
93 | }
94 | }
95 |
96 | circle {
97 | fill: #27F;
98 | }
99 |
100 | text {
101 | fill: #27F;
102 | color: #27F;
103 | }
104 |
105 | .node_group {
106 | opacity: 0.4;
107 | fill: #ADB2DD;
108 | stroke: #ADB2DD;
109 | stroke-width: 1px;
110 | stroke-linejoin: round;
111 |
112 | }
113 |
114 | .close {
115 | position: absolute;
116 | right: 10px;
117 | top: 10px;
118 | cursor: pointer;
119 | transition: all 0.3s;
120 | &:hover {
121 | -webkit-transform: rotateZ(90deg);
122 | -moz-transform: rotateZ(90deg);
123 | }
124 | }
125 |
126 | }
127 |
--------------------------------------------------------------------------------
/src/style/topology/common/topology.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/topology/common/topology.css
--------------------------------------------------------------------------------
/src/style/topology/common/topology_loading.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/topology/common/topology_loading.css
--------------------------------------------------------------------------------
/src/style/topology/common/topology_thumbnail.less:
--------------------------------------------------------------------------------
1 | .n-topology-thumbnail {
2 | position: absolute;
3 | border: solid 1px #ccc;
4 | box-shadow: 0px 0px 10px #ccc;
5 | margin-top: -10px;
6 | margin-left: -10px;
7 | z-index: 100;
8 | background: #fff;
9 | &-container {
10 | position: relative;
11 | }
12 | &-win {
13 | position: absolute;
14 | border: solid 1px #f00;
15 | }
16 |
17 | &-svg {
18 | border: solid 1px #c4c4c4;
19 | background: #fff;
20 | }
21 | .handler {
22 | position: absolute;
23 | bottom: 0px;
24 | right: 0px;
25 | cursor: pointer;
26 | }
27 |
28 | }
--------------------------------------------------------------------------------
/src/style/topology/common/topology_tooltip.less:
--------------------------------------------------------------------------------
1 | @tooltipArrowsize: 8px;
2 | @tootipWidth: 200px;
3 | .n-topology-tooltip {
4 | padding: 0px;
5 | opacity: 0.8 !important;
6 | max-height: 450px;
7 | &-header {
8 | min-width: 160px;
9 | line-height: 24px;
10 | position: relative;
11 | border-bottom: dotted 1px #ccc;
12 |
13 | &-actions {
14 | float: right;
15 |
16 | i {
17 | cursor: pointer;
18 | }
19 |
20 | }
21 | &-text {
22 | line-height: 24px;
23 | color: #333;
24 | font-size: 14px;
25 | font-weight: bold;
26 | }
27 |
28 | }
29 | &-content {
30 | margin-bottom: 6px;
31 | padding: 3px;
32 | min-height: 30px;
33 |
34 | label {
35 | display: inline-block;
36 | margin-right: 8px;
37 | font-weight: bold;
38 | }
39 |
40 | ul {
41 | margin: 0;
42 | padding: 0px;
43 | }
44 | li {
45 | list-style: none;
46 | }
47 |
48 | }
49 |
50 | &:after {
51 | display: none;
52 | }
53 |
54 | .popover-content {
55 | padding: 5px 10px;
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/src/style/topology/next-topology-componentized.less:
--------------------------------------------------------------------------------
1 | .next{
2 | @import "../../libs/bootstrap/less/mixins.less";
3 | @import "common/font.less";
4 | @import "common/topology.less";
5 | @import "themes/blue/blue.less";
6 | @import "themes/dark/dark.less";
7 | @import "themes/green/green.less";
8 | @import "themes/slate/slate.less";
9 | @import "themes/yellow/yellow.less";
10 | @import "common/topology_tooltip.less";
11 | @import "common/topology_nav.less";
12 | @import "common/topology_loading.less";
13 | @import "common/topology_thumbnail.less";
14 | @import "common.less";
15 | @import "themes/blue/variables.less";
16 | @import "../../libs/bootstrap/less/utilities.less";
17 | @import "../../libs/bootstrap/less/buttons.less";
18 | @import "../../libs/bootstrap/less/button-groups.less";
19 | @import "../../libs/bootstrap/less/popovers.less";
20 | }
--------------------------------------------------------------------------------
/src/style/topology/next-topology.less:
--------------------------------------------------------------------------------
1 | @import "../../libs/bootstrap/less/mixins";
2 | @import "common/font.less";
3 | @import "common/topology.less";
4 | @import "themes/blue/blue.less";
5 | @import "themes/dark/dark.less";
6 | @import "themes/green/green.less";
7 | @import "themes/slate/slate.less";
8 | @import "themes/yellow/yellow.less";
9 | @import "common/topology_tooltip.less";
10 | @import "common/topology_nav.less";
11 | @import "common/topology_loading.less";
12 | @import "common/topology_thumbnail.less";
13 | @import "common.less";
14 | @import "themes/blue/variables.less";
15 | @import "../../libs/bootstrap/less/utilities.less";
16 | @import "../../libs/bootstrap/less/buttons.less";
17 | @import "../../libs/bootstrap/less/button-groups.less";
18 | @import "../../libs/bootstrap/less/popovers.less";
19 |
--------------------------------------------------------------------------------
/src/style/topology/themes/black-white/variables.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/topology/themes/black-white/variables.css
--------------------------------------------------------------------------------
/src/style/topology/themes/blue/blue.less:
--------------------------------------------------------------------------------
1 | .n-topology.n-topology-blue {
2 | @import "variables";
3 | .n-topology(@brand-primary, @brand-info, @body-bg, @gray-lighter, @brand-warning,lighten(@brand-primary, 50%),lighten(@brand-primary, 42%));
4 | .n-topology-nav(darken(@body-bg, 8.1%),darken(@body-bg, 15.5%),lighten(@text-color,40%),darken(@body-bg, 15.1%),lighten(@text-color,30%),lighten(@text-color,10%),@brand-primary,@body-bg);
5 | .n-topology-loading(@brand-primary);
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/src/style/topology/themes/dark/dark.less:
--------------------------------------------------------------------------------
1 | .n-topology.n-topology-dark{
2 | @import "variables";
3 | .n-topology(@brand-primary,@brand-info,@body-bg,@component-active-color,@brand-warning,lighten(@brand-primary, 50%),lighten(@brand-primary, 42%)) ;
4 | .n-topology-nav(lighten(@body-bg, 20%),lighten(@body-bg, 25%),darken(@text-color,40%),lighten(@body-bg, 30%),darken(@text-color,10%),darken(@text-color,10%),@brand-primary,@body-bg);
5 | .n-topology-loading(@brand-primary);
6 | }
--------------------------------------------------------------------------------
/src/style/topology/themes/green/green.less:
--------------------------------------------------------------------------------
1 | .n-topology.n-topology-green{
2 | @import "variables";
3 | .n-topology(@brand-primary,@brand-info,@body-bg,@gray-lighter,@brand-warning,lighten(@brand-primary, 50%),lighten(@brand-primary, 42%)) ;
4 | .n-topology-nav(darken(@body-bg, 8.1%),darken(@body-bg, 15.5%),lighten(@text-color,40%),darken(@body-bg, 15.1%),lighten(@text-color,30%),lighten(@text-color,10%),@brand-primary,@body-bg);
5 | .n-topology-loading(@brand-primary);
6 | }
--------------------------------------------------------------------------------
/src/style/topology/themes/slate/slate.less:
--------------------------------------------------------------------------------
1 | .n-topology.n-topology-slate{
2 | @import "variables";
3 | .n-topology(@brand-primary,@brand-info,@body-bg,@component-active-color,@brand-warning,lighten(@brand-primary, 50%),lighten(@gray, 60%)) ;
4 | .n-topology-nav(lighten(@body-bg, 20%),lighten(@body-bg, 25%),darken(@text-color,40%),lighten(@body-bg, 30%),darken(@text-color,10%),darken(@text-color,10%),@brand-primary,@body-bg);
5 | .n-topology-loading(@brand-primary);
6 | }
--------------------------------------------------------------------------------
/src/style/topology/themes/yellow/yellow.less:
--------------------------------------------------------------------------------
1 | .n-topology.n-topology-yellow{
2 | @import "variables";
3 | .n-topology(@brand-primary,@brand-info,@body-bg,@component-active-color,@brand-warning,@gray-dark,@gray) ;
4 | .n-topology-nav(lighten(@body-bg, 20%),lighten(@body-bg, 25%),darken(@text-color,40%),lighten(@body-bg, 30%),darken(@text-color,10%),darken(@text-color,10%),@brand-primary,@body-bg);
5 | .n-topology-loading(@brand-primary);
6 | }
--------------------------------------------------------------------------------
/src/style/web/common.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Cisco Sans Extra Light";
3 | src: ~"url('../fonts/cisco/ciscosansextralight-webfont.eot')";
4 | src: ~"url('../fonts/cisco/ciscosansextralight-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/cisco/ciscosansextralight-webfont.woff') format('woff'), url('../fonts/cisco/ciscosansextralight-webfont.ttf') format('truetype'), url('../fonts/cisco/ciscosansextralight-webfont.svg#CiscoSansExtraLight') format('svg')";
5 | font-weight: normal;
6 | font-style: normal;
7 | }
8 |
9 | @font-face {
10 | font-family: "Cisco Sans Reg";
11 | src: ~"url('../fonts/cisco/ciscosansregular-webfont.eot')";
12 | src: ~"url('../fonts/cisco/ciscosansregular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/cisco/ciscosansregular-webfont.woff') format('woff'), url('../fonts/cisco/ciscosansregular-webfont.ttf') format('truetype'), url('../fonts/cisco/ciscosansregular-webfont.svg#CiscoSansReg') format('svg')";
13 | font-weight: normal;
14 | font-style: normal;
15 | }
--------------------------------------------------------------------------------
/src/style/web/themes/blue/next-componentlized.less:
--------------------------------------------------------------------------------
1 | .nx {
2 | @import "../../../bootstrap/less/bootstrap.less";
3 | @import "../../common.less";
4 | @import "variables.less";
5 | @import "overrides.less";
6 | @import "../../../bootstrap/less/utilities.less";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/style/web/themes/blue/next.less:
--------------------------------------------------------------------------------
1 | @import "../../libs/bootstrap/less/bootstrap.less";
2 | @import "../../common.less";
3 | @import "variables.less";
4 | @import "overrides.less";
5 | @import "../../libs/bootstrap/less/utilities.less";
--------------------------------------------------------------------------------
/src/style/web/themes/blue/overrides.less:
--------------------------------------------------------------------------------
1 | .navbar-brand {
2 | font-family: @headings-font-family;
3 | font-size: 24px;
4 | }
5 |
6 | .dropdown-menu {
7 | > li > a {
8 | &:hover {
9 | color: #fff;
10 | background: @brand-primary;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/style/web/themes/css/variables.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CiscoDevNet/NeXt/90e66b73437fd1f3deea07109d8fb065b2ff975b/src/style/web/themes/css/variables.css
--------------------------------------------------------------------------------
/src/style/web/themes/dark/next-componentlized.less:
--------------------------------------------------------------------------------
1 | .nx {
2 | @import "../../../bootstrap/less/bootstrap.less";
3 | @import "../../common.less";
4 | @import "variables.less";
5 | @import "overrides.less";
6 | @import "../../../bootstrap/less/utilities.less";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/style/web/themes/dark/next.less:
--------------------------------------------------------------------------------
1 | @import "../../../bootstrap/less/bootstrap.less";
2 | @import "../../common.less";
3 | @import "variables.less";
4 | @import "overrides.less";
5 | @import "../../../bootstrap/less/utilities.less";
--------------------------------------------------------------------------------
/src/style/web/themes/dark/overrides.less:
--------------------------------------------------------------------------------
1 | .navbar-brand {
2 | font-family: @headings-font-family;
3 | font-size: 24px;
4 | }
5 |
6 | .dropdown-menu {
7 | background-color: #353535;
8 |
9 | > li > a {
10 | color: #ccc;
11 | &:hover {
12 | color: #fff;
13 | background: @brand-primary;
14 | }
15 | }
16 | }
17 |
18 | .help-block {
19 | color: #808080;
20 | }
--------------------------------------------------------------------------------
/src/style/web/themes/green/next-componentlized.less:
--------------------------------------------------------------------------------
1 | .nx {
2 | @import "../../../bootstrap/less/bootstrap.less";
3 | @import "../../common.less";
4 | @import "variables.less";
5 | @import "overrides.less";
6 | @import "../../../bootstrap/less/utilities.less";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/style/web/themes/green/next.less:
--------------------------------------------------------------------------------
1 | @import "../../../bootstrap/less/bootstrap.less";
2 | @import "../../common.less";
3 | @import "variables.less";
4 | @import "overrides.less";
5 | @import "../../../bootstrap/less/utilities.less";
--------------------------------------------------------------------------------
/src/style/web/themes/green/overrides.less:
--------------------------------------------------------------------------------
1 | .navbar-brand {
2 | font-family: @headings-font-family;
3 | font-size: 24px;
4 | }
5 |
6 | .dropdown-menu {
7 | > li > a {
8 | &:hover {
9 | color: #fff;
10 | background: @brand-primary;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/style/web/themes/slate/next-componentlized.less:
--------------------------------------------------------------------------------
1 | .nx {
2 | @import "../../../bootstrap/less/bootstrap.less";
3 | @import "../../common.less";
4 | @import "variables.less";
5 | @import "overrides.less";
6 | @import "../../../bootstrap/less/utilities.less";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/style/web/themes/slate/next.less:
--------------------------------------------------------------------------------
1 | @import "../../../bootstrap/less/bootstrap.less";
2 | @import "../../common.less";
3 | @import "variables.less";
4 | @import "overrides.less";
5 | @import "../../../bootstrap/less/utilities.less";
--------------------------------------------------------------------------------
/src/style/web/themes/slate/overrides.less:
--------------------------------------------------------------------------------
1 | .navbar-brand {
2 | font-family: @headings-font-family;
3 | font-size: 24px;
4 | }
5 |
6 | .dropdown-menu {
7 | background-color: #404e5c;
8 |
9 | > li > a {
10 | color: #ccc;
11 | &:hover {
12 | color: #000;
13 | background: @brand-primary;
14 | }
15 | }
16 | }
17 |
18 | .help-block {
19 | color: #808080;
20 | }
--------------------------------------------------------------------------------
/src/style/web/themes/yellow/next-componentlized.less:
--------------------------------------------------------------------------------
1 | .nx {
2 | @import "../../../bootstrap/less/bootstrap.less";
3 | @import "../../common.less";
4 | @import "variables.less";
5 | @import "overrides.less";
6 | @import "../../../bootstrap/less/utilities.less";
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/style/web/themes/yellow/next.less:
--------------------------------------------------------------------------------
1 | @import "../../../bootstrap/less/bootstrap.less";
2 | @import "../../common.less";
3 | @import "variables.less";
4 | @import "overrides.less";
5 | @import "../../../bootstrap/less/utilities.less";
--------------------------------------------------------------------------------
/src/style/web/themes/yellow/overrides.less:
--------------------------------------------------------------------------------
1 | .navbar-brand {
2 | font-family: @headings-font-family;
3 | font-size: 24px;
4 | }
5 |
6 | .dropdown-menu {
7 | background-color: #353535;
8 |
9 | > li > a {
10 | color: #ccc;
11 | &:hover {
12 | color: #fff;
13 | background: @brand-primary;
14 | }
15 | }
16 | }
17 |
18 | .help-block {
19 | color: #808080;
20 | }
--------------------------------------------------------------------------------
/src/test/core/Comparable.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by mars on 11/28/13.
3 | */
4 |
--------------------------------------------------------------------------------
/src/test/core/Iterable.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by mars on 11/28/13.
3 | */
4 |
--------------------------------------------------------------------------------
/src/test/core/Serializable.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by mars on 11/28/13.
3 | */
4 |
--------------------------------------------------------------------------------
/src/test/core/data/Counter.js:
--------------------------------------------------------------------------------
1 | module("Counter");
2 |
3 | test("Storage test", function () {
4 | var counter = new nx.data.Counter();
5 | var map = {
6 | "Null": null,
7 | "Undefined": undefined,
8 | "String0": "",
9 | "String": "hello",
10 | "BooleanTrue": true,
11 | "BooleanFalse": false,
12 | "Number0": 0,
13 | "Number": 100,
14 | "Object": {},
15 | "Array": [],
16 | "NXObject": new nx.Observable()
17 | };
18 | nx.each(map, function (value, key) {
19 | ok(counter.getCount(value) === 0, "Initial count correct for " + key);
20 | counter.setCount(value, 100);
21 | ok(counter.getCount(value) === 100, "Set count correct for " + key);
22 | counter.setCount(value, -100);
23 | ok(counter.getCount(value) === -100, "Set negative count correct for " + key);
24 | counter.increase(value);
25 | ok(counter.getCount(value) === -99, "Increase count correct for " + key);
26 | counter.increase(value, 0);
27 | ok(counter.getCount(value) === -99, "Increase count 0 correct for " + key);
28 | counter.increase(value, 100);
29 | ok(counter.getCount(value) === 1, "Increase count 100 correct for " + key);
30 | counter.decrease(value);
31 | ok(counter.getCount(value) === 0, "Decrease count correct for " + key);
32 | counter.decrease(value, 0);
33 | ok(counter.getCount(value) === 0, "Decrease count 0 correct for " + key);
34 | counter.decrease(value, 100);
35 | ok(counter.getCount(value) === -100, "Decrease count 100 correct for " + key);
36 | });
37 | });
38 |
--------------------------------------------------------------------------------
/src/test/core/data/Dictionary.js:
--------------------------------------------------------------------------------
1 | module("Dictionary.js");
2 |
3 | var MyDictionary = nx.define(nx.data.Dictionary, {});
4 |
5 | test('init dict', function () {
6 | var dict1 = new nx.data.Dictionary();
7 | var dict2 = new nx.data.Dictionary({
8 | a: 1,
9 | b: 2
10 | });
11 | var dict3 = new nx.data.Dictionary(dict2);
12 | var dict5 = new nx.data.Dictionary(new MyDictionary({
13 | x: "x",
14 | y: "y",
15 | z: "z"
16 | }));
17 | var dict6 = new MyDictionary(dict2);
18 |
19 | ok(dict1.count() === 0, 'init an empty Dictionary');
20 | ok(dict2.count() === 2, 'init a Dictionary by object');
21 | ok(dict3.count() === 2, 'init a Dictionary by Dictionary');
22 | ok(dict5.count() === 3, 'init a Dictionary by custom Dictionary');
23 | ok(dict6.count() === 2, 'init a custom Dictionary by Dictionary');
24 | });
25 |
26 | test('change dict', function () {
27 | var dict1 = new nx.data.Dictionary({
28 | a: 1,
29 | b: 2
30 | });
31 | // add
32 | var item = dict1.setItem("map", {
33 | x: 1,
34 | y: 2,
35 | z: 3
36 | });
37 | deepEqual(dict1.getItem("map"), {
38 | x: 1,
39 | y: 2,
40 | z: 3
41 | }, "add value");
42 | deepEqual(item.value(), {
43 | x: 1,
44 | y: 2,
45 | z: 3
46 | }, "add item value");
47 | // remove
48 | item = dict1.removeItem("b");
49 | equal(dict1.getItem("b"), undefined, "removed successful");
50 | equal(item.key(), "b", "removed item key");
51 | equal(item.value(), 2, "removed item value");
52 | equal(item._dict, null, "removed item references nothing");
53 | // set
54 | item = dict1.setItem("a", 3);
55 | equal(dict1.getItem("a"), 3, "set value");
56 | equal(item.value(), 3, "set item value");
57 | // clear
58 | var items = dict1.clear();
59 | equal(items.length, 2, "item count");
60 | equal(items[0]._dict, null, "cleared item references nothing");
61 | equal(items[0].key(), "a", "cleared item key");
62 | equal(items[0].value(), 3, "cleared item value");
63 | equal(dict1.count(), 0, "clear successful");
64 | });
65 |
--------------------------------------------------------------------------------
/src/test/core/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Auto Test
7 |
8 |
9 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/src/test/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
Auto Test
7 |
8 |
9 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/test/web/test.js:
--------------------------------------------------------------------------------
1 | var app = new nx.ui.Application();
2 |
--------------------------------------------------------------------------------