Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
dfe6071
Working on updating the simple tree to D3 4.0. It currently lacks the…
Maxwellfire Apr 18, 2017
2e9be53
Found why links weren't working. Missing line of code ;(. Fixed
Maxwellfire Apr 18, 2017
db61ecf
Deleted helper files for figuring out why previous glitch was a thing
Maxwellfire Apr 18, 2017
9eaa3f5
Add buttons to step through, start, and stop the layout. Also start a…
Maxwellfire Jul 11, 2017
200a8d3
Make the halos move along with the stars on the LogoTree
Maxwellfire Jul 12, 2017
16a77b2
Add dragging to LogoTree. Surprisingly wasn't a drag.
Maxwellfire Jul 12, 2017
cfaa547
Set link distances to starting values so the logo keeps its shape.
Maxwellfire Jul 12, 2017
17ce665
Have simulation on by default and label buttons.
Maxwellfire Jul 12, 2017
5a19a77
Remove old code from bottom.
Maxwellfire Jul 12, 2017
640ec35
Make the gradients on some of the links move along with the links on …
Maxwellfire Jul 12, 2017
c54db3b
Make everything feel a bit smoother by changing force strengths on Lo…
Maxwellfire Jul 12, 2017
88fd4a7
Move Logo Tree code into its own folder
Maxwellfire Jul 30, 2017
210e78a
Started to impliment high level server and tree functions.
Maxwellfire Nov 12, 2017
66e875e
Continue to expose tree functions and make tree datastructure. Tree n…
Maxwellfire Nov 19, 2017
bcf3784
Attempt to fix an issue with firefox not rendering the SVGs correctly…
Maxwellfire Dec 2, 2017
a6091d6
Add comment explaining some of the TODOs on the tree datastructure.
Maxwellfire Dec 2, 2017
35aafa9
Added status column for resources
iampham Jan 28, 2018
0ec4365
Updated ResourceController, created TopicController
iampham Jan 28, 2018
70b44ec
partial complete of checkbox 1 in issue #28
aryarm Feb 3, 2018
66f9fd0
Get recursion working on tree updates to build a set of items to update.
Maxwellfire Feb 3, 2018
e40df73
Changed how author id is retrieved from $request->authorid to Auth::id()
iampham Feb 4, 2018
4bea42b
Working on a function that moves topics, move, located in resources. …
iampham Feb 4, 2018
c2c84cd
Merge branch 'laravel_dev' into adminpage
aryarm Feb 8, 2018
dee11bb
Created a descendants() function in Topic.php, which mostly completed…
iampham Feb 11, 2018
797835a
Revised Topic.php descendants() function to actually return the corre…
iampham Feb 11, 2018
3c46f2e
Change tree so that it adds data in a graceful way. Remove tree.data …
Maxwellfire Feb 11, 2018
0a887d7
Modify tree to gracefully exit data and visual elements!
Maxwellfire Feb 12, 2018
a4cf373
Give links ids so that they update nicer and there aren't collisions
Maxwellfire Feb 12, 2018
441e620
Change order of rendering so nodes render above links.
Maxwellfire Feb 17, 2018
2fc8b14
Upgrade to d3 v5
Maxwellfire Feb 18, 2018
fc7203e
Merge branch 'master' into Tree_Development
TrangQDinh Feb 18, 2018
22f6543
Merge master and integrate Javascript into Laravel
TrangQDinh Feb 18, 2018
d5a66ca
Implement #36, but still no animations.
Maxwellfire Feb 18, 2018
b1a4b34
Merge a thing because I forgot to pull and there were changes and it …
Maxwellfire Feb 18, 2018
6adc7d4
Moved and commited js helper file.
Maxwellfire Feb 18, 2018
6d2011e
Continue working on .getData function
TrangQDinh Feb 18, 2018
bfed64a
Merge branch 'Tree_Development' of https://github.com/aryam7/studyclo…
TrangQDinh Feb 18, 2018
fb1e65d
Merge branch 'master' into Tree_Development
TrangQDinh Feb 18, 2018
d4fd07a
added TopicRepository and registered it
aryarm Feb 18, 2018
b96f30e
added TopicRepository and registered it
aryarm Feb 18, 2018
950a713
brought tree-data-fix into adminpage code
aryarm Feb 18, 2018
0f84305
Merge branch 'laravel_dev' into adminpage
aryarm Feb 18, 2018
c044003
Merge branch 'master' into Tree_Development
aryarm Feb 18, 2018
c95e79b
moved Server.js to proper folder
aryarm Feb 18, 2018
65a6ccf
fix problems with Server.js
aryarm Feb 20, 2018
3d71797
fixed Server.getData() for special cases
ciennG Feb 24, 2018
53a643d
started TopicRepository
aryarm Feb 24, 2018
c78cbfb
Merge branch 'master' into Tree_Development
aryarm Feb 24, 2018
44ded5d
Merge pull request #44 from aryam7/delete_design_fromMaster
aryarm Feb 24, 2018
ce6fbe3
Merge branch 'laravel_dev' into adminpage
aryarm Feb 24, 2018
33026be
had to delete fonts.scss
aryarm Feb 24, 2018
b319b4b
getting rid of files that shouldn't exist
aryarm Feb 24, 2018
abfb9c1
maybe fixing line endings?
ciennG Feb 25, 2018
6e34691
saving before line endings
ciennG Feb 25, 2018
18fe86c
Normalize all the line endings
ciennG Feb 25, 2018
f9adfe1
test
ciennG Feb 25, 2018
5b92282
Merge branch 'Tree_Development' of https://github.com/aryam7/studyclo…
ciennG Feb 25, 2018
6d03362
these files disappeared for some reason. I'm adding them back
aryarm Feb 25, 2018
682346f
Revert "Merge branch 'laravel_dev' into adminpage"
aryarm Feb 25, 2018
0a1cf00
second phase of reverting prior commits
aryarm Feb 25, 2018
8787610
new changes to Topic Repository. moved functions out of Topic model
aryarm Feb 25, 2018
4d39838
moved getTopLevelTopics out of Topic model and rewrote descendants() …
aryarm Mar 3, 2018
f648d56
Make circles sizes animate
Maxwellfire Mar 4, 2018
9e53210
had TopicRepository use collections as its data structure
aryarm Mar 4, 2018
eb232f5
finished TopicTreeController functions for processing topics, resourc…
aryarm Mar 14, 2018
8397bf1
started working on ResourceRepositoryin issue #32
aryarm Mar 22, 2018
0040e5a
almost finished rewriting all functions in the ResourceRepository. se…
aryarm Mar 24, 2018
733042b
created getByTopics() for ResourceRepository. see issue #32
aryarm Mar 24, 2018
8aa4ab1
Make the tree do zooming and display ancestors. Also fix how animatio…
Maxwellfire Mar 25, 2018
ce75ad9
fixed attachTopics(). see issue #32
aryarm Mar 25, 2018
3700f26
scaffolded the handleError and handleSuccess functions
feiyanglin Mar 31, 2018
f6db13b
Color the nodes, and fix a bug in how they animate. Also set the leng…
Maxwellfire Mar 31, 2018
58078f6
Hide the links from being drawn.
Maxwellfire Mar 31, 2018
9b1da1c
started to make TopicRepository return pure data. see issue #32
aryarm Mar 31, 2018
24f5f72
the TopicRepository now returns pure data (#32)
aryarm Mar 31, 2018
79f3858
finish Server class ̣kind of
TrangQDinh Apr 1, 2018
234deed
Worked on moveTopics function in ResourceRepository
iampham Apr 1, 2018
393009e
finished TopicRepository refactor. see issue #32
aryarm Apr 1, 2018
8fc0a63
tested getByTopics() in ResourceRepository (#32)
aryarm Apr 1, 2018
7b07b42
Add labels to the tree and modify a bit of animation logic.
Maxwellfire Apr 1, 2018
8d74d74
Merge branch 'Tree_Development' of https://github.com/aryam7/studyclo…
Maxwellfire Apr 1, 2018
06eb175
finished TopicTreeController refactor. resources are now returned in …
aryarm Apr 7, 2018
3cf29f2
finished Topic and Resource refactor (#32)
aryarm Apr 7, 2018
ecf7aa9
installed laravel and setup an artisan command for it
aryarm Apr 7, 2018
bad259c
opted for a symlink instead
aryarm Apr 7, 2018
3de76b4
created symlink to envoy exec
aryarm Apr 7, 2018
da692ad
made cd relative to home directory
aryarm Apr 7, 2018
936aab6
fixed bug with double ~
aryarm Apr 7, 2018
b6dc6ae
Update marked to 0.3.9; pretty sure nothing else broke with npm
GiselleSerate Apr 8, 2018
995f120
Merge branch 'master' of github.com:aryam7/studycloud
GiselleSerate Apr 8, 2018
f8937f4
small changes to server class for convenience
ciennG Apr 8, 2018
45789f8
changes to moveTopic
iampham Apr 8, 2018
24a9d5f
Merge branch 'adminpage' of http://www.github.com/aryam7/studycloud into
iampham Apr 8, 2018
563c6c5
Halfway through making link lengths animate instead of jumping to the…
Maxwellfire Apr 8, 2018
285b839
Change example env file to disable debugBar
Maxwellfire Apr 8, 2018
d41e3e7
finished draft of deployment script
aryarm Apr 8, 2018
0bbc64b
Merge pull request #58 from aryam7/setup_envoy
aryarm Apr 8, 2018
17d0061
Worked on animating the link distances better using a bunch of interp…
Maxwellfire Apr 13, 2018
624a71e
renamed two functions to be an interpolatorGenerator to specify what …
feiyanglin Apr 13, 2018
2b54b7c
Fix issue #53; now manually putting acct js deps in layout
GiselleSerate Apr 15, 2018
c2c894e
Merge pull request #59 from aryam7/loginBugFix
GiselleSerate Apr 15, 2018
77eff96
prevented infinite server error loops
ciennG Apr 15, 2018
5fd422e
Tentative resource accessor functions that don't really work
ciennG Apr 15, 2018
14695d7
made progress on moveTopics() (#32)
aryarm Apr 15, 2018
4e2af43
Fix graphical glitches in rendering by changing what has its position…
Maxwellfire Apr 21, 2018
8c2ac44
Make everything in the tree not selectable to help with touchscreens
Maxwellfire Apr 21, 2018
6edb913
started implementing resource functions in Server.js
feiyanglin Apr 21, 2018
5ccd5c6
Merge branch 'Tree_Development' of https://github.com/aryam7/studyclo…
feiyanglin Apr 21, 2018
67212f5
decided to use ['stuff'] notation instead of ->get('stuff') for colle…
aryarm Apr 21, 2018
640c9d9
gave up on fixing issue #32. I'll come back to it later
aryarm Apr 22, 2018
e2aa8ab
Merge pull request #55 from aryam7/adminpage
aryarm Apr 22, 2018
f9adcc6
Merge branch 'Tree_Development'
Maxwellfire Apr 22, 2018
d17bf8d
Merge branch 'laravel_dev'
aryarm Apr 22, 2018
7e4c32d
fixed an issue with NodesAndConnections
aryarm Apr 22, 2018
111433e
simplify fake tree data so that it is easier to work with
aryarm Apr 22, 2018
1707523
Merge pull request #66 from aryam7/simplifyFakeTree
aryarm Apr 22, 2018
f32bb91
added deploy command to remote server instead of in envoy
aryarm May 4, 2018
996f3db
Merge pull request #68 from aryam7/deploy_fix
aryarm May 4, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions app/Helpers/NodesAndConnections.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace App\Helpers;

/**
* A class for converting data with relationships to the nodes/connections format.
*/
class NodesAndConnections
{
/**
* convert data to the nodes/connections format
* Note: your nodes must have a pivot attribute
* @param array $old_nodes the data that needs to be converted
* @return Illuminate\Database\Eloquent\Collection the reformated data as a collection with keys "node" and "connections"
*/
public static function convertTo($old_nodes)
{
$nodes = collect();
$connections = collect();

foreach ($old_nodes as $node) {
// check whether the node has been added already before adding it
if (!$nodes->pluck('id')->contains($node['id']))
{
// add the node without its pivot
$nodes->push($node->except(['pivot']));
}
// add any connections the node may have
if (!is_null($node['pivot']))
{
$connections->push(collect($node['pivot']));
}
}

return collect(["nodes" => $nodes, "connections" => $connections]);
}
}
33 changes: 26 additions & 7 deletions app/Http/Controllers/ResourceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function index()
*/
public function create()
{
//

}

/**
Expand All @@ -56,7 +56,7 @@ public function store(Request $request)
{
$newResource = new Resource;
$newResource->name = $request->name;
$newResource->author_id = $request->author_id;
$newResource->author_id = Auth::id();
$newResource->use_id = $request->use_id;

$newResource->save();
Expand All @@ -69,8 +69,10 @@ public function store(Request $request)
* @return \Illuminate\Http\Response
*/
public function show(Resource $resource)
{
return view('resource', ['resource' : $resource->name] )
{

return view('resource', ['resource' => $resource] );

}

/**
Expand All @@ -95,10 +97,27 @@ public function update(Request $request, Resource $resource)
{
//Request must have information about name, author_id, and use_id.
$resource->name = $request->name;
$resource->author_id = $request->author_id;
$resource->author_id = Auth::id();
$resource->use_id = $request->use_id;

$resource->save();
}

/**
*Moves the resource under a specific named topic
*
* @param \App\Resource $resource
* @param \App\Topic $topic
* @return \Illuminate\Http\Response
*
*
*/
public function move(Resource $resource, Topic $topic)
{

}


/**
* Remove the specified resource from storage.
*
Expand All @@ -107,8 +126,8 @@ public function update(Request $request, Resource $resource)
*/
public function destroy(Resource $resource)
{
$deletedResource = $resource->id;
$deletedResource->delete();

$resource->delete();

}
}
93 changes: 93 additions & 0 deletions app/Http/Controllers/TopicController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?php

namespace App\Http\Controllers;

use App\Topic;
use Illuminate\Http\Request;

class TopicController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}

/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
}

/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$newTopic = new Topic;
$newTopic->name = $request->name;
$newTopic->author_id = Auth::id();

$newTopic->save();
}

/**
* Display the specified resource.
*
* @param \App\Topic $topic
* @return \Illuminate\Http\Response
*/
public function show(Topic $topic)
{
//
}

/**
* Show the form for editing the specified resource.
*
* @param \App\Topic $topic
* @return \Illuminate\Http\Response
*/
public function edit(Topic $topic)
{
//
}

/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Topic $topic
* @return \Illuminate\Http\Response
*/
public function update(Request $request, Topic $topic)
{
$topic->name = $request->name;
$topic->author_id = Auth::id();

$topic->save();
}

/**
* Remove the specified resource from storage.
*
* @param \App\Topic $topic
* @return \Illuminate\Http\Response
*/
public function destroy(Topic $topic)
{
$topic->delete();
}

}
Loading