Skip to content

Commit 911438d

Browse files
sandershihackerDerekTBrown
authored andcommitted
Fixed styling issues, issues with gradelist and lablist, and issue #162 (#185)
* Updated Schemas * Load Screen * Loading Screen * publish subscribe and dynamic explore page * deleted swap file * publish subscribe * template fixes * added start for reactive publication * template issue * . * . * course_records publish * course_records reactively publish * revert meteor update * publish subscribe and lineheight for searchpage icons * fixed indentation and removed test file * indentation * indentation * Accounts page and fixed random erro * toolbar for mobile devices * toolbar * account.html fixes * Toolbar made responsive * Responsive toolbar fixes * created userlist component * course_records course_id validation * indentation * markdown * import changes * validation addition * Forms Module Deprecated Warning. Issue #110 * indentation * Use routerLink * api changes (#126) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations (#127) * issue 32 fixed * removed swp * fixed nconf issues * issue 82, 84 fixes * fixed #82 * isse #77 * fixed tests * fixed files * fixed tests master * fixed comment * moved validator * removed duplicate file * fixed tests, removed duplicate underscore, publish * changes * fixed methods.ts import * fixed issues w methods * fixes * minor fixes * A * api changes * fixed api * comments * minor changes * minor fixes * method implementations * course pages now uses Child Routing * deleted LabData class * school name * search function * icon size and #136 * dashboard pull data from database * fix inappropriate file naming for gradelist and lablist * more templating issues * . * . * markdown default * lablist and gradelist * template changes * explore page changes * delete instructor page * user schema * indentation * indentation * explore publish and taskview sidenav * explore view links to course/courseId * taskview sidenav * taskview * taskview sidenav changes * Extend terminal on small width * . * . * Added UserList Component in Courses * Edit Course * . * course dashboard get courseid from url * delete userlist * input * delete userlist * publish for global admin * Fixed router params * Issue 161 fixed: instructor field in courses * . * fix nextButton * . * Issue #171 * Issue #168 * Issue 160: CourseList * Removed LabView * Enrollable field for buttons on explore pages * TaskView -> LabView * Fixed Gradelist, Lablist and styling issues * Issue #162 Completed * TaskView toolbar color darken * remove tests * Combine Subscriptions * Reactive Subscription for CourseList and GradeList Added SimpleMDE Component
1 parent 4860516 commit 911438d

File tree

5 files changed

+29
-125
lines changed

5 files changed

+29
-125
lines changed
Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,2 @@
1-
2-
<div class="tuxlab-mdeditor">
3-
4-
<md-card>
5-
<md-card-title>
6-
<md-card-title-text>
7-
<span class="md-headline">
8-
Editor
9-
</span>
10-
</md-card-title-text>
11-
</md-card-title>
12-
<md-card-content>
13-
<textarea></textarea>
14-
</md-card-content>
15-
</md-card>
16-
17-
</div>
1+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
2+
<textarea #simplemde></textarea>
Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,33 @@
11
// Meteor Imports
22
import { Meteor } from 'meteor/meteor';
3-
import { Mongo } from 'meteor/mongo';
4-
import 'reflect-metadata';
5-
import 'zone.js/dist/zone';
6-
7-
// Angular Imports
8-
import { Component, ViewEncapsulation, provide } from '@angular/core';
9-
import { bootstrap } from 'angular2-meteor-auto-bootstrap';
10-
import { APP_BASE_HREF } from '@angular/common';
11-
import { HTTP_PROVIDERS } from '@angular/http';
12-
import { InjectUser } from 'angular2-meteor-accounts-ui';
13-
14-
// Angular Material Imports
15-
import { MATERIAL_PROVIDERS, MATERIAL_DIRECTIVES } from 'ng2-material';
16-
import { MeteorComponent } from 'angular2-meteor';
17-
import { OVERLAY_PROVIDERS } from '@angular2-material/core/overlay/overlay';
18-
19-
// Toolbar
20-
import { MD_TOOLBAR_DIRECTIVES } from '@angular2-material/toolbar';
213

22-
// Icon
23-
import { MD_ICON_DIRECTIVES, MdIconRegistry } from '@angular2-material/icon';
4+
// Angular Imports
5+
import { Component, ElementRef, ViewChild } from '@angular/core';
246

25-
// Import SimpleMDE
26-
// let mde = require("./simplemde");
27-
// import * as mde from './simplemde';
28-
// import SimpleMDE from 'simplemde';
29-
// import mde = require("./simplemde");
7+
// Angular Material Imports
8+
import { MeteorComponent } from 'angular2-meteor';
309

