Permalink
Browse files

update

  • Loading branch information...
1 parent af15f8f commit 0942ef2fc0712246b662caf71a9e56d390fd7d49 @neekey committed May 22, 2012
@@ -0,0 +1,13 @@
+.wish-list {
+ border-radius: 10px;
+ margin-top: 20px;
+ padding: 20px;
+ text-align: center;
+ background: white;
+}
+.wish-list li {
+
+ display: inline-block;
+ margin: 10px 10px 0 0;
+ cursor: pointer;
+}
@@ -48,7 +48,7 @@
$.each( wishes, function ( index, wish ){
- that.wishList.append( '<li class="label label-info">' + wish.topic + '</li>')
+ that.wishList.append( '<li rel="tooltip" data-original-title="' + ( wish.description ? wish.description : '没有描述哦' ) + '" class="label label-info">' + wish.topic + '</li>')
});
}
});
@@ -77,6 +77,9 @@
});
}
});
+
+ // 添加tooltip
+ this.wishList.tooltip({ selector: 'li' });
}
};
@@ -107,18 +110,21 @@
if( ifOpen ){
- that.description.hide( 500 );
+ that.description.fadeOut( 200 );
}
else {
- that.description.show( 500 );
+ that.description.fadeIn( 200 );
}
});
this.submitBtn.bind( 'click', function (){
$( that).trigger( 'wishAdd', [ that.getValue() ] );
});
+
+ // 添加tooltip
+ this.descTrigger.tooltip();
},
getValue: function (){
@@ -6,13 +6,15 @@ html
meta(name='viewport',content='width=device-width, initial-scale = 1.0, user-scalable = no')
link(rel='stylesheet',href='/css/bootstrap.min.css')
link(rel='stylesheet',href='/css/bootstrap-responsive.min.css')
+ link(rel='stylesheet',href='/css/share-wish/share-wish.css')
- if(developmod )
link(rel='stylesheet/less', href='/css/share.less')
script(src='/lib/less/1.2.1/less.min.js')
- else
link(rel='stylesheet', href='/css/share.css?t=#{timestamp}')
script(src='/js/modules/seajs/1.1.1/sea.js')
script(src='/lib/jquery/jquery-1.7.1.min.js')
+ script(src='/js/modules/bootstrap/bootstrap-tooltip.js')
body
include topbar
@@ -7,14 +7,14 @@ div.container
div.input-append.span10
div.row
input.topic-ipt.J_topic-ipt.span10( type="text", placeholder="输入你的话题")
- button.btn.J_desc-trigger
+ button.btn.J_desc-trigger(rel="tooltip", data-original-title="填写关于心愿的描述")
i.icon-chevron-down.icon-black
div.row
- textarea.span10.J_description-textarea
+ textarea.span10.J_description-textarea(placeholder="你的心愿描述")
input.span2.btn.btn-primary.submit-wish-btn.J_submit-wish( type="submit", value="添加" )
div.row
div.span10.offset1
- ul.row.J_wish-list.unstyled.row-fluid
+ ul.row.wish-list.J_wish-list.unstyled.row-fluid

0 comments on commit 0942ef2

Please sign in to comment.