Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speedgrader Draggable/Resizable Components (#1486)
* initial implementation of golden layout * commented out extraneous jquery script tag * moved grades to separate partial * moved logic for file tree and code symbol tree to golden-layout.html.erb * loading annotations is working * moved include_javascript_tag for annotations into separate html.erb & render it in observer * fixed bugs! annotations are working correctly now but solution is a bit hacky... * removed unnecessary tests * updated method of loading annotations * fixed width issues * fixed grades load bug * save layout state * fixed highlightLongLines styling bug * add symbol tree & file outline for all views by default * added reset button, changed download button * fixed symbol-tree-container div not loading properly * fix pdf viewer * keep track of need for file/symbol tree in storage * fixed bug where annotations_js wasn't loading on page change * reset by third column instead of symbol tree & file tree individually * disable pop-out * fixed symbol tree issue
- Loading branch information
1 parent
4e7d523
commit af7f303
Showing
14 changed files
with
259 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<%= javascript_include_tag "annotations.js" %> | ||
<%= javascript_include_tag "submission_view.js" %> | ||
<script type="text/javascript"> | ||
setActiveFilePos(currentHeaderPos) | ||
initializeAnnotationsForCode(); | ||
attachEvents(); | ||
attachChangeFileEvents(); | ||
</script> | ||
|
||
<script> | ||
var newFile = {}; | ||
newFile.url = '<%= url_for(params.permit(:header_position, :action, :controller).to_h) %>' | ||
|
||
<% if @is_pdf %> | ||
newFile.pdf = true; | ||
newFile.pdfUrl = "<%= url_for [:download, @course, @assessment, @submission, header_position: params[:header_position]] %>"; | ||
newFile.annotatedPdfUrl = "<%= url_for [:download, @course, @assessment, @submission, header_position: params[:header_position], annotated: true] %>"; | ||
newFile.previewMode = false; | ||
<% if @preview_mode %> | ||
newFile.previewMode = true; | ||
<% end %> | ||
<% else %> | ||
newFile.pdf = false; | ||
<% end %> | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
<div id="symbol-tree-box"> | ||
<h5>Symbol Tree</h5> | ||
<ul> | ||
<% ctag_obj.each do |fdef| %> | ||
<li onclick="scrollToLine(<%=fdef['line']%>)"> | ||
<%= image_tag "function_icon.svg" %> | ||
<%= fdef["name"] %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
<div id="symbol-tree-container"> | ||
<% unless @is_pdf %> | ||
<div id="symbol-tree-box"> | ||
<h5>Symbol Tree</h5> | ||
<ul> | ||
<% @ctag_obj.each do |fdef| %> | ||
<li onclick="scrollToLine(<%=fdef['line']%>)"> | ||
<%= image_tag "function_icon.svg" %> | ||
<%= fdef["name"] %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.