增加模板
This commit is contained in:
1 parent
871cf27262
commit
e678ff337c
137 files changed
+49724
No files matched your search
+6566
File diff suppressed because it is too large.
Load diff
+2306
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,71 @@
|
||||
|
||||
.zeng_msgbox_layer, .zeng_msgbox_layer .gtl_ico_succ, .zeng_msgbox_layer .gtl_ico_fail, .zeng_msgbox_layer .gtl_ico_hits, .zeng_msgbox_layer .gtl_ico_clear, .zeng_msgbox_layer .gtl_end {
|
||||
display:inline-block;
|
||||
height:54px;
|
||||
line-height:54px;
|
||||
font-weight:bold;
|
||||
font-size:14px;
|
||||
color:#606060;
|
||||
background-image:url("https://zf.adoyun.cn/Core/Assets/Doc/images/gb_tip_layer.png");
|
||||
_background-image:url("https://zf.adoyun.cn/Core/Assets/Doc/images/gb_tip_layer_ie6.png");
|
||||
background-repeat:no-repeat
|
||||
}
|
||||
.zeng_msgbox_layer_wrap {
|
||||
width:100%;
|
||||
position:fixed;
|
||||
_position:absolute;
|
||||
top:46%;
|
||||
left:0;
|
||||
text-align:center;
|
||||
z-index:65533
|
||||
}
|
||||
.zeng_msgbox_layer {
|
||||
background-position:0 -161px;
|
||||
background-repeat:repeat-x;
|
||||
padding:0 18px 0 9px;
|
||||
margin:0 auto;
|
||||
position:relative
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_ico_succ {
|
||||
background-position:-6px 0;
|
||||
left:-45px;
|
||||
top:0;
|
||||
width:45px;
|
||||
position:absolute
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_end {
|
||||
background-position:0 0;
|
||||
position:absolute;
|
||||
right:-6px;
|
||||
top:0;
|
||||
width:6px
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_ico_fail {
|
||||
background-position:-6px -108px;
|
||||
position:absolute;
|
||||
left:-45px;
|
||||
top:0;
|
||||
width:45px
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_ico_hits {
|
||||
background-position:-6px -54px;
|
||||
position:absolute;
|
||||
left:-45px;
|
||||
top:0;
|
||||
width:45px
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_ico_clear {
|
||||
background-position:-6px 0;
|
||||
left:-5px;
|
||||
width:5px;
|
||||
position:absolute;
|
||||
top:0
|
||||
}
|
||||
.zeng_msgbox_layer .gtl_ico_loading {
|
||||
width:16px;
|
||||
height:16px;
|
||||
border:0;
|
||||
background-image:url(https://zf.adoyun.cn/Core/Assets/Doc/images/loading.gif);
|
||||
float:left;
|
||||
margin:19px 10px 0 5px
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
*{margin:0;padding:0}body{width:100%;font-family:"Microsoft YaHei",Arial,"Hiragino Sans GB",STHeiti,"WenQuanYi Micro Hei",SimSun,sans-serif}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-button:vertical{display:none}::-webkit-scrollbar-track:vertical{background-color:#000}::-webkit-scrollbar-track-piece{background-color:#F5F5F5}::-webkit-scrollbar-thumb:vertical{margin-right:10px;background-color:#A6A6A6}::-webkit-scrollbar-thumb:vertical:hover{background-color:#aaa}::-webkit-scrollbar-corner:vertical{background-color:#535353}::-webkit-scrollbar-resizer:vertical{background-color:#FF6E00}.navbar-default{background:#fff;border:0}::-webkit-scrollbar-thumb{border-radius:5px}img.user_icon{height:36px;border-radius:50%}.logo{display:inline-block;width:160px;height:40px;background:url(https://zf.adoyun.cn/Core/Assets/Doc/logo.png) no-repeat;background-size:95%;background-position:0 0;position:relative;top:13px;left:15px}.logo_blue{background-position:0 -40px}.header-actions .logo_img{padding-top:13px}.header-actions:hover b.caret.user_caret{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}b.caret.user_caret{position:absolute;top:30px;right:3px;-webkit-transition:200ms;-ms-transition:200ms;-moz-transition:200ms;-o-transition:200ms;transition:200ms}a:focus{border:none;outline:0}.header-actions{position:relative}.select_go{box-shadow:0 0 10px rgba(0,0,0,.3);min-width:100px;background:#fff;position:absolute;left:-15px;border:1px solid #e5e5e5;-webkit-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);-moz-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);-o-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);transition:all .6s cubic-bezier(0.175,.885,.32,1.275);opacity:0;-webkit-transform:scale3d(0,0,0);-moz-transform:scale3d(0,0,0);-ms-transform:scale3d(0,0,0);-o-transform:scale3d(0,0,0);transform:scale3d(0,0,0);-webkit-transform-origin:40px top;-moz-transform-origin:40px top;-ms-transform-origin:40px top;-o-transform-origin:40px top;transform-origin:40px top}.select_go .go_console,.select_go .go_logout{display:block;width:100%;height:40px;line-height:40px;color:#333}.select_go .go_console:hover,.select_go .go_logout:hover{transition:.2s;background:#f5f5f5}.nav-new{box-shadow:0 0 10px rgba(0,0,0,.3);min-width:100px;background:#fff;left:calc(50% - 48px);border:1px solid #e5e5e5;position:absolute;white-space:nowrap;-webkit-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);-moz-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);-o-transition:all .6s cubic-bezier(0.175,.885,.32,1.275);transition:all .6s cubic-bezier(0.175,.885,.32,1.275);opacity:0;-webkit-transform:scale3d(0,0,0);-moz-transform:scale3d(0,0,0);-ms-transform:scale3d(0,0,0);-o-transform:scale3d(0,0,0);transform:scale3d(0,0,0);-webkit-transform-origin:40px top;-moz-transform-origin:40px top;-ms-transform-origin:40px top;-o-transform-origin:40px top;transform-origin:40px top}.nav-new .li-new{display:block;width:100%;height:40px;line-height:40px;color:#333}.nav-new .li-new:hover{transition:.2s;background:#f5f5f5}.nav-new:after{content:"";display:block;height:0;clear:both;visibility:hidden}.header-doc:hover .nav-new{-webkit-transform:scale3d(1,1,1);-moz-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.header-actions:hover .select_go{-webkit-transform:scale3d(1,1,1);-moz-transform:scale3d(1,1,1);-ms-transform:scale3d(1,1,1);-o-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}li{list-style:none}@media (min-width:768px) and (max-width:992px){.container{padding-left:10px}header ul.c_navbar li{margin-left:20px}header ul.c_navbar li a.font_size{margin-left:0}header ul.z_navbar li a{padding:0 5px}.screen .h4{line-height:2.2em}.proceed{font-size:1em;padding:10px 25px}.bottom_line{width:100%;height:200px;margin-top:10%}.bottom_line ul.ico-img{width:auto;padding:0;margin-left:38%}.bottom_line ul.ico-img li{float:left;width:50px}.bottom_line ul.ico-img li a{color:#898B8D;font-size:2em}.soso{position:absolute;top:55%;left:40%}.soso img{width:110px}}@media (min-width:992px){ul.z_navbar li a{padding:0 20px}.banner2 .ban2_content{font-size:1.5em;line-height:40px}.banner2 .ban2_text .ban2_middle{font-size:3em}.banner2 .ban2_text .ban3_middle{font-size:3em}.banner3 .ban3_content{font-size:1.5em;line-height:40px}.banner3 .ban3_text .ban3_middle{font-size:3em}header ul.c_navbar li{margin-left:20px}.screen .h4{line-height:2.2em}.proceed{font-size:1.4em;padding:12px 40px}.address footer ul li a{letter-spacing:2px}.bottom_line{width:100%;height:200px;margin-top:20%;border-left:1px solid #404346}.bottom_line ul.ico-img{width:auto;padding:0;margin-left:38%}.bottom_line ul.ico-img li{float:left;width:50px}.bottom_line ul.ico-img li a{color:#898B8D;font-size:2em}.soso{position:absolute;top:120px;left:43%}.soso img{width:110px;height:110px}}@media (max-width:682px){.banner2 .ban2_coLine truncated
|
||||
@@ -0,0 +1,877 @@
|
||||
header {
|
||||
position:fixed;
|
||||
background:#fff
|
||||
}
|
||||
@media screen and (min-width:992px) {
|
||||
html,body {
|
||||
height:100%
|
||||
}
|
||||
.center_content {
|
||||
padding-left:10%
|
||||
}
|
||||
#myCarousel,.banner2,.banner3 {
|
||||
height:100%;
|
||||
min-height:450px
|
||||
}
|
||||
#myCarousel .carousel-inner,.carousel-inner>.item {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row .col-md-6 {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row .col-md-6 .cloud_host_img {
|
||||
top:22%
|
||||
}
|
||||
.banner2 .container .row .col-md-6 .ban2_text {
|
||||
height:100%
|
||||
}
|
||||
.ban2_text {
|
||||
position:relative
|
||||
}
|
||||
.ban2_text .ban2_status,.ban2_text .ban3_status {
|
||||
position:absolute;
|
||||
top:30%
|
||||
}
|
||||
.ban2_text .ban2_status .ban2_middle,.ban2_text .ban3_status .ban2_middle,.ban2_text .ban2_status .ban3_middle,.ban2_text .ban3_status .ban3_middle {
|
||||
color:#fff;
|
||||
position:relative;
|
||||
letter-spacing:6px;
|
||||
top:35%;
|
||||
left:10%
|
||||
}
|
||||
.ban2_content,.ban3_content {
|
||||
color:#fff;
|
||||
width:90%;
|
||||
position:relative;
|
||||
letter-spacing:1px;
|
||||
top:37%;
|
||||
left:10%
|
||||
}
|
||||
.ban2_experience {
|
||||
font-size:1.2em;
|
||||
color:#fff;
|
||||
margin-top:30px;
|
||||
position:relative;
|
||||
left:10%
|
||||
}
|
||||
.cloud_host_img {
|
||||
position:absolute
|
||||
}
|
||||
.blog-article {
|
||||
padding:20px
|
||||
}
|
||||
.cloud_db_img {
|
||||
position:absolute;
|
||||
top:20%
|
||||
}
|
||||
}@media (min-width:682px) and (max-width:992px) {
|
||||
header {
|
||||
position:fixed;
|
||||
background:#fff
|
||||
}
|
||||
html,body {
|
||||
height:100%
|
||||
}
|
||||
.center_content {
|
||||
padding-left:5%
|
||||
}
|
||||
#myCarousel,.banner2,.banner3 {
|
||||
height:100%;
|
||||
min-height:450px
|
||||
}
|
||||
#myCarousel .carousel-inner,.carousel-inner>.item {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row .col-md-6 {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row .col-md-6 .ban2_text {
|
||||
height:100%
|
||||
}
|
||||
.ban2_text {
|
||||
position:relative
|
||||
}
|
||||
.ban2_text .ban2_status,.ban2_text .ban3_status {
|
||||
position:absolute;
|
||||
top:30%
|
||||
}
|
||||
.ban2_text .ban2_status .ban2_middle,.ban2_text .ban3_status .ban2_middle,.ban2_text .ban2_status .ban3_middle,.ban2_text .ban3_status .ban3_middle {
|
||||
color:#fff;
|
||||
position:relative;
|
||||
letter-spacing:6px;
|
||||
top:35%;
|
||||
left:10%;
|
||||
font-size:20px
|
||||
}
|
||||
.ban2_content,.ban3_content {
|
||||
color:#fff;
|
||||
width:90%;
|
||||
position:relative;
|
||||
letter-spacing:1px;
|
||||
top:37%;
|
||||
left:10%
|
||||
}
|
||||
.ban2_experience,.ban3_experience {
|
||||
font-size:1.2em;
|
||||
color:#fff;
|
||||
margin-top:30px;
|
||||
position:relative;
|
||||
left:10%
|
||||
}
|
||||
.cloud_host_img,.cloud_db_img {
|
||||
position:absolute;
|
||||
top:22%
|
||||
}
|
||||
.blog-article {
|
||||
padding:15px
|
||||
}
|
||||
}@media (max-width:682px) {
|
||||
html,body {
|
||||
height:100%;
|
||||
min-width:400px;
|
||||
font-size:12px
|
||||
}
|
||||
#myCarousel,.banner2,.banner3 {
|
||||
height:100%
|
||||
}
|
||||
.docker {
|
||||
top:0!important
|
||||
}
|
||||
#myCarousel .carousel-inner,.carousel-inner>.item {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .container .row .col-xs-12 {
|
||||
height:50%
|
||||
}
|
||||
.banner2 .container .row .col-xs-12 .ban2_text {
|
||||
height:100%
|
||||
}
|
||||
.banner2 .ban2_text .ban2_status {
|
||||
text-align:center;
|
||||
font-size:1.5em
|
||||
}
|
||||
.cloud_host_img,.cloud_db_img {
|
||||
width:60%;
|
||||
margin-left:20%;
|
||||
margin-top:10%
|
||||
}
|
||||
.ban2_text {
|
||||
position:relative
|
||||
}
|
||||
.ban2_text .ban3_status {
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
font-size:1.5em
|
||||
}
|
||||
.ban2_text .ban3_status .ban3_middle {
|
||||
color:#fff;
|
||||
letter-spacing:6px
|
||||
}
|
||||
.ban2_text .ban3_status .ban3_content {
|
||||
color:#fff;
|
||||
width:100%;
|
||||
letter-spacing:3px
|
||||
}
|
||||
.ban2_text .ban2_status {
|
||||
position:absolute;
|
||||
top:15%
|
||||
}
|
||||
.ban2_text .ban2_status .ban2_middle {
|
||||
color:#fff;
|
||||
position:relative;
|
||||
letter-spacing:6px;
|
||||
top:35%
|
||||
}
|
||||
.ban2_content {
|
||||
color:#fff;
|
||||
width:100%;
|
||||
position:relative;
|
||||
letter-spacing:3px;
|
||||
top:37%
|
||||
}
|
||||
.ban2_experience {
|
||||
color:#fff;
|
||||
margin-top:30px;
|
||||
position:relative
|
||||
}
|
||||
.blog-article {
|
||||
padding:5px
|
||||
}
|
||||
.blog-article .h4 {
|
||||
font-size:14px
|
||||
}
|
||||
.blog-article .h5 {
|
||||
margin-top:5px;
|
||||
font-size:12px
|
||||
}
|
||||
.screen4 .safe-content {
|
||||
font-size:14px
|
||||
}
|
||||
.tenxcloud_news {
|
||||
margin-top:10px
|
||||
}
|
||||
.screen6 .collaborate li a div {
|
||||
margin:0 auto
|
||||
}
|
||||
}#nav-top {
|
||||
box-shadow:0 3px 3px rgba(0,0,0,.175)
|
||||
}
|
||||
.proceed {
|
||||
color:#fff;
|
||||
border:1px solid #fff;
|
||||
border-radius:5px;
|
||||
-moz-transition:background .4s ease;
|
||||
-ms-transition:background .4s ease;
|
||||
-webkit-transition:background .4s ease;
|
||||
transition:background .4s ease
|
||||
}
|
||||
.proceed-foot {
|
||||
color:#D9EFF0;
|
||||
padding:10px 50px;
|
||||
font-size:2em;
|
||||
border:1px solid #fff
|
||||
}
|
||||
.proceed-2,.proceed-3,.proceed-4 {
|
||||
color:#eee;
|
||||
border:1px solid #eee
|
||||
}
|
||||
.proceed:hover {
|
||||
color:#3F5061;
|
||||
background:#fff;
|
||||
border-color:#fff
|
||||
}
|
||||
#youremail {
|
||||
border-radius:4px;
|
||||
width:380px;
|
||||
height:50px;
|
||||
color:#eee;
|
||||
font-size:18px;
|
||||
border:1px solid #eee;
|
||||
background:0 0;
|
||||
vertical-align:middle;
|
||||
text-indent:10px;
|
||||
line-height:normal
|
||||
}
|
||||
#youremail::-webkit-input-placeholder {
|
||||
color:#eee
|
||||
}
|
||||
#youremail:-moz-placeholder {
|
||||
color:#eee
|
||||
}
|
||||
#youremail::-moz-placeholder {
|
||||
color:#eee
|
||||
}
|
||||
#youremail:-ms-input-placeholder {
|
||||
color:#eee
|
||||
}
|
||||
#apply-for {
|
||||
margin-left:10px;
|
||||
line-height:35px;
|
||||
background:#4280CB;
|
||||
vertical-align:top;
|
||||
border-radius:4px;
|
||||
height:50px;
|
||||
width:126px;
|
||||
font-size:18px;
|
||||
cursor:pointer;
|
||||
-moz-transition:background .4s ease;
|
||||
-ms-transition:background .4s ease;
|
||||
-webkit-transition:background .4s ease;
|
||||
transition:background .4s ease;
|
||||
font-family:Microsoft Yahei,Hiragino Sans GB,WenQuanYi Micro Hei,sans-serif
|
||||
}
|
||||
#apply-for:hover {
|
||||
background:#DFDFDF;
|
||||
color:#555
|
||||
}
|
||||
#apply-bottom {
|
||||
margin-left:10px;
|
||||
line-height:35px;
|
||||
background:#eee;
|
||||
vertical-align:middle;
|
||||
border-radius:4px;
|
||||
height:50px;
|
||||
padding:8px 12px;
|
||||
font-size:18px;
|
||||
cursor:pointer;
|
||||
-moz-transition:background .4s ease;
|
||||
-ms-transition:background .4s ease;
|
||||
-webkit-transition:background .4s ease;
|
||||
transition:background .4s ease;
|
||||
font-family:Microsoft Yahei,Hiragino Sans GB,WenQuanYi Micro Hei,sans-serif
|
||||
}
|
||||
a {
|
||||
color:inherit
|
||||
}
|
||||
a:hover {
|
||||
text-decoration:none
|
||||
}
|
||||
.carousel-indicators li {
|
||||
margin:0 8px
|
||||
}
|
||||
.carousel-indicators .active {
|
||||
margin:0 7px
|
||||
}
|
||||
.screen1 {
|
||||
margin-top:65px;
|
||||
height:calc(100% - 65px)
|
||||
}
|
||||
.screen1 #myCarousel {
|
||||
width:100%;
|
||||
overflow:hidden
|
||||
}
|
||||
.carousel-indicators {
|
||||
bottom:20px
|
||||
}
|
||||
.move_cloud {
|
||||
width:100%;
|
||||
height:200px;
|
||||
position:absolute;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/hostingupline.png) no-repeat;
|
||||
-webkit-animation:move_top 10s ease-out alternate infinite;
|
||||
-moz-animation:move_top 10s ease-out alternate infinite;
|
||||
-ms-animation:move_top 10s ease-out alternate infinite;
|
||||
animation:move_top 10s ease-out alternate infinite
|
||||
}
|
||||
.banner2 {
|
||||
width:100%;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/hostingupline.png) no-repeat;
|
||||
background-size:100%;
|
||||
position:relative
|
||||
}
|
||||
.banner2:after {
|
||||
content:'';
|
||||
background:#4280cb;
|
||||
background:-webkit-gradient(linear,0 0,0 100%,from(#4585d2),to(#4280cb));
|
||||
background:-moz-linear-gradient(top,#4585d2,#4280cb);
|
||||
background:linear-gradient(to bottom,#4585d2,#4280cb);
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
z-index:-1
|
||||
}
|
||||
.banner3:after {
|
||||
content:'';
|
||||
background:#02bf8b;
|
||||
background:-webkit-gradient(linear,0 0,0 100%,from(#02bf8b),to(#01ad7f));
|
||||
background:-moz-linear-gradient(top,#02bf8b,#01ad7f);
|
||||
background:linear-gradient(to bottom,#02bf8b,#01ad7f);
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
z-index:-1
|
||||
}
|
||||
.banner3 {
|
||||
width:100%
|
||||
}
|
||||
.banner4:after {
|
||||
content:'';
|
||||
background:#33405a;
|
||||
background:-webkit-gradient(linear,0 0,0 100%,from(#3e3e4a),to(#3e3e4a));
|
||||
background:-moz-linear-gradient(top,#33405a,#24314e);
|
||||
background:linear-gradient(to bottom,#33405a,#24314e);
|
||||
position:absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
height:100%;
|
||||
width:100%;
|
||||
z-index:-1
|
||||
}
|
||||
#trun_left {
|
||||
position:absolute;
|
||||
width:8%;
|
||||
top:0;
|
||||
left:0;
|
||||
text-align:center;
|
||||
height:100%;
|
||||
z-index:3
|
||||
}
|
||||
#trun_left ._left {
|
||||
display:none;
|
||||
font-size:5em;
|
||||
padding:200px 10px;
|
||||
color:#eee
|
||||
}
|
||||
#trun_left:hover ._left {
|
||||
display:block
|
||||
}
|
||||
#trun_right:hover ._right {
|
||||
display:block
|
||||
}
|
||||
#trun_right {
|
||||
height:100%;
|
||||
width:8%;
|
||||
top:0;
|
||||
position:absolute;
|
||||
right:0;
|
||||
z-index:3;
|
||||
text-align:center
|
||||
}
|
||||
#trun_right ._right {
|
||||
display:none;
|
||||
font-size:5em;
|
||||
color:#eee;
|
||||
padding:200px 10px
|
||||
}
|
||||
.tenxcloud_news {
|
||||
font-size:1.5em
|
||||
}
|
||||
.spring_icon {
|
||||
margin:0 auto;
|
||||
width:160px;
|
||||
height:160px;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/shensuo.png) no-repeat
|
||||
}
|
||||
.screen2 {
|
||||
width:100%;
|
||||
padding:80px 0
|
||||
}
|
||||
.screen2 .center_content {
|
||||
margin:20px auto;
|
||||
transition:.3s all
|
||||
}
|
||||
.screen2 .center_content .servers {
|
||||
height:70px;
|
||||
width:70px;
|
||||
float:left;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/server_item.png) no-repeat;
|
||||
transition:.5s background ease-in-out
|
||||
}
|
||||
.screen2 .center_content .s_item {
|
||||
background-position:0 0
|
||||
}
|
||||
.screen2 .center_content .r_item {
|
||||
background-position:0 -80px
|
||||
}
|
||||
.screen2 .center_content .m_item {
|
||||
background-position:0 -160px
|
||||
}
|
||||
.screen2 .center_content .a_item {
|
||||
background-position:0 -240px
|
||||
}
|
||||
.screen2 .process:hover {
|
||||
color:#4280CB
|
||||
}
|
||||
.screen2 .process:hover .s_item {
|
||||
background-position:-100px 0
|
||||
}
|
||||
.screen2 .containers:hover {
|
||||
color:#4280CB
|
||||
}
|
||||
.screen2 .containers:hover .r_item {
|
||||
background-position:-100px -80px
|
||||
}
|
||||
.screen2 .primer:hover {
|
||||
color:#4280CB
|
||||
}
|
||||
.screen2 .primer:hover .m_item {
|
||||
background-position:-95px -160px
|
||||
}
|
||||
.screen2 .appstore:hover {
|
||||
color:#4280CB
|
||||
}
|
||||
.screen2 .appstore:hover .a_item {
|
||||
background-position:-100px -240px
|
||||
}
|
||||
.screen3 {
|
||||
width:100%;
|
||||
background:#FAFAFB;
|
||||
position:relative;
|
||||
padding:50px 0
|
||||
}
|
||||
.screen3 .cloud_server {
|
||||
text-align:center;
|
||||
margin:20px 0;
|
||||
color:#696969;
|
||||
font-size:16px
|
||||
}
|
||||
.screen3 .cloud_server .more {
|
||||
margin:10px 0;
|
||||
font-size:1.2em;
|
||||
background:#fff;
|
||||
border:1px solid #333;
|
||||
padding:10px 20px;
|
||||
border-radius:2px;
|
||||
-moz-transition:background .4s ease;
|
||||
-ms-transition:background .4s ease;
|
||||
-webkit-transition:background .4s ease;
|
||||
transition:background .4s ease
|
||||
}
|
||||
.screen3 .server-head {
|
||||
margin-top:20px;
|
||||
color:#696969;
|
||||
text-align:center
|
||||
}
|
||||
.screen3 .server_item {
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/container_server_icon.png) no-repeat;
|
||||
height:135px;
|
||||
width:140px;
|
||||
transition:.5s background;
|
||||
margin:0 auto
|
||||
}
|
||||
.screen3 .h5 {
|
||||
margin-bottom:50px
|
||||
}
|
||||
.screen3 .container_server {
|
||||
background-position:0 0
|
||||
}
|
||||
.screen3 .arrange {
|
||||
background-position:2px -148px
|
||||
}
|
||||
.screen3 .codebuild {
|
||||
background-position:2px -300px
|
||||
}
|
||||
.screen3 .server-market {
|
||||
background-position:2px -449px
|
||||
}
|
||||
.screen3 .registry {
|
||||
background-position:3px -605px
|
||||
}
|
||||
.screen3 .ci {
|
||||
background-position:3px -757px
|
||||
}
|
||||
.screen3 .hosting {
|
||||
background-position:2px -905px
|
||||
}
|
||||
.screen3 .private {
|
||||
background-position:2px -1049px
|
||||
}
|
||||
.screen3 #container_server:hover .server-head {
|
||||
color:#55C782
|
||||
}
|
||||
.screen3 #container_server:hover .container_server {
|
||||
background-position:-146px 0
|
||||
}
|
||||
.screen3 #server-arrange:hover .server-head {
|
||||
color:#4280CB
|
||||
}
|
||||
.screen3 #server-arrange:hover .arrange {
|
||||
background-position:-146px -148px
|
||||
}
|
||||
.screen3 #codebuild:hover .server-head {
|
||||
color:#F4B329
|
||||
}
|
||||
.screen3 #codebuild:hover .codebuild {
|
||||
background-position:-146px -300px
|
||||
}
|
||||
.screen3 #server-market:hover .server-head {
|
||||
color:#8376B6
|
||||
}
|
||||
.screen3 #server-market:hover .server-market {
|
||||
background-position:-146px -449px
|
||||
}
|
||||
.screen3 #registry:hover .server-head {
|
||||
color:#55c782
|
||||
}
|
||||
.screen3 #registry:hover .registry {
|
||||
background-position:-146px -605px
|
||||
}
|
||||
.screen3 #ci:hover .server-head {
|
||||
color:#4280cb
|
||||
}
|
||||
.screen3 #ci:hover .ci {
|
||||
background-position:-146px -757px
|
||||
}
|
||||
.screen3 #hosting:hover .server-head {
|
||||
color:#f4b329
|
||||
}
|
||||
.screen3 #hosting:hover .hosting {
|
||||
background-position:-146px -905px
|
||||
}
|
||||
.screen3 #private:hover .server-head {
|
||||
color:#998fc3
|
||||
}
|
||||
.screen3 #private:hover .private {
|
||||
background-position:-146px -1049px
|
||||
}
|
||||
.screen4 {
|
||||
width:100%;
|
||||
text-align:center;
|
||||
padding:40px 0 80px;
|
||||
color:#fff;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/tese.jpg) no-repeat;
|
||||
background-size:100% 100%
|
||||
}
|
||||
.screen4 .cloud_server {
|
||||
text-align:center;
|
||||
font-size:16px
|
||||
}
|
||||
.screen4 .safe-content {
|
||||
line-height:1.5em
|
||||
}
|
||||
.screen4 .design_safe {
|
||||
width:100px;
|
||||
height:110px;
|
||||
margin:10px auto;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/tesetubiao.png) no-repeat
|
||||
}
|
||||
.screen4 .safe_ease {
|
||||
background-position:0 0
|
||||
}
|
||||
.screen4 .design_safe.tall {
|
||||
background-position:0 -110px
|
||||
}
|
||||
.screen4 .design_safe.seeyou {
|
||||
background-position:0 -218px
|
||||
}
|
||||
.screen4 .design_safe.mix {
|
||||
background-position:0 -320px
|
||||
}
|
||||
.screen5 {
|
||||
padding:40px 0 80px;
|
||||
background:#FAFAFB
|
||||
}
|
||||
.screen5 .blog-head {
|
||||
text-align:center;
|
||||
margin-bottom:30px;
|
||||
color:#696969
|
||||
}
|
||||
.screen5 .blog-date {
|
||||
font-size:20px;
|
||||
color:#fff;
|
||||
text-align:center;
|
||||
margin-bottom:20px;
|
||||
width:100px;
|
||||
height:110px;
|
||||
background:#4B80CB
|
||||
}
|
||||
.screen5 .blog-date .hrs {
|
||||
margin:10px auto;
|
||||
width:60%;
|
||||
border-color:#a9c3e6
|
||||
}
|
||||
.screen5 .blog-article {
|
||||
width:calc(100% - 100px);
|
||||
height:110px;
|
||||
background:#fff
|
||||
}
|
||||
.screen5 .blog-article .h5 {
|
||||
line-height:1.3em
|
||||
}
|
||||
.screen5 .blog-body:hover .blog-date {
|
||||
background-color:#2fba66
|
||||
}
|
||||
.screen6 {
|
||||
width:100%;
|
||||
background:#FAFAFB;
|
||||
padding:40px 0 80px;
|
||||
text-align:center
|
||||
}
|
||||
.screen6 .cloud_server {
|
||||
color:#696969;
|
||||
height:100px
|
||||
}
|
||||
.screen6 .collaborate {
|
||||
width:400%;
|
||||
position:relative;
|
||||
height:150px
|
||||
}
|
||||
.screen6 .collaborate ul {
|
||||
height:110px;
|
||||
width:25%;
|
||||
float:left
|
||||
}
|
||||
.screen6 .collaborate ul li {
|
||||
float:left;
|
||||
width:20%;
|
||||
min-width:180px;
|
||||
height:55px
|
||||
}
|
||||
.screen6 .collaborate ul li .partner {
|
||||
width:190px;
|
||||
height:46px;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/partner.png) no-repeat
|
||||
}
|
||||
.screen6 .collaborate ul li .aliyun {
|
||||
background-position:-206px 0
|
||||
}
|
||||
.screen6 .collaborate ul li .amazon {
|
||||
background-position:-191px -60px
|
||||
}
|
||||
.screen6 .collaborate ul li .qingcloud {
|
||||
background-position:-191px -120px
|
||||
}
|
||||
.screen6 .collaborate ul li .segmentfault {
|
||||
background-position:-191px -170px
|
||||
}
|
||||
.screen6 .collaborate ul li .oschina {
|
||||
background-position:-191px -223px
|
||||
}
|
||||
.screen6 .collaborate ul li .coding {
|
||||
background-position:-191px -282px
|
||||
}
|
||||
.screen6 .collaborate ul li .fir_im {
|
||||
background-position:-191px -345px
|
||||
}
|
||||
.screen6 .collaborate ul li .gitcafe {
|
||||
background-position:-191px -400px
|
||||
}
|
||||
.screen6 .collaborate ul li .appcan {
|
||||
background-position:-191px -473px
|
||||
}
|
||||
.screen6 .collaborate ul li .jisuanke {
|
||||
background-position:-191px -528px
|
||||
}
|
||||
.screen6 .collaborate ul li .partner2 {
|
||||
width:190px;
|
||||
height:46px;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/partner2.png) no-repeat
|
||||
}
|
||||
.screen6 .collaborate ul li .kaiyuanshe {
|
||||
background-position:-15px 0
|
||||
}
|
||||
.screen6 .collaborate ul li .meituan {
|
||||
background-position:-25px -53px
|
||||
}
|
||||
.screen6 .collaborate ul li .easemob {
|
||||
background-position:0 -108px
|
||||
}
|
||||
.screen6 .collaborate ul li .wilddog {
|
||||
background-position:0 -162px
|
||||
}
|
||||
.screen6 .collaborate ul li .yuntongxun {
|
||||
background-position:0 -215px
|
||||
}
|
||||
.screen6 .collaborate ul li .cloudwise {
|
||||
background-position:10px -260px
|
||||
}
|
||||
.screen6 .collaborate ul li .udesk {
|
||||
background-position:-5px -319px
|
||||
}
|
||||
.screen6 .collaborate ul li .upcloud {
|
||||
background-position:-5px -365px
|
||||
}
|
||||
.screen6 .collaborate ul li .gbtags {
|
||||
background-position:-5px -470px
|
||||
}
|
||||
.screen6 .collaborate ul li .oneapm {
|
||||
background-position:-5px -415px
|
||||
}
|
||||
.screen6 .collaborate ul li .partner3 {
|
||||
width:190px;
|
||||
height:46px;
|
||||
background:url(https://zf.adoyun.cn/Core/Assets/Doc/images/partner3.png?rev=0.21) no-repeat
|
||||
}
|
||||
.screen6 .collaborate ul li .qiniu {
|
||||
background-position:0 0
|
||||
}
|
||||
.screen6 .collaborate ul li .anchnet {
|
||||
background-position:10px -60px
|
||||
}
|
||||
.screen6 .collaborate ul li .rongkecloud {
|
||||
background-position:-15px -116px
|
||||
}
|
||||
.screen6 .collaborate ul li .zhugeio {
|
||||
background-position:-15px -176px
|
||||
}
|
||||
.screen6 .collaborate ul li .yuantuan {
|
||||
background-position:-15px -242px
|
||||
}
|
||||
.screen6 .collaborate ul li .kr36 {
|
||||
background-position:-15px -360px
|
||||
}
|
||||
.screen6 .collaborate ul li .kf5 {
|
||||
background-position:-15px -300px
|
||||
}
|
||||
.screen6 .collaborate ul li .bee {
|
||||
background-position:0 -418px
|
||||
}
|
||||
.screen6 .collaborate ul li .bmob {
|
||||
background-position:10px -465px
|
||||
}
|
||||
.screen6 .collaborate ul li .unisound {
|
||||
background-position:-10px -533px
|
||||
}
|
||||
.screen6 .collaborate ul li .safedog {
|
||||
background-position:-10px -591px
|
||||
}
|
||||
.screen6 .collaborate ul li .apistore {
|
||||
background-position:-10px -650px
|
||||
}
|
||||
.screen6 .collaborate .partnerRun {
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
left:10px;
|
||||
width:24.6%;
|
||||
text-align:center
|
||||
}
|
||||
.screen6 .collaborate .partnerRun .slide {
|
||||
display:inline-block;
|
||||
width:10px;
|
||||
height:10px;
|
||||
border-radius:10px;
|
||||
border:1px solid #9C9C9C;
|
||||
margin:0 8px;
|
||||
cursor:pointer;
|
||||
transition:all .3s
|
||||
}
|
||||
.screen6 .collaborate .partnerRun .slide.active {
|
||||
background:#9C9C9C
|
||||
}
|
||||
.screen7 {
|
||||
padding:60px 0 100px
|
||||
}
|
||||
.screen7 .cloud_server {
|
||||
text-align:center;
|
||||
margin-bottom:30px;
|
||||
color:#696969
|
||||
}
|
||||
.screen7 .media-item {
|
||||
width:150px;
|
||||
height:70px
|
||||
}
|
||||
.screen7 .media-content {
|
||||
line-height:1.2em
|
||||
}
|
||||
@keyframes move_top {
|
||||
from {
|
||||
left:0;
|
||||
top:0
|
||||
}
|
||||
to {
|
||||
left:10%
|
||||
}
|
||||
}@-moz-keyframes move_top {
|
||||
from {
|
||||
left:0
|
||||
}
|
||||
to {
|
||||
left:10%
|
||||
}
|
||||
}@-webkit-keyframes move_top {
|
||||
from {
|
||||
left:0
|
||||
}
|
||||
to {
|
||||
left:10%
|
||||
}
|
||||
}@-o-keyframes move_top {
|
||||
from {
|
||||
left:0
|
||||
}
|
||||
to {
|
||||
left:10%
|
||||
}
|
||||
}
|
||||
+422
@@ -0,0 +1,422 @@
|
||||
(function ($, undefined) {
|
||||
|
||||
/**
|
||||
* Unobtrusive scripting adapter for jQuery
|
||||
* https://github.com/rails/jquery-ujs
|
||||
*
|
||||
* Requires jQuery 1.7.0 or later.
|
||||
*
|
||||
* Released under the MIT license
|
||||
*
|
||||
*/
|
||||
|
||||
// Cut down on the number of issues from people inadvertently including jquery_ujs twice
|
||||
// by detecting and raising an error when it happens.
|
||||
if ($.rails !== undefined) {
|
||||
$.error('jquery-ujs has already been loaded!');
|
||||
}
|
||||
|
||||
// Shorthand to make it a little easier to call public rails functions from within rails.js
|
||||
var rails;
|
||||
var $document = $(document);
|
||||
|
||||
$.rails = rails = {
|
||||
// Link elements bound by jquery-ujs
|
||||
linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
|
||||
|
||||
// Button elements bound by jquery-ujs
|
||||
buttonClickSelector: 'button[data-remote]',
|
||||
|
||||
// Select elements bound by jquery-ujs
|
||||
inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
|
||||
|
||||
// Form elements bound by jquery-ujs
|
||||
formSubmitSelector: 'form',
|
||||
|
||||
// Form input elements bound by jquery-ujs
|
||||
formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',
|
||||
|
||||
// Form input elements disabled during form submission
|
||||
disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
|
||||
|
||||
// Form input elements re-enabled after form submission
|
||||
enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
|
||||
|
||||
// Form required input elements
|
||||
requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
|
||||
|
||||
// Form file input elements
|
||||
fileInputSelector: 'input[type=file]',
|
||||
|
||||
// Link onClick disable selector with possible reenable after remote submission
|
||||
linkDisableSelector: 'a[data-disable-with]',
|
||||
|
||||
// Make sure that every Ajax request sends the CSRF token
|
||||
CSRFProtection: function (xhr) {
|
||||
var token = $('meta[name="csrf-token"]').attr('content');
|
||||
if (token) xhr.setRequestHeader('X-CSRF-Token', token);
|
||||
},
|
||||
|
||||
// making sure that all forms have actual up-to-date token(cached forms contain old one)
|
||||
refreshCSRFTokens: function () {
|
||||
var csrfToken = $('meta[name=csrf-token]').attr('content');
|
||||
var csrfParam = $('meta[name=csrf-param]').attr('content');
|
||||
// $('form input[name="' + csrfParam + '"]').val(csrfToken);
|
||||
var tokenInput = '<input type="hidden" name="' + csrfParam + '" value="' + csrfToken + '">';
|
||||
$('form').append(tokenInput);
|
||||
},
|
||||
|
||||
// Triggers an event on an element and returns false if the event result is false
|
||||
fire: function (obj, name, data) {
|
||||
var event = $.Event(name);
|
||||
obj.trigger(event, data);
|
||||
return event.result !== false;
|
||||
},
|
||||
|
||||
// Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
|
||||
confirm: function (message) {
|
||||
return confirm(message);
|
||||
},
|
||||
|
||||
// Default ajax function, may be overridden with custom function in $.rails.ajax
|
||||
ajax: function (options) {
|
||||
return $.ajax(options);
|
||||
},
|
||||
|
||||
// Default way to get an element's href. May be overridden at $.rails.href.
|
||||
href: function (element) {
|
||||
return element.attr('href');
|
||||
},
|
||||
|
||||
// Submits "remote" forms and links with ajax
|
||||
handleRemote: function (element) {
|
||||
var method, url, data, elCrossDomain, crossDomain, withCredentials, dataType, options;
|
||||
|
||||
if (rails.fire(element, 'ajax:before')) {
|
||||
elCrossDomain = element.data('cross-domain');
|
||||
crossDomain = elCrossDomain === undefined ? null : elCrossDomain;
|
||||
withCredentials = element.data('with-credentials') || null;
|
||||
dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType);
|
||||
|
||||
if (element.is('form')) {
|
||||
method = element.attr('method');
|
||||
url = element.attr('action');
|
||||
data = element.serializeArray();
|
||||
// memoized value from clicked submit button
|
||||
var button = element.data('ujs:submit-button');
|
||||
if (button) {
|
||||
data.push(button);
|
||||
element.data('ujs:submit-button', null);
|
||||
}
|
||||
} else if (element.is(rails.inputChangeSelector)) {
|
||||
method = element.data('method');
|
||||
url = element.data('url');
|
||||
data = element.serialize();
|
||||
if (element.data('params')) data = data + "&" + element.data('params');
|
||||
} else if (element.is(rails.buttonClickSelector)) {
|
||||
method = element.data('method') || 'get';
|
||||
url = element.data('url');
|
||||
data = element.serialize();
|
||||
if (element.data('params')) data = data + "&" + element.data('params');
|
||||
} else {
|
||||
method = element.data('method');
|
||||
url = rails.href(element);
|
||||
data = element.data('params') || null;
|
||||
}
|
||||
|
||||
options = {
|
||||
type: method || 'GET', data: data, dataType: dataType,
|
||||
// stopping the "ajax:beforeSend" event will cancel the ajax request
|
||||
beforeSend: function (xhr, settings) {
|
||||
if (settings.dataType === undefined) {
|
||||
xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
|
||||
}
|
||||
return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
|
||||
},
|
||||
success: function (data, status, xhr) {
|
||||
element.trigger('ajax:success', [data, status, xhr]);
|
||||
},
|
||||
complete: function (xhr, status) {
|
||||
element.trigger('ajax:complete', [xhr, status]);
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
element.trigger('ajax:error', [xhr, status, error]);
|
||||
},
|
||||
crossDomain: crossDomain
|
||||
};
|
||||
|
||||
// There is no withCredentials for IE6-8 when
|
||||
// "Enable native XMLHTTP support" is disabled
|
||||
if (withCredentials) {
|
||||
options.xhrFields = {
|
||||
withCredentials: withCredentials
|
||||
};
|
||||
}
|
||||
|
||||
// Only pass url to `ajax` options if not blank
|
||||
if (url) {
|
||||
options.url = url;
|
||||
}
|
||||
|
||||
var jqxhr = rails.ajax(options);
|
||||
element.trigger('ajax:send', jqxhr);
|
||||
return jqxhr;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
// Handles "data-method" on links such as:
|
||||
// <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
|
||||
handleMethod: function (link) {
|
||||
var href = rails.href(link),
|
||||
method = link.data('method'),
|
||||
target = link.attr('target'),
|
||||
csrfToken = $('meta[name=csrf-token]').attr('content'),
|
||||
csrfParam = $('meta[name=csrf-param]').attr('content'),
|
||||
form = $('<form method="post" action="' + href + '"></form>'),
|
||||
metadataInput = '<input name="_method" value="' + method + '" type="hidden" />';
|
||||
|
||||
if (csrfParam !== undefined && csrfToken !== undefined) {
|
||||
metadataInput += '<input name="' + csrfParam + '" value="' + csrfToken + '" type="hidden" />';
|
||||
}
|
||||
|
||||
if (target) {
|
||||
form.attr('target', target);
|
||||
}
|
||||
|
||||
form.hide().append(metadataInput).appendTo('body');
|
||||
form.submit();
|
||||
},
|
||||
|
||||
/* Disables form elements:
|
||||
- Caches element value in 'ujs:enable-with' data store
|
||||
- Replaces element text with value of 'data-disable-with' attribute
|
||||
- Sets disabled property to true
|
||||
*/
|
||||
disableFormElements: function (form) {
|
||||
form.find(rails.disableSelector).each(function () {
|
||||
var element = $(this), method = element.is('button') ? 'html' : 'val';
|
||||
element.data('ujs:enable-with', element[method]());
|
||||
element[method](element.data('disable-with'));
|
||||
element.prop('disabled', true);
|
||||
});
|
||||
},
|
||||
|
||||
/* Re-enables disabled form elements:
|
||||
- Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
|
||||
- Sets disabled property to false
|
||||
*/
|
||||
enableFormElements: function (form) {
|
||||
form.find(rails.enableSelector).each(function () {
|
||||
var element = $(this), method = element.is('button') ? 'html' : 'val';
|
||||
if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
|
||||
element.prop('disabled', false);
|
||||
});
|
||||
},
|
||||
|
||||
/* For 'data-confirm' attribute:
|
||||
- Fires `confirm` event
|
||||
- Shows the confirmation dialog
|
||||
- Fires the `confirm:complete` event
|
||||
|
||||
Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
|
||||
Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
|
||||
Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
|
||||
return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
|
||||
*/
|
||||
allowAction: function (element) {
|
||||
var message = element.data('confirm'),
|
||||
answer = false, callback;
|
||||
if (!message) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (rails.fire(element, 'confirm')) {
|
||||
answer = rails.confirm(message);
|
||||
callback = rails.fire(element, 'confirm:complete', [answer]);
|
||||
}
|
||||
return answer && callback;
|
||||
},
|
||||
|
||||
// Helper function which checks for blank inputs in a form that match the specified CSS selector
|
||||
blankInputs: function (form, specifiedSelector, nonBlank) {
|
||||
var inputs = $(), input, valueToCheck,
|
||||
selector = specifiedSelector || 'input,textarea',
|
||||
allInputs = form.find(selector);
|
||||
|
||||
allInputs.each(function () {
|
||||
input = $(this);
|
||||
valueToCheck = input.is('input[type=checkbox],input[type=radio]') ? input.is(':checked') : input.val();
|
||||
// If nonBlank and valueToCheck are both truthy, or nonBlank and valueToCheck are both falsey
|
||||
if (!valueToCheck === !nonBlank) {
|
||||
|
||||
// Don't count unchecked required radio if other radio with same name is checked
|
||||
if (input.is('input[type=radio]') && allInputs.filter('input[type=radio]:checked[name="' + input.attr('name') + '"]').length) {
|
||||
return true; // Skip to next input
|
||||
}
|
||||
|
||||
inputs = inputs.add(input);
|
||||
}
|
||||
});
|
||||
return inputs.length ? inputs : false;
|
||||
},
|
||||
|
||||
// Helper function which checks for non-blank inputs in a form that match the specified CSS selector
|
||||
nonBlankInputs: function (form, specifiedSelector) {
|
||||
return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
|
||||
},
|
||||
|
||||
// Helper function, needed to provide consistent behavior in IE
|
||||
stopEverything: function (e) {
|
||||
$(e.target).trigger('ujs:everythingStopped');
|
||||
e.stopImmediatePropagation();
|
||||
return false;
|
||||
},
|
||||
|
||||
// replace element's html with the 'data-disable-with' after storing original html
|
||||
// and prevent clicking on it
|
||||
disableElement: function (element) {
|
||||
element.data('ujs:enable-with', element.html()); // store enabled state
|
||||
element.html(element.data('disable-with')); // set to disabled state
|
||||
element.bind('click.railsDisable', function (e) { // prevent further clicking
|
||||
return rails.stopEverything(e);
|
||||
});
|
||||
},
|
||||
|
||||
// restore element to its original state which was disabled by 'disableElement' above
|
||||
enableElement: function (element) {
|
||||
if (element.data('ujs:enable-with') !== undefined) {
|
||||
element.html(element.data('ujs:enable-with')); // set to old enabled state
|
||||
element.removeData('ujs:enable-with'); // clean up cache
|
||||
}
|
||||
element.unbind('click.railsDisable'); // enable element
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
if (rails.fire($document, 'rails:attachBindings')) {
|
||||
|
||||
$.ajaxPrefilter(function (options, originalOptions, xhr) {
|
||||
if (!options.crossDomain) {
|
||||
rails.CSRFProtection(xhr);
|
||||
}
|
||||
});
|
||||
|
||||
$document.delegate(rails.linkDisableSelector, 'ajax:complete', function () {
|
||||
rails.enableElement($(this));
|
||||
});
|
||||
|
||||
$document.delegate(rails.linkClickSelector, 'click.rails', function (e) {
|
||||
var link = $(this), method = link.data('method'), data = link.data('params'), metaClick = e.metaKey || e.ctrlKey;
|
||||
if (!rails.allowAction(link)) return rails.stopEverything(e);
|
||||
|
||||
if (!metaClick && link.is(rails.linkDisableSelector)) rails.disableElement(link);
|
||||
|
||||
if (link.data('remote') !== undefined) {
|
||||
if (metaClick && (!method || method === 'GET') && !data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var handleRemote = rails.handleRemote(link);
|
||||
// response from rails.handleRemote() will either be false or a deferred object promise.
|
||||
if (handleRemote === false) {
|
||||
rails.enableElement(link);
|
||||
} else {
|
||||
handleRemote.error(function () {
|
||||
rails.enableElement(link);
|
||||
});
|
||||
}
|
||||
return false;
|
||||
|
||||
} else if (link.data('method')) {
|
||||
rails.handleMethod(link);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$document.delegate(rails.buttonClickSelector, 'click.rails', function (e) {
|
||||
var button = $(this);
|
||||
if (!rails.allowAction(button)) return rails.stopEverything(e);
|
||||
|
||||
rails.handleRemote(button);
|
||||
return false;
|
||||
});
|
||||
|
||||
$document.delegate(rails.inputChangeSelector, 'change.rails', function (e) {
|
||||
var link = $(this);
|
||||
if (!rails.allowAction(link)) return rails.stopEverything(e);
|
||||
|
||||
rails.handleRemote(link);
|
||||
return false;
|
||||
});
|
||||
|
||||
$document.delegate(rails.formSubmitSelector, 'submit.rails', function (e) {
|
||||
var form = $(this),
|
||||
remote = form.data('remote') !== undefined,
|
||||
blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
|
||||
nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
|
||||
|
||||
if (!rails.allowAction(form)) return rails.stopEverything(e);
|
||||
|
||||
// skip other logic when required values are missing or file upload is present
|
||||
if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
|
||||
return rails.stopEverything(e);
|
||||
}
|
||||
|
||||
if (remote) {
|
||||
if (nonBlankFileInputs) {
|
||||
// slight timeout so that the submit button gets properly serialized
|
||||
// (make it easy for event handler to serialize form without disabled values)
|
||||
setTimeout(function () {
|
||||
rails.disableFormElements(form);
|
||||
}, 13);
|
||||
var aborted = rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
|
||||
|
||||
// re-enable form elements if event bindings return false (canceling normal form submission)
|
||||
if (!aborted) {
|
||||
setTimeout(function () {
|
||||
rails.enableFormElements(form);
|
||||
}, 13);
|
||||
}
|
||||
|
||||
return aborted;
|
||||
}
|
||||
|
||||
rails.handleRemote(form);
|
||||
return false;
|
||||
|
||||
} else {
|
||||
// slight timeout so that the submit button gets properly serialized
|
||||
setTimeout(function () {
|
||||
rails.disableFormElements(form);
|
||||
}, 13);
|
||||
}
|
||||
});
|
||||
|
||||
$document.delegate(rails.formInputClickSelector, 'click.rails', function (event) {
|
||||
var button = $(this);
|
||||
|
||||
if (!rails.allowAction(button)) return rails.stopEverything(event);
|
||||
|
||||
// register the pressed submit button
|
||||
var name = button.attr('name'),
|
||||
data = name ? {name: name, value: button.val()} : null;
|
||||
|
||||
button.closest('form').data('ujs:submit-button', data);
|
||||
});
|
||||
|
||||
$document.delegate(rails.formSubmitSelector, 'ajax:beforeSend.rails', function (event) {
|
||||
if (this == event.target) rails.disableFormElements($(this));
|
||||
});
|
||||
|
||||
$document.delegate(rails.formSubmitSelector, 'ajax:complete.rails', function (event) {
|
||||
if (this == event.target) rails.enableFormElements($(this));
|
||||
});
|
||||
|
||||
$(function () {
|
||||
rails.refreshCSRFTokens();
|
||||
});
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
@@ -0,0 +1,5 @@
|
||||
/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
|
||||
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),Line truncated
|
||||
},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=L.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,R=["Top","Right","Bottom","Left"],S=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)},T=/^(?:checkbox|radio)$/i;!function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join(".Line truncated
|
||||
},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||Line truncated
|
||||
//# sourceMappingURL=jquery.min.map
|
||||
Reference in new issue
Block a user