Version Description
Download this release
Release Info
Developer | DvanKooten |
Plugin | MailChimp for WordPress |
Version | 3.1.5 |
Comparing to | |
See all releases |
Code changes from version 3.1.4 to 3.1.5
- CHANGELOG.md +18 -0
- assets/css/admin-styles.css +18 -1
- assets/css/admin-styles.min.css +1 -1
- assets/css/form-editor.css +2 -1
- assets/css/form-editor.min.css +1 -1
- assets/js/admin.js +1816 -834
- assets/js/admin.min.js +1 -1
- assets/js/admin.min.js.map +1 -1
- assets/js/forms-admin.js +37 -33
- assets/js/forms-admin.min.js +8 -8
- assets/js/forms-admin.min.js.map +0 -1
CHANGELOG.md
CHANGED
@@ -1,6 +1,24 @@
|
|
1 |
Changelog
|
2 |
=========
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#### 3.1.4 - February 29, 2016
|
5 |
|
6 |
**Fixes**
|
1 |
Changelog
|
2 |
=========
|
3 |
|
4 |
+
#### 3.1.5 - March 22, 2016
|
5 |
+
|
6 |
+
**Fixes**
|
7 |
+
|
8 |
+
- Response message was shown for unsubmitted forms when using `{response}` in the form mark-up with multiple forms on the same page.
|
9 |
+
|
10 |
+
**Improvements**
|
11 |
+
|
12 |
+
- Scroll to form after form submission now uses native browser method `scrollIntoView()`.
|
13 |
+
- Various improvements for right-to-left (RTL) sites.
|
14 |
+
- The MailChimp API key is now obfuscated on the settings page.
|
15 |
+
- Contact Form 7 integration now uses an early hook priority to ensure we run before any page redirects.
|
16 |
+
|
17 |
+
**Additions**
|
18 |
+
|
19 |
+
- Add position option for WooCommerce integration.
|
20 |
+
- Add `{post}` tag whch can be used in form mark-up to fetch properties of the current page or post.
|
21 |
+
|
22 |
#### 3.1.4 - February 29, 2016
|
23 |
|
24 |
**Fixes**
|
assets/css/admin-styles.css
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
/* The rest of this file contains styles related to the mechanics of
|
18 |
the editor. You probably shouldn't touch them. */
|
19 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
20 |
-
before
|
21 |
flickering artifacts. */
|
22 |
/* Force content-box sizing for the elements where we expect it */
|
23 |
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
@@ -401,6 +401,7 @@
|
|
401 |
white-space: normal;
|
402 |
height: 100%;
|
403 |
display: inline-block;
|
|
|
404 |
margin-bottom: -30px;
|
405 |
/* Hack to make IE7 behave */
|
406 |
*zoom: 1;
|
@@ -709,3 +710,19 @@
|
|
709 |
right: 0;
|
710 |
bottom: 0;
|
711 |
top: 0; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
/* The rest of this file contains styles related to the mechanics of
|
18 |
the editor. You probably shouldn't touch them. */
|
19 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
20 |
+
before actual scrolling happens, thus preventing shaking and
|
21 |
flickering artifacts. */
|
22 |
/* Force content-box sizing for the elements where we expect it */
|
23 |
/* IE7 hack to prevent it from returning funny offsetTops on the spans */
|
401 |
white-space: normal;
|
402 |
height: 100%;
|
403 |
display: inline-block;
|
404 |
+
vertical-align: top;
|
405 |
margin-bottom: -30px;
|
406 |
/* Hack to make IE7 behave */
|
407 |
*zoom: 1;
|
710 |
right: 0;
|
711 |
bottom: 0;
|
712 |
top: 0; }
|
713 |
+
|
714 |
+
.rtl .overlay .close {
|
715 |
+
right: auto;
|
716 |
+
left: 0; }
|
717 |
+
|
718 |
+
.rtl #mc4wp-admin .page-title {
|
719 |
+
background-position: right center;
|
720 |
+
padding-left: 0;
|
721 |
+
padding-right: 42px; }
|
722 |
+
|
723 |
+
.rtl #mc4wp-admin .CodeMirror-scroll {
|
724 |
+
overflow-y: hidden !important; }
|
725 |
+
|
726 |
+
.rtl #mc4wp-admin .CodeMirror-vscrollbar {
|
727 |
+
left: 0 !important;
|
728 |
+
right: auto !important; }
|
assets/css/admin-styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#mc4wp-admin .cm-em,#mc4wp-admin .help,.mc4wp-admin .cm-em,.mc4wp-admin .help{font-style:italic}#mc4wp-admin .row,.mc4wp-admin .row{margin:20px -20px}#mc4wp-admin .row:after,.mc4wp-admin .row:after{content:"";clear:both;display:table}#mc4wp-admin .row .col,.mc4wp-admin .row .col{padding:0 20px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box}#mc4wp-admin .row .col-1,.mc4wp-admin .row .col-1{width:16.666%}#mc4wp-admin .row .col-2,.mc4wp-admin .row .col-2{width:33.333%}#mc4wp-admin .row .col-3,.mc4wp-admin .row .col-3{width:50%}#mc4wp-admin .row .col-4,.mc4wp-admin .row .col-4{width:66.666%}#mc4wp-admin .row .col-5,.mc4wp-admin .row .col-5{width:83.333%}#mc4wp-admin .field-wizard td.stretch,#mc4wp-admin .row .col-6,.mc4wp-admin .field-wizard td.stretch,.mc4wp-admin .row .col-6,.overlay{width:100%}@media (max-width:1200px){#mc4wp-admin .row .col,.mc4wp-admin .row .col{width:100%;float:none;margin:20px 0}}#mc4wp-admin .status,.mc4wp-admin .status{display:inline-block;margin-left:1em;padding:3px 6px;color:#fff;font-size:12px;font-weight:700}#mc4wp-admin .status.positive,.mc4wp-admin .status.positive{background-color:#32cd32}#mc4wp-admin .status.negative,.mc4wp-admin .status.negative{background-color:red}#mc4wp-admin .status.neutral,.mc4wp-admin .status.neutral{background:gray}#mc4wp-admin .valigntop,.mc4wp-admin .valigntop{vertical-align:top!important}#mc4wp-admin .field-wizard .dashicons,#mc4wp-admin .field-wizard td,#mc4wp-admin .field-wizard tr,.mc4wp-admin .field-wizard .dashicons,.mc4wp-admin .field-wizard td,.mc4wp-admin .field-wizard tr{vertical-align:middle}#mc4wp-admin .big-margin,.mc4wp-admin .big-margin{margin:60px 0}#mc4wp-admin .medium-margin,.mc4wp-admin .medium-margin{margin:40px 0}#mc4wp-admin .small-margin,.mc4wp-admin .small-margin{margin:20px 0}#mc4wp-admin .hover-activated,.mc4wp-admin .hover-activated{opacity:.5}#mc4wp-admin .hover-activated:hover,.mc4wp-admin .hover-activated:hover{cursor:pointer;opacity:1}#mc4wp-admin .help-text,.mc4wp-admin .help-text{font-size:14px}#mc4wp-admin .help-text p,.mc4wp-admin .help-text p{margin:10px 0;font-size:14px}#mc4wp-admin .help-text ul,.mc4wp-admin .help-text ul{list-style:square;margin-top:15px;padding-left:40px}#mc4wp-admin .muted,.mc4wp-admin .muted{color:#aaa}#mc4wp-admin .red,.mc4wp-admin .red{color:red}#mc4wp-admin .green,.mc4wp-admin .green{color:#32cd32}#mc4wp-admin .mc4wp-notice,.mc4wp-admin .mc4wp-notice{padding:6px 12px;color:#31708f;background:#d9edf7;border:1px solid #bce8f1;margin:1em 0!important}#mc4wp-admin .column-ID,.mc4wp-admin .column-ID{width:10%}#mc4wp-admin .block,.mc4wp-admin .block{display:block}#mc4wp-admin .code-sample,.mc4wp-admin .code-sample{font-family:Consolas,Monaco,Lucida Console,monospace;font-size:12px;background:#fff}#mc4wp-admin .breadcrumbs,.mc4wp-admin .breadcrumbs{border-bottom:1px solid #ccc;padding-bottom:1em}#mc4wp-admin .tab,.mc4wp-admin .tab{display:none}#mc4wp-admin .tab.tab-active,.mc4wp-admin .tab.tab-active{display:block}#mc4wp-admin .tab h2,.mc4wp-admin .tab h2{margin-top:20px}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{font-family:monospace;height:300px;color:#000}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{padding:4px 0}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{padding:0 4px}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{background-color:#fff}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}#mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}#mc4wp-admin .CodeMirror-guttermarker,.mc4wp-admin .CodeMirror-guttermarker{color:#000}#mc4wp-admin .CodeMirror-guttermarker-subtle,.mc4wp-admin .CodeMirror-guttermarker-subtle{color:#999}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}#mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor,.mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}#mc4wp-admin .cm-fat-cursor .CodeMirror-cursor,.mc4wp-admin .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}#mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors,.mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors{z-index:1}#mc4wp-admin .cm-animate-fat-cursor,.mc4wp-admin .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}#mc4wp-admin .cm-tab,.mc4wp-admin .cm-tab{display:inline-block;text-decoration:inherit}#mc4wp-admin .CodeMirror-ruler,.mc4wp-admin .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}#mc4wp-admin .cm-s-default .cm-header,.mc4wp-admin .cm-s-default .cm-header{color:#00f}#mc4wp-admin .cm-s-default .cm-quote,.mc4wp-admin .cm-s-default .cm-quote{color:#090}#mc4wp-admin .cm-negative,.mc4wp-admin .cm-negative{color:#d44}#mc4wp-admin .cm-positive,.mc4wp-admin .cm-positive{color:#292}#mc4wp-admin .cm-header,#mc4wp-admin .cm-strong,.mc4wp-admin .cm-header,.mc4wp-admin .cm-strong{font-weight:700}#mc4wp-admin .cm-link,.mc4wp-admin .cm-link{text-decoration:underline}#mc4wp-admin .cm-strikethrough,.mc4wp-admin .cm-strikethrough{text-decoration:line-through}#mc4wp-admin .cm-s-default .cm-keyword,.mc4wp-admin .cm-s-default .cm-keyword{color:#708}#mc4wp-admin .cm-s-default .cm-atom,.mc4wp-admin .cm-s-default .cm-atom{color:#219}#mc4wp-admin .cm-s-default .cm-number,.mc4wp-admin .cm-s-default .cm-number{color:#164}#mc4wp-admin .cm-s-default .cm-def,.mc4wp-admin .cm-s-default .cm-def{color:#00f}#mc4wp-admin .cm-s-default .cm-variable-2,.mc4wp-admin .cm-s-default .cm-variable-2{color:#05a}#mc4wp-admin .cm-s-default .cm-variable-3,.mc4wp-admin .cm-s-default .cm-variable-3{color:#085}#mc4wp-admin .cm-s-default .cm-comment,.mc4wp-admin .cm-s-default .cm-comment{color:#a50}#mc4wp-admin .cm-s-default .cm-string,.mc4wp-admin .cm-s-default .cm-string{color:#a11}#mc4wp-admin .cm-s-default .cm-string-2,.mc4wp-admin .cm-s-default .cm-string-2{color:#f50}#mc4wp-admin .cm-s-default .cm-meta,#mc4wp-admin .cm-s-default .cm-qualifier,.mc4wp-admin .cm-s-default .cm-meta,.mc4wp-admin .cm-s-default .cm-qualifier{color:#555}#mc4wp-admin .cm-s-default .cm-builtin,.mc4wp-admin .cm-s-default .cm-builtin{color:#30a}#mc4wp-admin .cm-s-default .cm-bracket,.mc4wp-admin .cm-s-default .cm-bracket{color:#997}#mc4wp-admin .cm-s-default .cm-tag,.mc4wp-admin .cm-s-default .cm-tag{color:#170}#mc4wp-admin .cm-s-default .cm-attribute,.mc4wp-admin .cm-s-default .cm-attribute{color:#00c}#mc4wp-admin .cm-s-default .cm-hr,.mc4wp-admin .cm-s-default .cm-hr{color:#999}#mc4wp-admin .cm-s-default .cm-link,.mc4wp-admin .cm-s-default .cm-link{color:#00c}#mc4wp-admin .cm-invalidchar,#mc4wp-admin .cm-s-default .cm-error,.mc4wp-admin .cm-invalidchar,.mc4wp-admin .cm-s-default .cm-error{color:red}#mc4wp-admin .CodeMirror-composing,.mc4wp-admin .CodeMirror-composing{border-bottom:2px solid}#mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}#mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}#mc4wp-admin .CodeMirror-matchingtag,.mc4wp-admin .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}#mc4wp-admin .CodeMirror-activeline-background,.mc4wp-admin .CodeMirror-activeline-background{background:#e8f2ff}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{position:relative;overflow:hidden;background:#fff}#mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-sizer{position:relative;border-right:30px solid transparent}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-hscrollbar,#mc4wp-admin .CodeMirror-scrollbar-filler,#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}#mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{right:0;bottom:0}#mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-gutter-filler{left:0;bottom:0}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}#mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;margin-bottom:-30px}#mc4wp-admin .CodeMirror-gutter-wrapper,.mc4wp-admin .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}#mc4wp-admin .CodeMirror-gutter-background,.mc4wp-admin .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}#mc4wp-admin .CodeMirror-gutter-elt,.mc4wp-admin .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{cursor:text;min-height:1px}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}#mc4wp-admin .CodeMirror-wrap pre,.mc4wp-admin .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}#mc4wp-admin .CodeMirror-linebackground,.mc4wp-admin .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}#mc4wp-admin .CodeMirror-linewidget,.mc4wp-admin .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}#mc4wp-admin .CodeMirror-code,.mc4wp-admin .CodeMirror-code{outline:0}#mc4wp-admin .CodeMirror-gutter,#mc4wp-admin .CodeMirror-gutters,#mc4wp-admin .CodeMirror-linenumber,#mc4wp-admin .CodeMirror-scroll,#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}#mc4wp-admin .CodeMirror-measure,.mc4wp-admin .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{position:absolute}#mc4wp-admin .CodeMirror-measure pre,.mc4wp-admin .CodeMirror-measure pre{position:static}#mc4wp-admin div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}#mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,#mc4wp-admin div.CodeMirror-dragcursors,.mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-dragcursors{visibility:visible}#mc4wp-admin .CodeMirror-selected,.mc4wp-admin .CodeMirror-selected{background:#d9d9d9}#mc4wp-admin .CodeMirror-focused .CodeMirror-selected,#mc4wp-admin .CodeMirror-line::selection,#mc4wp-admin .CodeMirror-line>span::selection,#mc4wp-admin .CodeMirror-line>span>span::selection,.mc4wp-admin .CodeMirror-focused .CodeMirror-selected,.mc4wp-admin .CodeMirror-line::selection,.mc4wp-admin .CodeMirror-line>span::selection,.mc4wp-admin .CodeMirror-line>span>span::selection{background:#d7d4f0}#mc4wp-admin .CodeMirror-crosshair,.mc4wp-admin .CodeMirror-crosshair{cursor:crosshair}#mc4wp-admin .CodeMirror-line::-moz-selection,#mc4wp-admin .CodeMirror-line>span::-moz-selection,#mc4wp-admin .CodeMirror-line>span>span::-moz-selection,.mc4wp-admin .CodeMirror-line::-moz-selection,.mc4wp-admin .CodeMirror-line>span::-moz-selection,.mc4wp-admin .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}#mc4wp-admin .cm-searching,.mc4wp-admin .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}#mc4wp-admin .cm-force-border,.mc4wp-admin .cm-force-border{padding-right:.1px}@media print{#mc4wp-admin .CodeMirror div.CodeMirror-cursors,.mc4wp-admin .CodeMirror div.CodeMirror-cursors{visibility:hidden}}#mc4wp-admin .cm-tab-wrap-hack:after,.mc4wp-admin .cm-tab-wrap-hack:after{content:''}#mc4wp-admin span.CodeMirror-selectedtext,.mc4wp-admin span.CodeMirror-selectedtext{background:0 0}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{border:1px solid #ccc;padding:10px;min-height:500px}#mc4wp-admin .CodeMirror-empty,.mc4wp-admin .CodeMirror-empty{color:#999}#mc4wp-admin .field-wizard h3,.mc4wp-admin .field-wizard h3{margin-top:0;padding-bottom:12px;border-bottom:1px solid #eee;margin-bottom:12px}#mc4wp-admin .field-wizard code,.mc4wp-admin .field-wizard code{margin-left:10px}#mc4wp-admin .field-wizard>div,.mc4wp-admin .field-wizard>div{margin:24px 0}#mc4wp-admin .field-wizard label,.mc4wp-admin .field-wizard label{font-weight:600;display:block;margin-bottom:3px}#mc4wp-admin .field-wizard table,.mc4wp-admin .field-wizard table{table-layout:fixed;border-collapse:collapse;border-spacing:0}#mc4wp-admin .field-wizard .cb-wrap,.mc4wp-admin .field-wizard .cb-wrap{font-weight:400}#mc4wp-admin .field-wizard .cb-wrap input,.mc4wp-admin .field-wizard .cb-wrap input{margin-right:6px}#mc4wp-admin .field-wizard .limit-height,.mc4wp-admin .field-wizard .limit-height{border:1px solid #eee;padding:6px;max-height:200px;overflow-y:scroll}#mc4wp-admin .field-wizard .help,.mc4wp-admin .field-wizard .help{margin-top:0}#mc4wp-admin .available-fields,.mc4wp-admin .available-fields{border:1px solid #ccc;padding:20px;background:#fff}#mc4wp-admin .available-fields strong,.mc4wp-admin .available-fields strong{display:block;margin-bottom:10px}#mc4wp-admin .available-fields button,.mc4wp-admin .available-fields button{margin:0 6px 6px 0}#mc4wp-admin .available-fields .is-required:after,.mc4wp-admin .available-fields .is-required:after{content:" *";color:red}#mc4wp-admin .available-fields .is-required.not-in-form,.mc4wp-admin .available-fields .is-required.not-in-form{-webkit-box-shadow:0 0 3px 1px red;-moz-box-shadow:0 0 3px 1px red;box-shadow:0 0 3px 1px red}#mc4wp-admin .available-fields .in-form,.mc4wp-admin .available-fields .in-form{opacity:.5}#mc4wp-admin .page-title,.mc4wp-admin .page-title{background:url(../img/icon-large.png) left center no-repeat;padding-left:42px;line-height:32px;margin-bottom:20px}#mc4wp-admin .page-title small,.mc4wp-admin .page-title small{font-size:12px;color:#777;display:inline-block;margin-left:10px}#mc4wp-admin .button .dashicons,#mc4wp-admin .button-secondary .dashicons,#mc4wp-admin .page-title-action .dashicons,.mc4wp-admin .button .dashicons,.mc4wp-admin .button-secondary .dashicons,.mc4wp-admin .page-title-action .dashicons{vertical-align:middle;line-height:16px;margin:0 4px 0 0}#mc4wp-admin .form-table td p,.mc4wp-admin .form-table td p{margin-top:1em}#mc4wp-admin .sidebar,.mc4wp-admin .sidebar{border-left:1px solid #ccc}#mc4wp-admin .sidebar h3,#mc4wp-admin .sidebar h4,.mc4wp-admin .sidebar h3,.mc4wp-admin .sidebar h4{font-size:16px;margin-bottom:0}#mc4wp-admin .sidebar>div,.mc4wp-admin .sidebar>div{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:20px}#mc4wp-admin .sidebar>div:last-of-type,.mc4wp-admin .sidebar>div:last-of-type{border-bottom:0}.overlay{position:fixed;left:0;top:0;z-index:99999;padding:20px;max-width:480px;max-height:100%;background:#fefefe;border:1px solid #ccc;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.overlay .close{position:absolute;padding:10px;right:0;top:0;font-size:24px;cursor:pointer;opacity:.5}.overlay .close:hover{opacity:1}.overlay-background{z-index:99998;background:rgba(0,0,0,.67);position:fixed;left:0;right:0;bottom:0;top:0}
|
1 |
+
#mc4wp-admin .cm-em,#mc4wp-admin .help,.mc4wp-admin .cm-em,.mc4wp-admin .help{font-style:italic}#mc4wp-admin .row,.mc4wp-admin .row{margin:20px -20px}#mc4wp-admin .row:after,.mc4wp-admin .row:after{content:"";clear:both;display:table}#mc4wp-admin .row .col,.mc4wp-admin .row .col{padding:0 20px;float:left;-webkit-box-sizing:border-box;box-sizing:border-box}#mc4wp-admin .row .col-1,.mc4wp-admin .row .col-1{width:16.666%}#mc4wp-admin .row .col-2,.mc4wp-admin .row .col-2{width:33.333%}#mc4wp-admin .row .col-3,.mc4wp-admin .row .col-3{width:50%}#mc4wp-admin .row .col-4,.mc4wp-admin .row .col-4{width:66.666%}#mc4wp-admin .row .col-5,.mc4wp-admin .row .col-5{width:83.333%}#mc4wp-admin .field-wizard td.stretch,#mc4wp-admin .row .col-6,.mc4wp-admin .field-wizard td.stretch,.mc4wp-admin .row .col-6,.overlay{width:100%}@media (max-width:1200px){#mc4wp-admin .row .col,.mc4wp-admin .row .col{width:100%;float:none;margin:20px 0}}#mc4wp-admin .status,.mc4wp-admin .status{display:inline-block;margin-left:1em;padding:3px 6px;color:#fff;font-size:12px;font-weight:700}#mc4wp-admin .status.positive,.mc4wp-admin .status.positive{background-color:#32cd32}#mc4wp-admin .status.negative,.mc4wp-admin .status.negative{background-color:red}#mc4wp-admin .status.neutral,.mc4wp-admin .status.neutral{background:gray}#mc4wp-admin .valigntop,.mc4wp-admin .valigntop{vertical-align:top!important}#mc4wp-admin .big-margin,.mc4wp-admin .big-margin{margin:60px 0}#mc4wp-admin .medium-margin,.mc4wp-admin .medium-margin{margin:40px 0}#mc4wp-admin .small-margin,.mc4wp-admin .small-margin{margin:20px 0}#mc4wp-admin .hover-activated,.mc4wp-admin .hover-activated{opacity:.5}#mc4wp-admin .hover-activated:hover,.mc4wp-admin .hover-activated:hover{cursor:pointer;opacity:1}#mc4wp-admin .help-text,.mc4wp-admin .help-text{font-size:14px}#mc4wp-admin .help-text p,.mc4wp-admin .help-text p{margin:10px 0;font-size:14px}#mc4wp-admin .help-text ul,.mc4wp-admin .help-text ul{list-style:square;margin-top:15px;padding-left:40px}#mc4wp-admin .muted,.mc4wp-admin .muted{color:#aaa}#mc4wp-admin .red,.mc4wp-admin .red{color:red}#mc4wp-admin .green,.mc4wp-admin .green{color:#32cd32}#mc4wp-admin .mc4wp-notice,.mc4wp-admin .mc4wp-notice{padding:6px 12px;color:#31708f;background:#d9edf7;border:1px solid #bce8f1;margin:1em 0!important}#mc4wp-admin .column-ID,.mc4wp-admin .column-ID{width:10%}#mc4wp-admin .block,.mc4wp-admin .block{display:block}#mc4wp-admin .code-sample,.mc4wp-admin .code-sample{font-family:Consolas,Monaco,Lucida Console,monospace;font-size:12px;background:#fff}#mc4wp-admin .breadcrumbs,.mc4wp-admin .breadcrumbs{border-bottom:1px solid #ccc;padding-bottom:1em}#mc4wp-admin .tab,.mc4wp-admin .tab{display:none}#mc4wp-admin .tab.tab-active,.mc4wp-admin .tab.tab-active{display:block}#mc4wp-admin .tab h2,.mc4wp-admin .tab h2{margin-top:20px}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{font-family:monospace;height:300px;color:#000}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{padding:4px 0}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{padding:0 4px}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{background-color:#fff}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}#mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}#mc4wp-admin .CodeMirror-guttermarker,.mc4wp-admin .CodeMirror-guttermarker{color:#000}#mc4wp-admin .CodeMirror-guttermarker-subtle,.mc4wp-admin .CodeMirror-guttermarker-subtle{color:#999}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}#mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor,.mc4wp-admin .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}#mc4wp-admin .cm-fat-cursor .CodeMirror-cursor,.mc4wp-admin .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}#mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors,.mc4wp-admin .cm-fat-cursor div.CodeMirror-cursors{z-index:1}#mc4wp-admin .cm-animate-fat-cursor,.mc4wp-admin .cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}#mc4wp-admin .cm-tab,.mc4wp-admin .cm-tab{display:inline-block;text-decoration:inherit}#mc4wp-admin .CodeMirror-ruler,.mc4wp-admin .CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}#mc4wp-admin .cm-s-default .cm-header,.mc4wp-admin .cm-s-default .cm-header{color:#00f}#mc4wp-admin .cm-s-default .cm-quote,.mc4wp-admin .cm-s-default .cm-quote{color:#090}#mc4wp-admin .cm-negative,.mc4wp-admin .cm-negative{color:#d44}#mc4wp-admin .cm-positive,.mc4wp-admin .cm-positive{color:#292}#mc4wp-admin .cm-header,#mc4wp-admin .cm-strong,.mc4wp-admin .cm-header,.mc4wp-admin .cm-strong{font-weight:700}#mc4wp-admin .cm-link,.mc4wp-admin .cm-link{text-decoration:underline}#mc4wp-admin .cm-strikethrough,.mc4wp-admin .cm-strikethrough{text-decoration:line-through}#mc4wp-admin .cm-s-default .cm-keyword,.mc4wp-admin .cm-s-default .cm-keyword{color:#708}#mc4wp-admin .cm-s-default .cm-atom,.mc4wp-admin .cm-s-default .cm-atom{color:#219}#mc4wp-admin .cm-s-default .cm-number,.mc4wp-admin .cm-s-default .cm-number{color:#164}#mc4wp-admin .cm-s-default .cm-def,.mc4wp-admin .cm-s-default .cm-def{color:#00f}#mc4wp-admin .cm-s-default .cm-variable-2,.mc4wp-admin .cm-s-default .cm-variable-2{color:#05a}#mc4wp-admin .cm-s-default .cm-variable-3,.mc4wp-admin .cm-s-default .cm-variable-3{color:#085}#mc4wp-admin .cm-s-default .cm-comment,.mc4wp-admin .cm-s-default .cm-comment{color:#a50}#mc4wp-admin .cm-s-default .cm-string,.mc4wp-admin .cm-s-default .cm-string{color:#a11}#mc4wp-admin .cm-s-default .cm-string-2,.mc4wp-admin .cm-s-default .cm-string-2{color:#f50}#mc4wp-admin .cm-s-default .cm-meta,#mc4wp-admin .cm-s-default .cm-qualifier,.mc4wp-admin .cm-s-default .cm-meta,.mc4wp-admin .cm-s-default .cm-qualifier{color:#555}#mc4wp-admin .cm-s-default .cm-builtin,.mc4wp-admin .cm-s-default .cm-builtin{color:#30a}#mc4wp-admin .cm-s-default .cm-bracket,.mc4wp-admin .cm-s-default .cm-bracket{color:#997}#mc4wp-admin .cm-s-default .cm-tag,.mc4wp-admin .cm-s-default .cm-tag{color:#170}#mc4wp-admin .cm-s-default .cm-attribute,.mc4wp-admin .cm-s-default .cm-attribute{color:#00c}#mc4wp-admin .cm-s-default .cm-hr,.mc4wp-admin .cm-s-default .cm-hr{color:#999}#mc4wp-admin .cm-s-default .cm-link,.mc4wp-admin .cm-s-default .cm-link{color:#00c}#mc4wp-admin .cm-invalidchar,#mc4wp-admin .cm-s-default .cm-error,.mc4wp-admin .cm-invalidchar,.mc4wp-admin .cm-s-default .cm-error{color:red}#mc4wp-admin .CodeMirror-composing,.mc4wp-admin .CodeMirror-composing{border-bottom:2px solid}#mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}#mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket,.mc4wp-admin div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}#mc4wp-admin .CodeMirror-matchingtag,.mc4wp-admin .CodeMirror-matchingtag{background:rgba(255,150,0,.3)}#mc4wp-admin .CodeMirror-activeline-background,.mc4wp-admin .CodeMirror-activeline-background{background:#e8f2ff}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{position:relative;overflow:hidden;background:#fff}#mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-sizer{position:relative;border-right:30px solid transparent}#mc4wp-admin .CodeMirror-gutter-filler,#mc4wp-admin .CodeMirror-hscrollbar,#mc4wp-admin .CodeMirror-scrollbar-filler,#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}#mc4wp-admin .CodeMirror-vscrollbar,.mc4wp-admin .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}#mc4wp-admin .CodeMirror-hscrollbar,.mc4wp-admin .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}#mc4wp-admin .CodeMirror-scrollbar-filler,.mc4wp-admin .CodeMirror-scrollbar-filler{right:0;bottom:0}#mc4wp-admin .CodeMirror-gutter-filler,.mc4wp-admin .CodeMirror-gutter-filler{left:0;bottom:0}#mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}#mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}#mc4wp-admin .field-wizard .dashicons,#mc4wp-admin .field-wizard td,#mc4wp-admin .field-wizard tr,.mc4wp-admin .field-wizard .dashicons,.mc4wp-admin .field-wizard td,.mc4wp-admin .field-wizard tr{vertical-align:middle}#mc4wp-admin .CodeMirror-gutter-wrapper,.mc4wp-admin .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}#mc4wp-admin .CodeMirror-gutter-background,.mc4wp-admin .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}#mc4wp-admin .CodeMirror-gutter-elt,.mc4wp-admin .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}#mc4wp-admin .CodeMirror-lines,.mc4wp-admin .CodeMirror-lines{cursor:text;min-height:1px}#mc4wp-admin .CodeMirror pre,.mc4wp-admin .CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}#mc4wp-admin .CodeMirror-wrap pre,.mc4wp-admin .CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}#mc4wp-admin .CodeMirror-linebackground,.mc4wp-admin .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}#mc4wp-admin .CodeMirror-linewidget,.mc4wp-admin .CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}#mc4wp-admin .CodeMirror-code,.mc4wp-admin .CodeMirror-code{outline:0}#mc4wp-admin .CodeMirror-gutter,#mc4wp-admin .CodeMirror-gutters,#mc4wp-admin .CodeMirror-linenumber,#mc4wp-admin .CodeMirror-scroll,#mc4wp-admin .CodeMirror-sizer,.mc4wp-admin .CodeMirror-gutter,.mc4wp-admin .CodeMirror-gutters,.mc4wp-admin .CodeMirror-linenumber,.mc4wp-admin .CodeMirror-scroll,.mc4wp-admin .CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}#mc4wp-admin .CodeMirror-measure,.mc4wp-admin .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}#mc4wp-admin .CodeMirror-cursor,.mc4wp-admin .CodeMirror-cursor{position:absolute}#mc4wp-admin .CodeMirror-measure pre,.mc4wp-admin .CodeMirror-measure pre{position:static}#mc4wp-admin div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}#mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,#mc4wp-admin div.CodeMirror-dragcursors,.mc4wp-admin .CodeMirror-focused div.CodeMirror-cursors,.mc4wp-admin div.CodeMirror-dragcursors{visibility:visible}#mc4wp-admin .CodeMirror-selected,.mc4wp-admin .CodeMirror-selected{background:#d9d9d9}#mc4wp-admin .CodeMirror-focused .CodeMirror-selected,#mc4wp-admin .CodeMirror-line::selection,#mc4wp-admin .CodeMirror-line>span::selection,#mc4wp-admin .CodeMirror-line>span>span::selection,.mc4wp-admin .CodeMirror-focused .CodeMirror-selected,.mc4wp-admin .CodeMirror-line::selection,.mc4wp-admin .CodeMirror-line>span::selection,.mc4wp-admin .CodeMirror-line>span>span::selection{background:#d7d4f0}#mc4wp-admin .CodeMirror-crosshair,.mc4wp-admin .CodeMirror-crosshair{cursor:crosshair}#mc4wp-admin .CodeMirror-line::-moz-selection,#mc4wp-admin .CodeMirror-line>span::-moz-selection,#mc4wp-admin .CodeMirror-line>span>span::-moz-selection,.mc4wp-admin .CodeMirror-line::-moz-selection,.mc4wp-admin .CodeMirror-line>span::-moz-selection,.mc4wp-admin .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}#mc4wp-admin .cm-searching,.mc4wp-admin .cm-searching{background:#ffa;background:rgba(255,255,0,.4)}#mc4wp-admin .cm-force-border,.mc4wp-admin .cm-force-border{padding-right:.1px}@media print{#mc4wp-admin .CodeMirror div.CodeMirror-cursors,.mc4wp-admin .CodeMirror div.CodeMirror-cursors{visibility:hidden}}#mc4wp-admin .cm-tab-wrap-hack:after,.mc4wp-admin .cm-tab-wrap-hack:after{content:''}#mc4wp-admin span.CodeMirror-selectedtext,.mc4wp-admin span.CodeMirror-selectedtext{background:0 0}#mc4wp-admin .CodeMirror,.mc4wp-admin .CodeMirror{border:1px solid #ccc;padding:10px;min-height:500px}#mc4wp-admin .CodeMirror-empty,.mc4wp-admin .CodeMirror-empty{color:#999}#mc4wp-admin .field-wizard h3,.mc4wp-admin .field-wizard h3{margin-top:0;padding-bottom:12px;border-bottom:1px solid #eee;margin-bottom:12px}#mc4wp-admin .field-wizard code,.mc4wp-admin .field-wizard code{margin-left:10px}#mc4wp-admin .field-wizard>div,.mc4wp-admin .field-wizard>div{margin:24px 0}#mc4wp-admin .field-wizard label,.mc4wp-admin .field-wizard label{font-weight:600;display:block;margin-bottom:3px}#mc4wp-admin .field-wizard table,.mc4wp-admin .field-wizard table{table-layout:fixed;border-collapse:collapse;border-spacing:0}#mc4wp-admin .field-wizard .cb-wrap,.mc4wp-admin .field-wizard .cb-wrap{font-weight:400}#mc4wp-admin .field-wizard .cb-wrap input,.mc4wp-admin .field-wizard .cb-wrap input{margin-right:6px}#mc4wp-admin .field-wizard .limit-height,.mc4wp-admin .field-wizard .limit-height{border:1px solid #eee;padding:6px;max-height:200px;overflow-y:scroll}#mc4wp-admin .field-wizard .help,.mc4wp-admin .field-wizard .help{margin-top:0}#mc4wp-admin .available-fields,.mc4wp-admin .available-fields{border:1px solid #ccc;padding:20px;background:#fff}#mc4wp-admin .available-fields strong,.mc4wp-admin .available-fields strong{display:block;margin-bottom:10px}#mc4wp-admin .available-fields button,.mc4wp-admin .available-fields button{margin:0 6px 6px 0}#mc4wp-admin .available-fields .is-required:after,.mc4wp-admin .available-fields .is-required:after{content:" *";color:red}#mc4wp-admin .available-fields .is-required.not-in-form,.mc4wp-admin .available-fields .is-required.not-in-form{-webkit-box-shadow:0 0 3px 1px red;-moz-box-shadow:0 0 3px 1px red;box-shadow:0 0 3px 1px red}#mc4wp-admin .available-fields .in-form,.mc4wp-admin .available-fields .in-form{opacity:.5}#mc4wp-admin .page-title,.mc4wp-admin .page-title{background:url(../img/icon-large.png) left center no-repeat;padding-left:42px;line-height:32px;margin-bottom:20px}#mc4wp-admin .page-title small,.mc4wp-admin .page-title small{font-size:12px;color:#777;display:inline-block;margin-left:10px}#mc4wp-admin .button .dashicons,#mc4wp-admin .button-secondary .dashicons,#mc4wp-admin .page-title-action .dashicons,.mc4wp-admin .button .dashicons,.mc4wp-admin .button-secondary .dashicons,.mc4wp-admin .page-title-action .dashicons{vertical-align:middle;line-height:16px;margin:0 4px 0 0}#mc4wp-admin .form-table td p,.mc4wp-admin .form-table td p{margin-top:1em}#mc4wp-admin .sidebar,.mc4wp-admin .sidebar{border-left:1px solid #ccc}#mc4wp-admin .sidebar h3,#mc4wp-admin .sidebar h4,.mc4wp-admin .sidebar h3,.mc4wp-admin .sidebar h4{font-size:16px;margin-bottom:0}#mc4wp-admin .sidebar>div,.mc4wp-admin .sidebar>div{border-bottom:1px solid #ccc;margin-bottom:20px;padding-bottom:20px}#mc4wp-admin .sidebar>div:last-of-type,.mc4wp-admin .sidebar>div:last-of-type{border-bottom:0}.overlay{position:fixed;left:0;top:0;z-index:99999;padding:20px;max-width:480px;max-height:100%;background:#fefefe;border:1px solid #ccc;overflow-y:scroll;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.overlay .close{position:absolute;padding:10px;right:0;top:0;font-size:24px;cursor:pointer;opacity:.5}.overlay .close:hover{opacity:1}.overlay-background{z-index:99998;background:rgba(0,0,0,.67);position:fixed;left:0;right:0;bottom:0;top:0}.rtl .overlay .close{right:auto;left:0}.rtl #mc4wp-admin .page-title{background-position:right center;padding-left:0;padding-right:42px}.rtl #mc4wp-admin .CodeMirror-scroll{overflow-y:hidden!important}.rtl #mc4wp-admin .CodeMirror-vscrollbar{left:0!important;right:auto!important}
|
assets/css/form-editor.css
CHANGED
@@ -215,7 +215,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
|
215 |
border-right: 30px solid transparent; }
|
216 |
|
217 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
218 |
-
before
|
219 |
flickering artifacts. */
|
220 |
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
221 |
position: absolute;
|
@@ -252,6 +252,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {
|
|
252 |
white-space: normal;
|
253 |
height: 100%;
|
254 |
display: inline-block;
|
|
|
255 |
margin-bottom: -30px;
|
256 |
/* Hack to make IE7 behave */
|
257 |
*zoom: 1;
|
215 |
border-right: 30px solid transparent; }
|
216 |
|
217 |
/* The fake, visible scrollbars. Used to force redraw during scrolling
|
218 |
+
before actual scrolling happens, thus preventing shaking and
|
219 |
flickering artifacts. */
|
220 |
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
|
221 |
position: absolute;
|
252 |
white-space: normal;
|
253 |
height: 100%;
|
254 |
display: inline-block;
|
255 |
+
vertical-align: top;
|
256 |
margin-bottom: -30px;
|
257 |
/* Hack to make IE7 behave */
|
258 |
*zoom: 1;
|
assets/css/form-editor.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.
|
1 |
+
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.field-wizard .dashicons,.field-wizard td,.field-wizard tr{vertical-align:middle}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.CodeMirror{border:1px solid #ccc;padding:10px;min-height:500px}.CodeMirror-empty{color:#999}.field-wizard h3{margin-top:0;padding-bottom:12px;border-bottom:1px solid #eee;margin-bottom:12px}.field-wizard code{margin-left:10px}.field-wizard>div{margin:24px 0}.field-wizard label{font-weight:600;display:block;margin-bottom:3px}.field-wizard table{table-layout:fixed;border-collapse:collapse;border-spacing:0}.field-wizard td.stretch{width:100%}.field-wizard .cb-wrap{font-weight:400}.field-wizard .cb-wrap input{margin-right:6px}.field-wizard .limit-height{border:1px solid #eee;padding:6px;max-height:200px;overflow-y:scroll}.field-wizard .help{margin-top:0}.available-fields{border:1px solid #ccc;padding:20px;background:#fff}.available-fields strong{display:block;margin-bottom:10px}.available-fields button{margin:0 6px 6px 0}.available-fields .is-required:after{content:" *";color:red}.available-fields .is-required.not-in-form{-webkit-box-shadow:0 0 3px 1px red;-moz-box-shadow:0 0 3px 1px red;box-shadow:0 0 3px 1px red}.available-fields .in-form{opacity:.5}
|
assets/js/admin.js
CHANGED
@@ -383,26 +383,83 @@ var URL = {
|
|
383 |
|
384 |
module.exports = URL;
|
385 |
},{}],6:[function(require,module,exports){
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
var
|
390 |
-
|
391 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
|
393 |
// caching commonly used variables
|
394 |
-
var $document, $location, $requestAnimationFrame, $cancelAnimationFrame
|
395 |
|
396 |
// self invoking function needed because of the way mocks work
|
397 |
-
function initialize(
|
398 |
-
$document =
|
399 |
-
$location =
|
400 |
-
$cancelAnimationFrame =
|
401 |
-
$requestAnimationFrame =
|
402 |
}
|
403 |
|
404 |
-
|
|
|
|
|
|
|
|
|
405 |
|
|
|
406 |
|
407 |
/**
|
408 |
* @typedef {String} Tag
|
@@ -410,957 +467,1825 @@ var m = (function app(window, undefined) {
|
|
410 |
* Which describes a DOM node
|
411 |
*/
|
412 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
413 |
/**
|
414 |
*
|
415 |
* @param {Tag} The DOM node tag
|
416 |
* @param {Object=[]} optional key-value pairs to be mapped to DOM attrs
|
417 |
-
* @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,
|
418 |
-
*
|
419 |
*/
|
420 |
-
function m() {
|
421 |
-
var args = [].slice.call(arguments)
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
while (match = parser.exec(args[0])) {
|
429 |
-
if (match[1] === "" && match[2]) cell.tag = match[2];
|
430 |
-
else if (match[1] === "#") cell.attrs.id = match[2];
|
431 |
-
else if (match[1] === ".") classes.push(match[2]);
|
432 |
-
else if (match[3][0] === "[") {
|
433 |
-
var pair = attrParser.exec(match[3]);
|
434 |
-
cell.attrs[pair[1]] = pair[3] || (pair[2] ? "" :true)
|
435 |
-
}
|
436 |
}
|
437 |
|
438 |
-
var
|
439 |
-
|
440 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
}
|
442 |
-
|
443 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
}
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
}
|
454 |
}
|
455 |
-
|
456 |
-
|
457 |
-
return cell
|
458 |
}
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
}
|
496 |
-
else if (cached.nodes) clear(cached.nodes, cached)
|
497 |
}
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
data = data.concat.apply([], data);
|
508 |
-
i-- //check current index again and flatten until there are no more nested arrays at that index
|
509 |
-
len = data.length
|
510 |
-
}
|
511 |
}
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
//4) for each key, handle its corresponding action as marked in previous steps
|
520 |
-
var DELETION = 1, INSERTION = 2 , MOVE = 3;
|
521 |
-
var existing = {}, shouldMaintainIdentities = false;
|
522 |
-
for (var i = 0; i < cached.length; i++) {
|
523 |
-
if (cached[i] && cached[i].attrs && cached[i].attrs.key != null) {
|
524 |
-
shouldMaintainIdentities = true;
|
525 |
-
existing[cached[i].attrs.key] = {action: DELETION, index: i}
|
526 |
}
|
|
|
|
|
527 |
}
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
}
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
for (var i = 0, len = data.length; i < len; i++) {
|
551 |
-
if (data[i] && data[i].attrs) {
|
552 |
-
if (data[i].attrs.key != null) {
|
553 |
-
var key = data[i].attrs.key;
|
554 |
-
if (!existing[key]) existing[key] = {action: INSERTION, index: i};
|
555 |
-
else existing[key] = {
|
556 |
-
action: MOVE,
|
557 |
-
index: i,
|
558 |
-
from: existing[key].index,
|
559 |
-
element: cached.nodes[existing[key].index] || $document.createElement("div")
|
560 |
-
}
|
561 |
-
}
|
562 |
-
}
|
563 |
-
}
|
564 |
-
var actions = []
|
565 |
-
for (var prop in existing) actions.push(existing[prop])
|
566 |
-
var changes = actions.sort(sortChanges);
|
567 |
-
var newCached = new Array(cached.length)
|
568 |
-
newCached.nodes = cached.nodes.slice()
|
569 |
-
|
570 |
-
for (var i = 0, change; change = changes[i]; i++) {
|
571 |
-
if (change.action === DELETION) {
|
572 |
-
clear(cached[change.index].nodes, cached[change.index]);
|
573 |
-
newCached.splice(change.index, 1)
|
574 |
-
}
|
575 |
-
if (change.action === INSERTION) {
|
576 |
-
var dummy = $document.createElement("div");
|
577 |
-
dummy.key = data[change.index].attrs.key;
|
578 |
-
parentElement.insertBefore(dummy, parentElement.childNodes[change.index] || null);
|
579 |
-
newCached.splice(change.index, 0, {attrs: {key: data[change.index].attrs.key}, nodes: [dummy]})
|
580 |
-
newCached.nodes[change.index] = dummy
|
581 |
-
}
|
582 |
-
|
583 |
-
if (change.action === MOVE) {
|
584 |
-
if (parentElement.childNodes[change.index] !== change.element && change.element !== null) {
|
585 |
-
parentElement.insertBefore(change.element, parentElement.childNodes[change.index] || null)
|
586 |
-
}
|
587 |
-
newCached[change.index] = cached[change.from]
|
588 |
-
newCached.nodes[change.index] = change.element
|
589 |
-
}
|
590 |
-
}
|
591 |
-
cached = newCached;
|
592 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
}
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
if (item === undefined) continue;
|
600 |
-
if (!item.nodes.intact) intact = false;
|
601 |
-
if (item.$trusted) {
|
602 |
-
//fix offset of next element if item was a trusted string w/ more than one html element
|
603 |
-
//the first clause in the regexp matches elements
|
604 |
-
//the second clause (after the pipe) matches text nodes
|
605 |
-
subArrayCount += (item.match(/<[^\/]|\>\s*[^<]/g) || [0]).length
|
606 |
-
}
|
607 |
-
else subArrayCount += type.call(item) === ARRAY ? item.length : 1;
|
608 |
-
cached[cacheCount++] = item
|
609 |
}
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
}
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
|
|
621 |
}
|
622 |
-
|
623 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
624 |
}
|
625 |
}
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
}
|
639 |
-
|
640 |
-
|
641 |
-
controllers.push(controller)
|
642 |
}
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
}
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
};
|
678 |
-
if (controllers.length) {
|
679 |
-
cached.views = views
|
680 |
-
cached.controllers = controllers
|
681 |
-
for (var i = 0, controller; controller = controllers[i]; i++) {
|
682 |
-
if (controller.onunload && controller.onunload.$old) controller.onunload = controller.onunload.$old
|
683 |
-
if (pendingRequests && controller.onunload) {
|
684 |
-
var onunload = controller.onunload
|
685 |
-
controller.onunload = noop
|
686 |
-
controller.onunload.$old = onunload
|
687 |
-
}
|
688 |
-
}
|
689 |
-
}
|
690 |
-
|
691 |
-
if (cached.children && !cached.children.nodes) cached.children.nodes = [];
|
692 |
-
//edge case: setting value on <select> doesn't work before children exist, so set it again after children have been created
|
693 |
-
if (data.tag === "select" && "value" in data.attrs) setAttributes(node, data.tag, {value: data.attrs.value}, {}, namespace);
|
694 |
-
parentElement.insertBefore(node, parentElement.childNodes[index] || null)
|
695 |
}
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
}
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
718 |
}
|
719 |
}
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
733 |
}
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
nodes = [$document.createTextNode(data)]
|
750 |
-
}
|
751 |
-
parentElement.insertBefore(nodes[0], parentElement.childNodes[index] || null);
|
752 |
-
nodes[0].nodeValue = data
|
753 |
-
}
|
754 |
-
}
|
755 |
}
|
756 |
-
|
757 |
-
|
758 |
}
|
759 |
-
else cached.nodes.intact = true
|
760 |
}
|
|
|
|
|
761 |
|
762 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
763 |
}
|
764 |
-
|
765 |
function setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {
|
766 |
-
for (var attrName in dataAttrs) {
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
node[attrName] = autoredraw(dataAttr, node)
|
777 |
-
}
|
778 |
-
//handle `style: {...}`
|
779 |
-
else if (attrName === "style" && dataAttr != null && type.call(dataAttr) === OBJECT) {
|
780 |
-
for (var rule in dataAttr) {
|
781 |
-
if (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) node.style[rule] = dataAttr[rule]
|
782 |
-
}
|
783 |
-
for (var rule in cachedAttr) {
|
784 |
-
if (!(rule in dataAttr)) node.style[rule] = ""
|
785 |
-
}
|
786 |
-
}
|
787 |
-
//handle SVG
|
788 |
-
else if (namespace != null) {
|
789 |
-
if (attrName === "href") node.setAttributeNS("http://www.w3.org/1999/xlink", "href", dataAttr);
|
790 |
-
else if (attrName === "className") node.setAttribute("class", dataAttr);
|
791 |
-
else node.setAttribute(attrName, dataAttr)
|
792 |
-
}
|
793 |
-
//handle cases that are properties (but ignore cases where we should use setAttribute instead)
|
794 |
-
//- list and form are typically used as strings, but are DOM element references in js
|
795 |
-
//- when using CSS selectors (e.g. `m("[style='']")`), style is used as a string, but it's an object in js
|
796 |
-
else if (attrName in node && !(attrName === "list" || attrName === "style" || attrName === "form" || attrName === "type" || attrName === "width" || attrName === "height")) {
|
797 |
-
//#348 don't set the value if not needed otherwise cursor placement breaks in Chrome
|
798 |
-
if (tag !== "input" || node[attrName] !== dataAttr) node[attrName] = dataAttr
|
799 |
-
}
|
800 |
-
else node.setAttribute(attrName, dataAttr)
|
801 |
-
}
|
802 |
-
catch (e) {
|
803 |
-
//swallow IE's invalid argument errors to mimic HTML's fallback-to-doing-nothing-on-invalid-attributes behavior
|
804 |
-
if (e.message.indexOf("Invalid argument") < 0) throw e
|
805 |
-
}
|
806 |
-
}
|
807 |
-
//#348 dataAttr may not be a string, so use loose comparison (double equal) instead of strict (triple equal)
|
808 |
-
else if (attrName === "value" && tag === "input" && node.value != dataAttr) {
|
809 |
-
node.value = dataAttr
|
810 |
}
|
811 |
}
|
812 |
return cachedAttrs
|
813 |
}
|
|
|
814 |
function clear(nodes, cached) {
|
815 |
for (var i = nodes.length - 1; i > -1; i--) {
|
816 |
if (nodes[i] && nodes[i].parentNode) {
|
817 |
-
try {
|
818 |
-
|
819 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
820 |
if (cached[i]) unload(cached[i])
|
821 |
}
|
822 |
}
|
823 |
-
if
|
|
|
|
|
|
|
|
|
824 |
}
|
|
|
825 |
function unload(cached) {
|
826 |
-
if (cached.configContext &&
|
827 |
-
cached.configContext.onunload()
|
828 |
cached.configContext.onunload = null
|
829 |
}
|
830 |
if (cached.controllers) {
|
831 |
-
|
832 |
-
if (
|
833 |
-
|
|
|
|
|
834 |
}
|
835 |
if (cached.children) {
|
836 |
-
if (
|
837 |
-
for (var i = 0, child; child = cached.children[i]; i++) unload(child)
|
838 |
-
}
|
839 |
else if (cached.children.tag) unload(cached.children)
|
840 |
}
|
841 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
842 |
function injectHTML(parentElement, index, data) {
|
843 |
-
var nextSibling = parentElement.childNodes[index]
|
844 |
if (nextSibling) {
|
845 |
-
var isElement = nextSibling.nodeType
|
846 |
-
var placeholder = $document.createElement("span")
|
847 |
if (isElement) {
|
848 |
-
parentElement.insertBefore(placeholder, nextSibling || null)
|
849 |
-
placeholder.insertAdjacentHTML("beforebegin", data)
|
850 |
parentElement.removeChild(placeholder)
|
|
|
|
|
851 |
}
|
852 |
-
|
|
|
853 |
}
|
854 |
-
|
855 |
-
var nodes = []
|
|
|
856 |
while (parentElement.childNodes[index] !== nextSibling) {
|
857 |
-
nodes.push(parentElement.childNodes[index])
|
858 |
index++
|
859 |
}
|
|
|
860 |
return nodes
|
861 |
}
|
|
|
862 |
function autoredraw(callback, object) {
|
863 |
-
return function(e) {
|
864 |
-
e = e || event
|
865 |
-
m.redraw.strategy("diff")
|
866 |
-
m.startComputation()
|
867 |
-
try {
|
868 |
-
|
|
|
869 |
endFirstComputation()
|
870 |
}
|
871 |
}
|
872 |
}
|
873 |
|
874 |
-
var html
|
875 |
var documentNode = {
|
876 |
-
appendChild: function(node) {
|
877 |
-
if (html === undefined) html = $document.createElement("html")
|
878 |
-
if ($document.documentElement &&
|
|
|
879 |
$document.replaceChild(node, $document.documentElement)
|
|
|
|
|
880 |
}
|
881 |
-
|
882 |
this.childNodes = $document.childNodes
|
883 |
},
|
884 |
-
|
|
|
885 |
this.appendChild(node)
|
886 |
},
|
|
|
887 |
childNodes: []
|
888 |
-
}
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
function getCellCacheKey(element) {
|
903 |
-
var index = nodeCache.indexOf(element)
|
904 |
return index < 0 ? nodeCache.push(element) - 1 : index
|
905 |
}
|
906 |
|
907 |
-
m.trust = function(value) {
|
908 |
-
value = new String(value)
|
909 |
-
value.$trusted = true
|
910 |
return value
|
911 |
-
}
|
912 |
|
913 |
function gettersetter(store) {
|
914 |
-
|
915 |
-
if (arguments.length) store = arguments[0]
|
916 |
return store
|
917 |
-
}
|
918 |
|
919 |
-
prop.toJSON = function() {
|
920 |
return store
|
921 |
-
}
|
922 |
|
923 |
return prop
|
924 |
}
|
925 |
|
926 |
m.prop = function (store) {
|
927 |
-
|
928 |
-
|
929 |
return propify(store)
|
930 |
}
|
931 |
|
932 |
return gettersetter(store)
|
933 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
|
935 |
-
var roots = [], components = [], controllers = [], lastRedrawId = null, lastRedrawCallTime = 0, computePreRedrawHook = null, computePostRedrawHook = null, prevented = false, topComponent, unloaders = [];
|
936 |
-
var FRAME_BUDGET = 16; //60 frames per second = 1 call per 16 ms
|
937 |
function parameterize(component, args) {
|
938 |
-
|
|
|
939 |
return (component.controller || noop).apply(this, args) || this
|
|
|
|
|
|
|
|
|
|
|
940 |
}
|
941 |
-
|
942 |
-
|
943 |
-
|
|
|
|
|
|
|
|
|
|
|
944 |
}
|
|
|
945 |
view.$original = component.view
|
946 |
var output = {controller: controller, view: view}
|
947 |
if (args[0] && args[0].key != null) output.attrs = {key: args[0].key}
|
948 |
return output
|
949 |
}
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
var isPrevented = false;
|
959 |
-
var event = {preventDefault: function() {
|
960 |
-
isPrevented = true;
|
961 |
-
computePreRedrawHook = computePostRedrawHook = null;
|
962 |
-
}};
|
963 |
-
for (var i = 0, unloader; unloader = unloaders[i]; i++) {
|
964 |
-
unloader.handler.call(unloader.controller, event)
|
965 |
-
unloader.controller.onunload = null
|
966 |
-
}
|
967 |
-
if (isPrevented) {
|
968 |
-
for (var i = 0, unloader; unloader = unloaders[i]; i++) unloader.controller.onunload = unloader.handler
|
969 |
-
}
|
970 |
-
else unloaders = []
|
971 |
-
|
972 |
-
if (controllers[index] && typeof controllers[index].onunload === FUNCTION) {
|
973 |
-
controllers[index].onunload(event)
|
974 |
-
}
|
975 |
-
|
976 |
if (!isPrevented) {
|
977 |
-
m.redraw.strategy("all")
|
978 |
-
m.startComputation()
|
979 |
-
roots[index] = root
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
986 |
if (currentComponent === topComponent) {
|
987 |
-
controllers[index] = controller
|
988 |
components[index] = component
|
989 |
}
|
990 |
-
endFirstComputation()
|
|
|
|
|
|
|
991 |
return controllers[index]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
992 |
}
|
993 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
994 |
var redrawing = false
|
995 |
-
m.redraw = function(force) {
|
996 |
if (redrawing) return
|
997 |
redrawing = true
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
//
|
1002 |
-
//
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1006 |
}
|
|
|
|
|
1007 |
}
|
1008 |
-
|
1009 |
-
|
1010 |
-
|
1011 |
-
}
|
1012 |
-
redrawing = false
|
1013 |
-
};
|
1014 |
-
m.redraw.strategy = m.prop();
|
1015 |
function redraw() {
|
1016 |
if (computePreRedrawHook) {
|
1017 |
computePreRedrawHook()
|
1018 |
computePreRedrawHook = null
|
1019 |
}
|
1020 |
-
|
|
|
1021 |
if (controllers[i]) {
|
1022 |
-
var args =
|
1023 |
-
m.render(root,
|
|
|
1024 |
}
|
1025 |
-
}
|
1026 |
-
//after rendering within a routed context, we need to scroll back to
|
|
|
1027 |
if (computePostRedrawHook) {
|
1028 |
-
computePostRedrawHook()
|
1029 |
computePostRedrawHook = null
|
1030 |
}
|
1031 |
-
lastRedrawId = null
|
1032 |
-
lastRedrawCallTime = new Date
|
1033 |
m.redraw.strategy("diff")
|
1034 |
}
|
1035 |
|
1036 |
-
|
1037 |
-
|
1038 |
-
m.endComputation = function() {
|
1039 |
-
pendingRequests = Math.max(pendingRequests - 1, 0);
|
1040 |
-
if (pendingRequests === 0) m.redraw()
|
1041 |
-
};
|
1042 |
-
var endFirstComputation = function() {
|
1043 |
-
if (m.redraw.strategy() == "none") {
|
1044 |
pendingRequests--
|
1045 |
m.redraw.strategy("diff")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1046 |
}
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
var path = currentRoute = normalizeRoute(source);
|
1069 |
-
if (!routeByValue(root, router, path)) {
|
1070 |
-
if (isDefaultRoute) throw new Error("Ensure the default route matches one of the routes defined in m.route")
|
1071 |
isDefaultRoute = true
|
1072 |
-
m.route(
|
1073 |
isDefaultRoute = false
|
1074 |
}
|
1075 |
-
}
|
1076 |
-
|
1077 |
-
|
|
|
|
|
|
|
|
|
1078 |
var path = $location[m.route.mode]
|
1079 |
if (m.route.mode === "pathname") path += $location.search
|
1080 |
-
if (currentRoute
|
1081 |
-
redirect(path)
|
1082 |
-
}
|
1083 |
-
};
|
1084 |
-
computePreRedrawHook = setScroll;
|
1085 |
-
window[listener]()
|
1086 |
-
}
|
1087 |
-
//config: m.route
|
1088 |
-
else if (arguments[0].addEventListener || arguments[0].attachEvent) {
|
1089 |
-
var element = arguments[0];
|
1090 |
-
var isInitialized = arguments[1];
|
1091 |
-
var context = arguments[2];
|
1092 |
-
var vdom = arguments[3];
|
1093 |
-
element.href = (m.route.mode !== 'pathname' ? $location.pathname : '') + modes[m.route.mode] + vdom.attrs.href;
|
1094 |
-
if (element.addEventListener) {
|
1095 |
-
element.removeEventListener("click", routeUnobtrusive);
|
1096 |
-
element.addEventListener("click", routeUnobtrusive)
|
1097 |
}
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1101 |
}
|
|
|
|
|
1102 |
}
|
1103 |
-
//m.route(route, params, shouldReplaceHistoryEntry)
|
1104 |
-
|
1105 |
-
var oldRoute = currentRoute
|
1106 |
-
currentRoute =
|
1107 |
-
|
|
|
1108 |
var queryIndex = currentRoute.indexOf("?")
|
1109 |
-
var params
|
1110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1111 |
var querystring = buildQueryString(params)
|
1112 |
-
var currentPath
|
1113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1114 |
|
1115 |
-
var
|
|
|
|
|
1116 |
|
1117 |
-
if (
|
|
|
1118 |
computePreRedrawHook = setScroll
|
1119 |
-
computePostRedrawHook = function() {
|
1120 |
-
|
1121 |
-
|
|
|
1122 |
redirect(modes[m.route.mode] + currentRoute)
|
1123 |
-
}
|
1124 |
-
else {
|
1125 |
$location[m.route.mode] = currentRoute
|
1126 |
redirect(modes[m.route.mode] + currentRoute)
|
1127 |
}
|
1128 |
}
|
1129 |
-
}
|
1130 |
-
|
1131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1132 |
return routeParams[key]
|
1133 |
-
}
|
1134 |
-
|
|
|
|
|
1135 |
function normalizeRoute(route) {
|
1136 |
return route.slice(modes[m.route.mode].length)
|
1137 |
}
|
|
|
1138 |
function routeByValue(root, router, path) {
|
1139 |
-
routeParams = {}
|
1140 |
|
1141 |
-
var queryStart = path.indexOf("?")
|
1142 |
if (queryStart !== -1) {
|
1143 |
-
routeParams = parseQueryString(
|
|
|
1144 |
path = path.substr(0, queryStart)
|
1145 |
}
|
1146 |
|
1147 |
// Get all routes and check if there's
|
1148 |
// an exact match for the current path
|
1149 |
-
var keys = Object.keys(router)
|
1150 |
-
var index = keys.indexOf(path)
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
|
|
1154 |
}
|
1155 |
|
1156 |
-
for (var route in router) {
|
1157 |
if (route === path) {
|
1158 |
-
m.mount(root, router[route])
|
1159 |
return true
|
1160 |
}
|
1161 |
|
1162 |
-
var matcher = new RegExp("^" + route
|
|
|
|
|
1163 |
|
1164 |
if (matcher.test(path)) {
|
1165 |
-
|
1166 |
-
|
1167 |
-
var
|
1168 |
-
|
|
|
|
|
|
|
|
|
1169 |
m.mount(root, router[route])
|
1170 |
-
})
|
|
|
1171 |
return true
|
1172 |
}
|
1173 |
}
|
1174 |
}
|
|
|
1175 |
function routeUnobtrusive(e) {
|
1176 |
-
e = e || event
|
1177 |
-
if (e.ctrlKey || e.metaKey || e.which === 2) return
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1184 |
}
|
|
|
1185 |
function setScroll() {
|
1186 |
-
if (m.route.mode
|
1187 |
-
|
|
|
|
|
|
|
1188 |
}
|
|
|
1189 |
function buildQueryString(object, prefix) {
|
1190 |
var duplicates = {}
|
1191 |
var str = []
|
1192 |
-
|
|
|
1193 |
var key = prefix ? prefix + "[" + prop + "]" : prop
|
1194 |
var value = object[prop]
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1200 |
if (!duplicates[key][item]) {
|
1201 |
duplicates[key][item] = true
|
1202 |
-
|
|
|
1203 |
}
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
|
|
|
|
1208 |
}
|
1209 |
return str.join("&")
|
1210 |
}
|
|
|
1211 |
function parseQueryString(str) {
|
1212 |
-
if (str
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
|
|
|
|
|
|
1217 |
var key = decodeURIComponent(pair[0])
|
1218 |
-
var value = pair.length
|
1219 |
if (params[key] != null) {
|
1220 |
-
if (
|
1221 |
params[key].push(value)
|
1222 |
}
|
1223 |
else params[key] = value
|
1224 |
-
}
|
|
|
1225 |
return params
|
1226 |
}
|
|
|
1227 |
m.route.buildQueryString = buildQueryString
|
1228 |
m.route.parseQueryString = parseQueryString
|
1229 |
-
|
1230 |
function reset(root) {
|
1231 |
-
var cacheKey = getCellCacheKey(root)
|
1232 |
-
clear(root.childNodes, cellCache[cacheKey])
|
1233 |
cellCache[cacheKey] = undefined
|
1234 |
}
|
1235 |
|
1236 |
m.deferred = function () {
|
1237 |
-
var deferred = new Deferred()
|
1238 |
-
deferred.promise = propify(deferred.promise)
|
1239 |
return deferred
|
1240 |
-
}
|
|
|
1241 |
function propify(promise, initialValue) {
|
1242 |
-
var prop = m.prop(initialValue)
|
1243 |
-
promise.then(prop)
|
1244 |
-
prop.then = function(resolve, reject) {
|
1245 |
return propify(promise.then(resolve, reject), initialValue)
|
1246 |
-
}
|
|
|
|
|
1247 |
return prop
|
1248 |
}
|
1249 |
-
//Promiz.mithril.js | Zolmeister | MIT
|
1250 |
-
//a modified version of Promiz.js, which does not conform to Promises/A+
|
1251 |
-
//
|
1252 |
-
//
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1256 |
|
1257 |
-
|
|
|
|
|
|
|
|
|
1258 |
|
1259 |
-
self
|
|
|
|
|
1260 |
if (!state) {
|
1261 |
-
promiseValue = value
|
1262 |
-
state = RESOLVING
|
1263 |
|
1264 |
fire()
|
1265 |
}
|
1266 |
-
return this
|
1267 |
-
};
|
1268 |
|
1269 |
-
|
|
|
|
|
|
|
1270 |
if (!state) {
|
1271 |
-
promiseValue = value
|
1272 |
-
state = REJECTING
|
1273 |
|
1274 |
fire()
|
1275 |
}
|
1276 |
-
return this
|
1277 |
-
};
|
1278 |
|
1279 |
-
|
1280 |
-
|
|
|
|
|
|
|
|
|
1281 |
if (state === RESOLVED) {
|
1282 |
deferred.resolve(promiseValue)
|
1283 |
-
}
|
1284 |
-
else if (state === REJECTED) {
|
1285 |
deferred.reject(promiseValue)
|
1286 |
-
}
|
1287 |
-
else {
|
1288 |
next.push(deferred)
|
1289 |
}
|
|
|
1290 |
return deferred.promise
|
1291 |
-
}
|
1292 |
|
1293 |
function finish(type) {
|
1294 |
-
state = type || REJECTED
|
1295 |
-
next.map(function(deferred) {
|
1296 |
-
state === RESOLVED
|
|
|
|
|
|
|
|
|
1297 |
})
|
1298 |
}
|
1299 |
|
1300 |
-
function thennable(then,
|
1301 |
-
if (((promiseValue != null &&
|
|
|
1302 |
try {
|
1303 |
// count protects against abuse calls from spec checker
|
1304 |
-
var count = 0
|
1305 |
-
then.call(promiseValue, function(value) {
|
1306 |
-
if (count++) return
|
1307 |
-
promiseValue = value
|
1308 |
-
|
1309 |
}, function (value) {
|
1310 |
-
if (count++) return
|
1311 |
-
promiseValue = value
|
1312 |
-
|
1313 |
})
|
1314 |
-
}
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
failureCallback()
|
1319 |
}
|
1320 |
} else {
|
1321 |
-
|
1322 |
}
|
1323 |
}
|
1324 |
|
1325 |
function fire() {
|
1326 |
// check if it's a thenable
|
1327 |
-
var then
|
1328 |
try {
|
1329 |
then = promiseValue && promiseValue.then
|
1330 |
-
}
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
state = REJECTING;
|
1335 |
return fire()
|
1336 |
}
|
1337 |
-
|
1338 |
-
|
|
|
|
|
|
|
|
|
|
|
1339 |
fire()
|
1340 |
-
}, function() {
|
1341 |
-
state = REJECTING
|
1342 |
fire()
|
1343 |
-
}, function() {
|
1344 |
try {
|
1345 |
-
if (state === RESOLVING &&
|
1346 |
-
promiseValue =
|
1347 |
-
}
|
1348 |
-
|
1349 |
-
promiseValue = failureCallback(promiseValue);
|
1350 |
state = RESOLVING
|
1351 |
}
|
1352 |
-
}
|
1353 |
-
|
1354 |
-
|
1355 |
-
promiseValue = e;
|
1356 |
return finish()
|
1357 |
}
|
1358 |
|
1359 |
if (promiseValue === self) {
|
1360 |
-
promiseValue = TypeError()
|
1361 |
finish()
|
1362 |
-
}
|
1363 |
-
else {
|
1364 |
thennable(then, function () {
|
1365 |
finish(RESOLVED)
|
1366 |
}, finish, function () {
|
@@ -1370,178 +2295,235 @@ var m = (function app(window, undefined) {
|
|
1370 |
})
|
1371 |
}
|
1372 |
}
|
1373 |
-
m.deferred.onerror = function(e) {
|
1374 |
-
if (type.call(e) === "[object Error]" && !e.constructor.toString().match(/ Error/)) throw e
|
1375 |
-
};
|
1376 |
|
1377 |
-
m.
|
1378 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1379 |
function synchronizer(pos, resolved) {
|
1380 |
-
return function(value) {
|
1381 |
-
results[pos] = value
|
1382 |
-
if (!resolved) method = "reject"
|
1383 |
if (--outstanding === 0) {
|
1384 |
-
deferred.promise(results)
|
1385 |
deferred[method](results)
|
1386 |
}
|
1387 |
return value
|
1388 |
}
|
1389 |
}
|
1390 |
|
1391 |
-
var deferred = m.deferred();
|
1392 |
-
var outstanding = args.length;
|
1393 |
-
var results = new Array(outstanding);
|
1394 |
if (args.length > 0) {
|
1395 |
-
|
1396 |
-
|
1397 |
-
}
|
|
|
|
|
1398 |
}
|
1399 |
-
else deferred.resolve([]);
|
1400 |
|
1401 |
return deferred.promise
|
1402 |
-
}
|
1403 |
-
function identity(value) {return value}
|
1404 |
|
1405 |
-
function
|
1406 |
-
if (options.dataType && options.dataType.toLowerCase() === "jsonp") {
|
1407 |
-
var callbackKey = "mithril_callback_" + new Date().getTime() + "_" + (Math.round(Math.random() * 1e16)).toString(36);
|
1408 |
-
var script = $document.createElement("script");
|
1409 |
-
|
1410 |
-
window[callbackKey] = function(resp) {
|
1411 |
-
script.parentNode.removeChild(script);
|
1412 |
-
options.onload({
|
1413 |
-
type: "load",
|
1414 |
-
target: {
|
1415 |
-
responseText: resp
|
1416 |
-
}
|
1417 |
-
});
|
1418 |
-
window[callbackKey] = undefined
|
1419 |
-
};
|
1420 |
|
1421 |
-
|
1422 |
-
|
|
|
|
|
1423 |
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
return false
|
1434 |
-
};
|
1435 |
-
|
1436 |
-
script.onload = function(e) {
|
1437 |
-
return false
|
1438 |
-
};
|
1439 |
-
|
1440 |
-
script.src = options.url
|
1441 |
-
+ (options.url.indexOf("?") > 0 ? "&" : "?")
|
1442 |
-
+ (options.callbackKey ? options.callbackKey : "callback")
|
1443 |
-
+ "=" + callbackKey
|
1444 |
-
+ "&" + buildQueryString(options.data || {});
|
1445 |
-
$document.body.appendChild(script)
|
1446 |
-
}
|
1447 |
-
else {
|
1448 |
-
var xhr = new window.XMLHttpRequest;
|
1449 |
-
xhr.open(options.method, options.url, true, options.user, options.password);
|
1450 |
-
xhr.onreadystatechange = function() {
|
1451 |
-
if (xhr.readyState === 4) {
|
1452 |
-
if (xhr.status >= 200 && xhr.status < 300) options.onload({type: "load", target: xhr});
|
1453 |
-
else options.onerror({type: "error", target: xhr})
|
1454 |
}
|
1455 |
-
}
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1466 |
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1470 |
}
|
1471 |
-
|
1472 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1473 |
}
|
1474 |
}
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
var
|
1479 |
-
|
|
|
|
|
|
|
1480 |
}
|
1481 |
-
else xhrOptions.data = serialize(data);
|
1482 |
-
return xhrOptions
|
1483 |
}
|
|
|
1484 |
function parameterizeUrl(url, data) {
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
var
|
1489 |
-
url = url.replace(tokens[i], data[key]);
|
1490 |
delete data[key]
|
1491 |
-
|
|
|
1492 |
}
|
1493 |
return url
|
1494 |
}
|
1495 |
|
1496 |
-
m.request = function(
|
1497 |
-
if (
|
1498 |
-
var deferred = new Deferred()
|
1499 |
-
var isJSONP =
|
1500 |
-
|
1501 |
-
|
1502 |
-
var
|
1503 |
-
|
1504 |
-
|
1505 |
-
|
1506 |
-
|
1507 |
-
|
1508 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1509 |
try {
|
1510 |
-
|
1511 |
-
var
|
1512 |
-
|
1513 |
-
|