change html structure of item form

This commit is contained in:
Sanj 2011-07-04 09:56:57 +05:30
parent 49b03b60ed
commit 96f4612c26

View File

@ -153,14 +153,14 @@ function getJQ(f) {
function getItemForm(f) { function getItemForm(f) {
var $form = $('<div />').addClass("itemForm"); var $form = $('<div />').addClass("itemForm");
var $titleP = $('<p />').appendTo($form); var $labelsP = $('<p />').appendTo($form);
var $titleLabel = $('<span />').addClass("itemFormLabel").text("Title: ").appendTo($titleP); var $titleLabel = $('<span />').addClass("itemFormLabel").text("Title: ").appendTo($labelsP);
var $titleInput = $('<input />').addClass("itemTitle").val(f.title).appendTo($titleP); var $descriptionLabel = $('<span />').addClass("itemFormLabel").text("Description: ").appendTo($labelsP);
var $descriptionP = $('<p />').appendTo($form); var $inputsP = $('<p />').appendTo($form);
var $descriptionLabel = $('<span />').addClass("itemFormLabel").text("Description: ").appendTo($descriptionP); var $titleInput = $('<input />').addClass("itemTitle").val(f.title).appendTo($inputsP);
var $descriptionInput = $('<textarea />').addClass("itemDescription").val(f.description).appendTo($descriptionP); var $descriptionInput = $('<textarea />').addClass("itemDescription").val(f.description).appendTo($inputsP);
var $hiddenInput = $('<input />').addClass("itemId").attr("type", "hidden").val(f.id).appendTo($descriptionP); var $hiddenInput = $('<input />').addClass("itemId").attr("type", "hidden").val(f.id).appendTo($inputsP);
var $submitP = $('<p />').appendTo($form); var $submitP = $('<p />').addClass("submitInput").appendTo($form);
var $submit = $('<input />').addClass("submitItem").attr("type", "submit").val("Submit").appendTo($submitP); var $submit = $('<input />').addClass("submitItem").attr("type", "submit").val("Submit").appendTo($submitP);
var $submitStatus = $('<span />').addClass("submitStatus").appendTo($submitP); var $submitStatus = $('<span />').addClass("submitStatus").appendTo($submitP);
$submit.click(function(e) { $submit.click(function(e) {