Merge branch 'master' into ldap
This commit is contained in:
commit
a2e35f3626
|
@ -1,28 +1,28 @@
|
||||||
var history_edited = false;
|
var history_edited = false;
|
||||||
|
|
||||||
$('#back_sidebar a, #back_main a.nav').live('click',
|
// $('#back_sidebar a, #back_main a.nav').live('click',
|
||||||
function () {
|
// function () {
|
||||||
$.getScript(this.href);
|
// $.getScript(this.href);
|
||||||
history.pushState(null, document.title, this.href);
|
// history.pushState(null, document.title, this.href);
|
||||||
history_edited = true;
|
// history_edited = true;
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
|
|
||||||
$('#back_main a.reload').live('click',
|
// $('#back_main a.reload').live('click',
|
||||||
function () {
|
// function () {
|
||||||
$.getScript(this.href);
|
// $.getScript(this.href);
|
||||||
history.replaceState(null, document.title, this.href);
|
// history.replaceState(null, document.title, this.href);
|
||||||
history_edited = true;
|
// history_edited = true;
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
);
|
// );
|
||||||
|
|
||||||
$('.form').live('submit', function () {
|
// $('.form').live('submit', function () {
|
||||||
$.post(this.action, $(this).serialize(), null, 'script');
|
// $.post(this.action, $(this).serialize(), null, 'script');
|
||||||
history_edited = true;
|
// history_edited = true;
|
||||||
return false;
|
// return false;
|
||||||
});
|
// });
|
||||||
|
|
||||||
$(document).on('click', '.js_history',
|
$(document).on('click', '.js_history',
|
||||||
function () {
|
function () {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<li class="span3" id = 'asd'>
|
<li class="span3" id = 'asd'>
|
||||||
<%= image_tag ad_image.file %>
|
<%= image_tag ad_image.file rescue nil %>
|
||||||
<p>
|
<p>
|
||||||
<%= ad_image.display? ? '[Showing]' : '[NotShawing]' %>
|
<%= ad_image.display? ? '[Showing]' : '[NotShawing]' %>
|
||||||
<%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %>
|
<%= "#{ad_image.post_date ||'NeedReset' }~#{ad_image.unpost_date || 'NeedReset'}" %>
|
||||||
|
|
|
@ -32,13 +32,15 @@
|
||||||
today = today.format('isoDate');
|
today = today.format('isoDate');
|
||||||
var state = false;
|
var state = false;
|
||||||
var arr = state ? "▼" : "▲"
|
var arr = state ? "▼" : "▲"
|
||||||
|
var start_date = <%= @ad_image.post_date.nil?? 'today' : "'#{@ad_image.post_date.strftime('%Y / %m / %d')}'" %>;
|
||||||
|
var end_date = <%= @ad_image.unpost_date.nil?? 'today' : "'#{@ad_image.unpost_date.strftime('%Y / %m / %d')}'" %>;
|
||||||
//calendarRange
|
//calendarRange
|
||||||
$('#calendarRange .showDate').html(today+" - "+today)
|
$('#calendarRange .showDate').html(start_date+" - "+end_date);
|
||||||
$('#calendarRange .calendarInput').val(today+" - "+today);
|
$('#calendarRange .calendarInput').val(start_date+" - "+end_date);
|
||||||
$('#calendarRange #widgetCalendar').DatePicker({
|
$('#calendarRange #widgetCalendar').DatePicker({
|
||||||
flat: true,
|
flat: true,
|
||||||
format: 'Y / m / d',
|
format: 'Y / m / d',
|
||||||
date: today,
|
date: [start_date,end_date],
|
||||||
calendars: 1,
|
calendars: 1,
|
||||||
mode: 'range',
|
mode: 'range',
|
||||||
starts: 1,
|
starts: 1,
|
||||||
|
|
Loading…
Reference in New Issue