mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
News datestamp now retains value when editing. Updated datetime picker.
This commit is contained in:
parent
312dad5b3b
commit
50b922f588
@ -1974,6 +1974,14 @@ class admin_newspost
|
||||
else
|
||||
{
|
||||
// $text .= $frm->selectbox("cat_id",$this->news_category,$_POST['cat_id']);
|
||||
$catopt = array();
|
||||
foreach ($this->news_categories as $row)
|
||||
{
|
||||
$catopt[$row['category_id']] = $tp->toHTML($row['category_name'], FALSE, "LINKTEXT");
|
||||
}
|
||||
|
||||
$text .= $frm->selectbox("cat_id", $catopt, $_POST['cat_id']);
|
||||
/*
|
||||
$text .= $frm->select_open('cat_id');
|
||||
|
||||
foreach ($this->news_categories as $row)
|
||||
@ -1981,6 +1989,8 @@ class admin_newspost
|
||||
$text .= $frm->option($tp->toHTML($row['category_name'], FALSE, "LINKTEXT"), $row['category_id'], varset($_POST['cat_id']) == $row['category_id']);
|
||||
}
|
||||
$text .= "</select>";
|
||||
*/
|
||||
|
||||
}
|
||||
$text .= "
|
||||
</td>
|
||||
@ -2012,7 +2022,7 @@ class admin_newspost
|
||||
";
|
||||
|
||||
//XXX multiple-selections at once. (comma separated) - working
|
||||
$text .= $frm->selectbox('news_render_type', $this->news_renderTypes, vartrue($_POST['news_render_type']), "multiple=1",array(NWSLAN_74))."
|
||||
$text .= $frm->selectbox('news_render_type', $this->news_renderTypes, vartrue($_POST['news_render_type']), "multiple=1")."
|
||||
<div class='field-help'>
|
||||
".NWSLAN_74."
|
||||
</div>
|
||||
@ -2255,7 +2265,7 @@ class admin_newspost
|
||||
<div class='field-spacer'>
|
||||
";
|
||||
|
||||
$text .= $frm->datepicker("news_datestamp",vartrue($_POST['news_datestamp']),"type=datetime");
|
||||
$text .= $frm->datepicker("news_datestamp",vartrue($_POST['news_datestamp']),"type=date"); //XXX should be 'datetime' when working correctly.
|
||||
|
||||
$text .= "</div>";
|
||||
/*
|
||||
|
@ -110,7 +110,7 @@ class convert
|
||||
function toMask($mask, $legacy = false)
|
||||
{
|
||||
$convert = array(
|
||||
'%Y' => 'yy',
|
||||
'%Y' => 'yyyy', // jquery-ui docs say 'yy' but yy produces '13' instead of '2013'
|
||||
'%d' => 'dd',
|
||||
'%m' => 'mm',
|
||||
'%B' => 'MM', // Full month name, based on the locale
|
||||
|
@ -157,7 +157,17 @@ $(document).ready(function()
|
||||
|
||||
|
||||
// Dates --------------------------------------------------
|
||||
|
||||
/*
|
||||
// http://tarruda.github.com/bootstrap-datetimepicker/
|
||||
// $('.e-datetime').datetimepicker();
|
||||
|
||||
$('.e-datetime').datetimepicker({
|
||||
language: 'en',
|
||||
pick12HourFormat: true
|
||||
});
|
||||
|
||||
*/
|
||||
|
||||
$("input.e-date").each(function() {
|
||||
$(this).datepicker({
|
||||
dateFormat: $(this).attr("data-date-format"),
|
||||
@ -168,15 +178,23 @@ $(document).ready(function()
|
||||
});
|
||||
|
||||
$("input.e-datetime").each(function() {
|
||||
// var name = $(this).attr("name");
|
||||
// var val = $(this).val();
|
||||
|
||||
// alert(name + ': ' + val);
|
||||
|
||||
$(this).datetimepicker({
|
||||
dateFormat: $(this).attr("data-date-format"),
|
||||
timeFormat: $(this).attr("data-time-format"),
|
||||
defaultDate: $(this).val(),
|
||||
defaultValue: $(this).val(),
|
||||
setDate: $(this).val(),
|
||||
ampm: $(this).attr("data-date-ampm"),
|
||||
firstDay: $(this).attr("data-date-firstday"),
|
||||
// firstDay: $(this).attr("data-date-firstday"),
|
||||
showButtonPanel: true
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Inline versions
|
||||
$("div.e-date").each(function() {
|
||||
var id = $(this).attr("id");
|
||||
@ -207,7 +225,7 @@ $(document).ready(function()
|
||||
$(this).datetimepicker('setDate', $("#"+newid).val());
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Tabs -----------------------------------------------------
|
||||
|
||||
|
3449
e107_web/js/jquery-ui-timepicker-addon.js
vendored
3449
e107_web/js/jquery-ui-timepicker-addon.js
vendored
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user