parent
10ae17b246
commit
c2fe6c4d08
31
.idea/workspace.xml
generated
31
.idea/workspace.xml
generated
@ -20,8 +20,9 @@
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="fc13552d-b118-4828-b78f-fc8714e0cfdc" name="Default Changelist" comment="Final COMMIT!!!">
|
||||
<change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/model/FaqModel.class.inc.php" beforeDir="false" afterPath="$PROJECT_DIR$/model/FaqModel.class.inc.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/templates/faq.tmpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/templates/faq.tmpl.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/vendor/js/faq.js" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/js/faq.js" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@ -33,7 +34,7 @@
|
||||
<execution />
|
||||
</component>
|
||||
<component name="DarkyenusTimeTracker">
|
||||
<option name="totalTimeSeconds" value="84311" />
|
||||
<option name="totalTimeSeconds" value="85844" />
|
||||
<option name="gitIntegration" value="true" />
|
||||
<option name="naggedAbout" value="1" />
|
||||
</component>
|
||||
@ -79,7 +80,7 @@
|
||||
<updated>1601618466935</updated>
|
||||
<workItem from="1601618467981" duration="36776000" />
|
||||
<workItem from="1601809534320" duration="1558000" />
|
||||
<workItem from="1601811106543" duration="13977000" />
|
||||
<workItem from="1601811106543" duration="15934000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="Initial commit">
|
||||
<created>1601618764031</created>
|
||||
@ -242,7 +243,14 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1601836166244</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="24" />
|
||||
<task id="LOCAL-00024" summary="Updating a little time-issue and install gitignore">
|
||||
<created>1601836234258</created>
|
||||
<option name="number" value="00024" />
|
||||
<option name="presentableId" value="LOCAL-00024" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1601836234258</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="25" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
@ -281,7 +289,8 @@
|
||||
<MESSAGE value="Fixing answer text bug #6" />
|
||||
<MESSAGE value="Updating FAQ-Gui" />
|
||||
<MESSAGE value="Fix issue #9" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Fix issue #9" />
|
||||
<MESSAGE value="Updating a little time-issue and install gitignore" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Updating a little time-issue and install gitignore" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="728" y="326" width="800" height="683" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1601632929047">
|
||||
@ -328,13 +337,17 @@
|
||||
<screen x="0" y="34" width="1920" height="1046" />
|
||||
</state>
|
||||
<state x="809" y="122" width="639" height="876" key="com.intellij.database.view.ui.AbstractDbRefactoringDialog/0.34.1920.1046@0.34.1920.1046" timestamp="1601632983240" />
|
||||
<state x="739" y="469" width="432" height="182" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1601624836751">
|
||||
<state x="739" y="469" width="442" height="182" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1601837188867">
|
||||
<screen x="0" y="34" width="1920" height="1046" />
|
||||
</state>
|
||||
<state x="739" y="469" width="432" height="182" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.34.1920.1046@0.34.1920.1046" timestamp="1601624836751" />
|
||||
<state x="623" y="264" width="672" height="678" key="search.everywhere.popup" timestamp="1601644839580">
|
||||
<state x="739" y="469" width="442" height="182" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.34.1920.1046@0.34.1920.1046" timestamp="1601837188867" />
|
||||
<state x="641" y="122" width="638" height="870" key="find.popup" timestamp="1601836650536">
|
||||
<screen x="0" y="34" width="1920" height="1046" />
|
||||
</state>
|
||||
<state x="623" y="264" width="672" height="678" key="search.everywhere.popup/0.34.1920.1046@0.34.1920.1046" timestamp="1601644839580" />
|
||||
<state x="641" y="122" width="638" height="870" key="find.popup/0.34.1920.1046@0.34.1920.1046" timestamp="1601836650536" />
|
||||
<state x="623" y="264" width="672" height="678" key="search.everywhere.popup" timestamp="1601836633752">
|
||||
<screen x="0" y="34" width="1920" height="1046" />
|
||||
</state>
|
||||
<state x="623" y="264" width="672" height="678" key="search.everywhere.popup/0.34.1920.1046@0.34.1920.1046" timestamp="1601836633752" />
|
||||
</component>
|
||||
</project>
|
@ -83,14 +83,14 @@ class FaqModel
|
||||
public function addQuestion(int $room_id, string $question, string $nickname )
|
||||
{
|
||||
$stmnt = Database::getConnection()->prepare( 'INSERT INTO questions ( room_id, question, created_by ) VALUES ( :room_id, :question, :created_by )' );
|
||||
$stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars( $question ), 'created_by' => $nickname ) );
|
||||
$stmnt->execute( array( 'room_id' => $room_id, 'question' => htmlspecialchars($question, ENT_QUOTES, 'UTF-8'), 'created_by' => $nickname ) );
|
||||
|
||||
}
|
||||
|
||||
public function addAnswer(int $question_id, string $answer)
|
||||
{
|
||||
$stmnt = Database::getConnection()->prepare( 'UPDATE questions SET answer = :answer WHERE id = :id' );
|
||||
$stmnt->execute( array( 'answer' => htmlspecialchars( $answer ), 'id' => $question_id ) );
|
||||
$stmnt->execute( array( 'answer' => htmlspecialchars($answer, ENT_QUOTES, 'UTF-8'), 'id' => $question_id ) );
|
||||
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ class FaqModel
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$result['question'] = str_replace( "\n", '<br>', $result['question'] );
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
@ -141,7 +141,7 @@
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<span id="readMoreModalText" class="text-justify">Loading...</span>
|
||||
<span id="readMoreModalText" class="text-justify" style="white-space: pre-line;" >Loading...</span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
|
4
vendor/js/faq.js
vendored
4
vendor/js/faq.js
vendored
@ -157,7 +157,9 @@ function openAnswerModal( id )
|
||||
answerModalTitle.html( 'Answer ' + result.data.created_by + "'s question" );
|
||||
if( result.data.answer !== null && result.data.answer.length > 5 )
|
||||
{
|
||||
answerText.val( result.data.answer );
|
||||
let this_answer = result.data.answer;
|
||||
this_answer.replace(/(?:\r\n|\r|\n)/g, '<br>');
|
||||
answerText.val( this_answer );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user