30 lines
1.5 KiB
Plaintext
30 lines
1.5 KiB
Plaintext
<%= form_for @poll,:remote => true do |f|%>
|
|
<div class="testContainer"> <!--编辑头部start-->
|
|
<div>
|
|
<input type="text" maxlength="100" name="polls_name" id="polls_title" value="<%= @poll.polls_name %>" class="testTitle mb10" placeholder="新建问卷,请先输入问卷标题"/>
|
|
</div>
|
|
<textarea name="polls_description" id="polls_description" class="testDes" placeholder="请在此输入问卷描述"><%= @poll.polls_description.html_safe if !@poll.polls_description.blank? %></textarea>
|
|
<a data-button="cancel" onclick="pollsCancel();" class="grey_btn fr borderRadius">取消</a>
|
|
<a data-button="ok" onclick="pollsSubmit($(this));" class="blue_btn fr borderRadius mr5">保存</a>
|
|
<div class="cl"></div>
|
|
</div><!--编辑头部 end-->
|
|
<% end%>
|
|
<script type="text/javascript">
|
|
// $(function(){
|
|
// if($('#polls_description_div').html().trim() == '') {
|
|
// $('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
|
|
// }
|
|
// });
|
|
|
|
// $('#polls_description_div').focus(function(){
|
|
// //alert($('#polls_description_div').html().trim());
|
|
// if(/^\s*<\w*\s*\w*\=\"\w*\:\s*\#\d*\"\>[\u4e00-\u9fa5]*<\/\w*\>\s*$/.test($('#polls_description_div').html().trim())) {
|
|
// $('#polls_description_div').html('');
|
|
// }
|
|
// }).blur(function(){
|
|
// if($('#polls_description_div').html().trim() == '') {
|
|
// $('#polls_description_div').html("<p style='color:#999999'>问卷描述</p>");
|
|
// }
|
|
// });
|
|
</script>
|