dev_SaaS
cxt 6 years ago
parent c579ede792
commit d23e266f58

@ -3120,12 +3120,12 @@ end
def update_notice
@menu_type = 12
@sub_type = 8
@notice = SystemUpdateNotice.first
@notice = SystemUpdateNotice.last
end
def edit_update_notice
notice = SystemUpdateNotice.first
if notice.present?
notice = SystemUpdateNotice.last
if notice.present? && notice.end_time > Time.now
notice.update_attributes(:end_time => params[:end_time], :start_time => params[:start_time], :subject => params[:subject], :notes => params[:notes])
else
notice_type = UserSystemNotice.find_by_sql("select max(notice_type) as max_notice_type from user_system_notices").first.try(:max_notice_type).to_i + 1

@ -122,8 +122,8 @@
var htmlvalue = "<%= escape_javascript(render :partial => 'account/user_update_notice', :locals => {:notice => notice})%>";
pop_box_new(htmlvalue, 500, 380);
<% UserSystemNotice.create(:user_id => User.current.id, :notice_type => notice.notice_type) %>
<% elsif notice.present? && notice.end_time < Time.now %>
<% notice.destroy %>
<%# elsif notice.present? && notice.end_time < Time.now %>
<%# notice.destroy %>
<% end %>
});

@ -38,7 +38,8 @@
format:'Y-m-d H:i',
formatTime:'H:i',
formatDate:'Y-m-d',
validateOnBlur:false
validateOnBlur:false,
step:30
});
$('#notice_end_time').datetimepicker({
allowBlank:true,
@ -46,7 +47,8 @@
format:'Y-m-d H:i',
formatTime:'H:i',
formatDate:'Y-m-d',
validateOnBlur:false
validateOnBlur:false,
step:30
});
});

Loading…
Cancel
Save