Skip to main content
Code Review

Return to Question

Notice removed Draw attention by Community Bot
Bounty Ended with Peter Csala's answer chosen by Community Bot
deleted 2064 characters in body
Source Link
Jefferson
  • 413
  • 5
  • 14

Addition

MeetingPollingQuestion = {};
MeetingPollingQuestion.MeetingPollingId = $("#hfMeetingPollingId").val();
MeetingPollingQuestion.MeetingPollingQuestionType = "MultipleChoice";
MeetingPollingQuestion.SequenceOrder = sequenceorder;
MeetingPollingQuestion.MeetingPollingParts = [];
MeetingPollingParts = {};
MeetingPollingParts.Type = "Question";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "Question";
MeetingPollingPartsValues.QuestionValue = $("#editor").data("kendoEditor").value();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Image";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "FileManagerId";
MeetingPollingPartsValues.FileManagerId = $("#hfFileManagerId").val();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Answers";
MeetingPollingParts.MeetingPollingPartsValues = [];
var items = $("#selectanswer").data("kendoMultiSelect");
var selectedDataItems = items.dataItems();
$(selectedDataItems).each(function () {
 MeetingPollingPartsValues = {};
 MeetingPollingPartsValues.Type = "Answers";
 MeetingPollingPartsValues.QuestionValue = this.text;
 MeetingPollingPartsValues.FileManagerId = this.value;
 MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
});
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);

Addition

MeetingPollingQuestion = {};
MeetingPollingQuestion.MeetingPollingId = $("#hfMeetingPollingId").val();
MeetingPollingQuestion.MeetingPollingQuestionType = "MultipleChoice";
MeetingPollingQuestion.SequenceOrder = sequenceorder;
MeetingPollingQuestion.MeetingPollingParts = [];
MeetingPollingParts = {};
MeetingPollingParts.Type = "Question";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "Question";
MeetingPollingPartsValues.QuestionValue = $("#editor").data("kendoEditor").value();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Image";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "FileManagerId";
MeetingPollingPartsValues.FileManagerId = $("#hfFileManagerId").val();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Answers";
MeetingPollingParts.MeetingPollingPartsValues = [];
var items = $("#selectanswer").data("kendoMultiSelect");
var selectedDataItems = items.dataItems();
$(selectedDataItems).each(function () {
 MeetingPollingPartsValues = {};
 MeetingPollingPartsValues.Type = "Answers";
 MeetingPollingPartsValues.QuestionValue = this.text;
 MeetingPollingPartsValues.FileManagerId = this.value;
 MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
});
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
added 2066 characters in body
Source Link
Jefferson
  • 413
  • 5
  • 14

Addition

MeetingPollingQuestion = {};
MeetingPollingQuestion.MeetingPollingId = $("#hfMeetingPollingId").val();
MeetingPollingQuestion.MeetingPollingQuestionType = "MultipleChoice";
MeetingPollingQuestion.SequenceOrder = sequenceorder;
MeetingPollingQuestion.MeetingPollingParts = [];
MeetingPollingParts = {};
MeetingPollingParts.Type = "Question";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "Question";
MeetingPollingPartsValues.QuestionValue = $("#editor").data("kendoEditor").value();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Image";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "FileManagerId";
MeetingPollingPartsValues.FileManagerId = $("#hfFileManagerId").val();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Answers";
MeetingPollingParts.MeetingPollingPartsValues = [];
var items = $("#selectanswer").data("kendoMultiSelect");
var selectedDataItems = items.dataItems();
$(selectedDataItems).each(function () {
 MeetingPollingPartsValues = {};
 MeetingPollingPartsValues.Type = "Answers";
 MeetingPollingPartsValues.QuestionValue = this.text;
 MeetingPollingPartsValues.FileManagerId = this.value;
 MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
});
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);

Addition

MeetingPollingQuestion = {};
MeetingPollingQuestion.MeetingPollingId = $("#hfMeetingPollingId").val();
MeetingPollingQuestion.MeetingPollingQuestionType = "MultipleChoice";
MeetingPollingQuestion.SequenceOrder = sequenceorder;
MeetingPollingQuestion.MeetingPollingParts = [];
MeetingPollingParts = {};
MeetingPollingParts.Type = "Question";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "Question";
MeetingPollingPartsValues.QuestionValue = $("#editor").data("kendoEditor").value();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Image";
MeetingPollingParts.MeetingPollingPartsValues = [];
MeetingPollingPartsValues = {};
MeetingPollingPartsValues.Type = "FileManagerId";
MeetingPollingPartsValues.FileManagerId = $("#hfFileManagerId").val();
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
MeetingPollingParts = {};
MeetingPollingParts.Type = "Answers";
MeetingPollingParts.MeetingPollingPartsValues = [];
var items = $("#selectanswer").data("kendoMultiSelect");
var selectedDataItems = items.dataItems();
$(selectedDataItems).each(function () {
 MeetingPollingPartsValues = {};
 MeetingPollingPartsValues.Type = "Answers";
 MeetingPollingPartsValues.QuestionValue = this.text;
 MeetingPollingPartsValues.FileManagerId = this.value;
 MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
});
MeetingPollingParts.MeetingPollingPartsValues.push(MeetingPollingPartsValues);
MeetingPollingQuestion.MeetingPollingParts.push(MeetingPollingParts);
Tweeted twitter.com/StackCodeReview/status/1577946786777505793
added 151 characters in body
Source Link
Jefferson
  • 413
  • 5
  • 14

I wanted to see if there is any more way to write this method. Its a lot of code and just wanted to make sure there is no better way to do this?

I wanted to see if there is any more way to write this method. Its a lot of code and just wanted to make sure there is no better way to do this?

Notice added Draw attention by Jefferson
Bounty Started worth 50 reputation by Jefferson
edited tags
Link
Jefferson
  • 413
  • 5
  • 14
Loading
Source Link
Jefferson
  • 413
  • 5
  • 14
Loading
lang-cs

AltStyle によって変換されたページ (->オリジナル) /