Explorar o código

added report modal

Akira Laine %!s(int64=9) %!d(string=hai) anos
pai
achega
63dbcffc79
Modificáronse 2 ficheiros con 204 adicións e 2 borrados
  1. 1 1
      app/client/scripts/events.js
  2. 203 1
      app/client/templates/room.html

+ 1 - 1
app/client/scripts/events.js

@@ -1597,7 +1597,7 @@ Template.room.events({
         });
 
         console.log(reportData);
-        Meteor.call("submitReport", room, reportData, Session.get("id"), function () {
+        Meteor.call("submitReport", room, reportData, function () {
             $("#close-modal-r").click();
         });
     },

+ 203 - 1
app/client/templates/room.html

@@ -5,7 +5,7 @@
                 <ul class="left hide-on-med-and-down">
                     <li><a href="/"><i class="material-icons">home</i></a></li>
                     <li><a href="#add_song_modal" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Request a song" id="add-song-modal-button"><i class="material-icons">playlist_add</i></a></li>
-                    <li><a href="#bug_report_modal" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Flag a song"><i class="material-icons">flag</i></a></li>
+                    <li><a href="#report_modal" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Flag a song" id="report-modal-button"><i class="material-icons">flag</i></a></li>
                     <li><a id="vote-skip" class="tooltipped" data-position="bottom" data-delay="50" data-tooltip="Vote to skip this song"><i class="material-icons left">skip_next</i>{{votes}}</a></li>
                     {{#if isAdmin}}
                         <li><a class='dropdown-button' data-activates='admin-dropdown'><i class="material-icons">control_point</i></a></li>
@@ -276,7 +276,209 @@
     <!--Report modal-->
     <div id="report_modal" class="modal">
         <div class="modal-content container">
+                {{#if previousSongR}}
+                <button type="button" id="report-prev" class="btn btn-warning btn-lg btn-block">Report previous song ({{previousSongR.title}})</button>
+                {{/if}}
+                <button type="button" id="report-curr" class="btn btn-warning btn-lg btn-block" disabled>Report current song ({{currentSongR.title}})</button>
 
+                <h3 class="text-primary"><b>Reporting:</b> {{reportingSong.title}} by {{reportingSong.artist}}</h3>
+
+                <div class="report-layer-1">
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-song">
+                        <label for="report-song">
+                            Song
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportSong}}
+                        <div class="report-layer-2" id="report-song-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-song-not-playing">
+                                <label for="report-song-not-playing">
+                                    Not playing
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-song-does-not-exist">
+                                <label for="report-song-does-not-exist">
+                                    Does not exist
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-song-other">
+                                <label for="report-song-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-song-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-title">
+                        <label for="report-title">
+                            Title
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportTitle}}
+                        <div class="report-layer-2" id="report-title-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-title-incorrect">
+                                <label for="report-title-incorrect">
+                                    Incorrect
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-title-inappropriate">
+                                <label for="report-title-inappropriate">
+                                    Inappropriate
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-title-other">
+                                <label for="report-title-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-title-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-author">
+                        <label for="report-author">
+                            Author
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportAuthor}}
+                        <div class="report-layer-2" id="report-author-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-author-incorrect">
+                                <label for="report-author-incorrect">
+                                    Incorrect
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-author-inappropriate">
+                                <label for="report-author-inappropriate">
+                                    Inappropriate
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-author-other">
+                                <label for="report-author-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-author-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-duration">
+                        <label for="report-duration">
+                            Duration
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportDuration}}
+                        <div class="report-layer-2" id="report-duration-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-duration-long">
+                                <label for="report-duration-long">
+                                    Too long
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-duration-short">
+                                <label for="report-duration-short">
+                                    Too short
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-duration-other">
+                                <label for="report-duration-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-duration-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-audio">
+                        <label for="report-audio">
+                            Audio
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportAudio}}
+                        <div class="report-layer-2" id="report-audio-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-audio-inappropriate">
+                                <label for="report-audio-inappropriate">
+                                    Inappropriate
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-audio-not-playing">
+                                <label for="report-audio-not-playing">
+                                    Not playing
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-audio-other">
+                                <label for="report-audio-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-audio-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-albumart">
+                        <label for="report-albumart">
+                            Albumart
+                        </label>
+                    </div>
+                    <!-- Layer2 -->
+                    {{#if reportAlbumart}}
+                        <div class="report-layer-2" id="report-albumart-list">
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-albumart-incorrect">
+                                <label for="report-albumart-incorrect">
+                                    Incorrect
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-albumart-inappropriate">
+                                <label for="report-albumart-inappropriate">
+                                    Inappropriate
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-albumart-not-showing">
+                                <label for="report-albumart-not-showing">
+                                    Not showing
+                                </label>
+                            </div>
+                            <div class="checkbox">
+                                <input type="checkbox" id="report-albumart-other">
+                                <label for="report-albumart-other">
+                                    Other: <br>
+                                    <textarea class="other-textarea" id="report-albumart-other-ta" type="text"></textarea>
+                                </label>
+                            </div>
+                        </div>
+                    {{/if}}
+                    <div class="checkbox">
+                        <input class="checkbox-box" type="checkbox" id="report-other">
+                        <label for="report-other">
+                            Other: <br>
+                            <textarea class="other-textarea" id="report-other-ta" type="text"></textarea>
+                        </label>
+                    </div>
+                </div>
+                <button type="button" id="report-song-button" class="button">Submit</button>
         </div>
         <div class="divider"></div>
         <div class="modal-footer">