3110
// Declare Global Variable
32-
declare var SimpleMDE: any;
11+
var SimpleMDE : any = require('simplemde');
3312

3413
// Define Editor Component
3514
@Component({
3615
selector: 'tuxlab-mdeditor',
3716
templateUrl: '/client/imports/ui/components/mdeditor/mdeditor.html',
38-
directives: [MATERIAL_DIRECTIVES,
39-
MD_TOOLBAR_DIRECTIVES,
40-
MD_ICON_DIRECTIVES],
41-
viewProviders: [ MdIconRegistry ],
42-
providers: [ OVERLAY_PROVIDERS ],
43-
encapsulation: ViewEncapsulation.None
4417
})
4518

46-
// Export Editor Class
47-
export class MDEditor {
48-
testData: String = "# Title";
49-
50-
constructor(mdIconRegistry: MdIconRegistry) {
51-
// Create Icon Font
52-
mdIconRegistry.registerFontClassAlias('tux', 'tuxicon');
53-
mdIconRegistry.setDefaultFontSetClass('tuxicon');
54-
55-
// let simplemde = new SimpleMDE();
56-
// var simplemde = new SimpleMDE();
19+
// Export Editor Class
20+
export class MDEditor extends MeteorComponent {
21+
@ViewChild('simplemde') textarea : ElementRef;
22+
23+
constructor(private elementRef:ElementRef) {
24+
super();
5725
}
26+
27+
ngAfterViewInit(){
28+
// Instantiate SimpleMDE
29+
var mde = new SimpleMDE({ element: this.elementRef.nativeElement.value });
30+
}
31+
32+
5833
}

client/imports/ui/components/mdeditor/simplemde.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

client/imports/ui/pages/course/course_dashboard.html

Lines changed: 8 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@
1717
<a md-button href="https://www.cs.cmu.edu/~15131/f15/">Course Website</a>
1818
</md-card-actions>
1919
</md-card>
20-
20+
2121
<!-- Responsive Section for Grades and Assignments -->
22-
<div layout="row" layout-xs="column" *ngIf="!isInstruct()">
22+
<div layout="row" layout-xs="column">
23+
2324
<!-- Grade List -->
2425
<div flex>
2526
<tuxlab-gradelist></tuxlab-gradelist>
2627
</div>
28+
2729
<!-- Announcements -->
2830
<div flex>
2931
<md-card>
@@ -58,44 +60,9 @@
5860
</md-card-content>
5961
</md-card>
6062
</div>
63+
6164
</div>
62-
63-
<!-- Permissions Section -->
64-
<div layout="row" *ngIf="isInstruct()">
65-
<div flex>
66-
<md-card>
67-
<md-card-title>
68-
<md-card-title-text>
69-
<span class="md-headline">Permissions</span>
70-
</md-card-title-text>
71-
</md-card-title>
72-
<md-card-content>
73-
Data
74-
</md-card-content>
75-
<md-card-actions layout="row" layout-align="end center">
76-
<a md-button>Submit</a>
77-
</md-card-actions>
78-
</md-card>
79-
</div>
80-
<div flex>
81-
<md-card>
82-
<md-card-title>
83-
<md-card-title-text>
84-
<span class="md-headline">Syllabus</span>
85-
</md-card-title-text>
86-
</md-card-title>
87-
<md-card-content>
88-
Data
89-
</md-card-content>
90-
<md-card-actions layout="row" layout-align="end center">
91-
<a md-button>Submit</a>
92-
</md-card-actions>
93-
</md-card>
94-
</div>
95-
</div>
96-
65+
9766
<!--Lab List Card-->
98-
<div *ngIf="!isInstruct()">
99-
<tuxlab-lablist></tuxlab-lablist>
100-
</div>
101-
</div>
67+
<tuxlab-lablist></tuxlab-lablist>
68+
</div>

client/imports/ui/pages/course/course_dashboard.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,4 @@ declare var Collections: any;
6969
ngOnInit() {
7070
this.courseId = this.router.routerState.parent(this.route).snapshot.params['courseid'];
7171
}
72-
isInstruct() {
73-
if (typeof this.courseId !== "undefined") {
74-
return Roles.isInstructorFor(this.courseId);
75-
}
76-
else {
77-
return false;
78-
}
79-
}
80-
}
72+
}

0 commit comments

Comments
 (0)