Commit 5dd90aa9 by Tom Giannattasio

working on date picker; conflicts with ids

parent 3d9961f8
......@@ -4,9 +4,7 @@
<div class="row">
<label class="inline-label">Date:</label>
<!-- TODO replace w/ date widget and actual date (problem is that persisted version is "Month day" not an actual date obj -->
<div class="datepair">
<input type="text" class="date" id="date-entry" value="<%= updateModel.get('date') %>"></input>
</div>
<input type="text" class="date" id="date-entry" value="<%= updateModel.get('date') %>">
</div>
<div class="row">
<textarea class="new-update-content text-editor"><%= updateModel.get('content') %></textarea>
......
......@@ -5,7 +5,7 @@
if (typeof window.templateLoader == 'function') return;
var templateLoader = {
templateVersion: "0.0.4",
templateVersion: "0.0.3",
templates: {},
loadRemoteTemplate: function(templateName, filename, callback) {
if (!this.templates[templateName]) {
......
......@@ -53,6 +53,7 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
$(updateEle).append(newEle);
});
this.$el.find(".new-update-form").hide();
this.$el.find('.date').datepicker({ 'dateFormat': 'MM d' });
return this;
},
......@@ -64,7 +65,14 @@ CMS.Views.ClassInfoUpdateView = Backbone.View.extend({
var newForm = this.template({ updateModel : newModel });
var updateEle = this.$el.find("#course-update-list");
$(updateEle).prepend(newForm);
$(newForm).find(".new-update-form").show();
// TODO: remove the id on the datepicker field
// this is causing conflicts with the datepicker widget
$('.date').datepicker('destroy');
$('.date').datepicker({ 'dateFormat': 'MM d' });
},
onSave: function(event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment