Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
chensivan committed Feb 22, 2017
1 parent f166dbe commit e0d4b03
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 6 deletions.
7 changes: 6 additions & 1 deletion lib/codeon.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ var requestbutton = require('./requests/requestbutton');
var guid = require('./utils/guid');
var user_preferences = require('./utils/user_preferences');
var editorID;
var pfs = require('./utils/promised_fs');
var path = require('path');


module.exports= {

Expand All @@ -17,7 +20,6 @@ module.exports= {
if(!state) {
state = {};
}

// activate atom-codeon
recorder.initialize(editorID, state.recorder);

Expand All @@ -26,6 +28,9 @@ module.exports= {

// activate request button
requestbutton.initialize()

// declare csp

},
serialize: function() {
return {
Expand Down
3 changes: 3 additions & 0 deletions lib/requests/requestView.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function RequestView() {
}, this), function(err) {
console.error(err);
});

pfs.readFile(path.join(__dirname, 'views', 'metafile.html'), 'utf8');

}

(function(My) {
Expand Down
2 changes: 1 addition & 1 deletion lib/requests/services/record_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function(app) {
}

var cwd = firstSplitPath.slice(0, gcd_index + 1).join(path.sep);

debugger;
return cwd;
} else {
return '';
Expand Down
2 changes: 1 addition & 1 deletion lib/requests/services/recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ module.exports = function(app) {
scope.reqSideBarButton = true;
});
}, 0, false);
debugger;
UploadRecording(uid, EditorRecorder, VoiceRecorder, FileRecorder, cwd, requestTitle);
}
},
sendingTextRequest: function(title, request){
uid = guid();
debugger;
cwd = FileRecorder.start(uid);
UploadTextRequest(uid, cwd, title, request,FileRecorder);
},
Expand Down
5 changes: 5 additions & 0 deletions lib/requests/views/metafile.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval'; img-src data:; font-src 'self' data:; 'child-src' 'self' blob:">
</head>
</html>
3 changes: 2 additions & 1 deletion lib/requests/views/recording_prompt.view.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

<div ng-controller='RequestPromptController' class='code-on-request-prompt'>
<form ng-submit='startRecording()' ng-hide='COUNTDOWN'>
<h2>Briefly name your request. (e.g. javascript event handler syntax)</h2>
Expand All @@ -10,7 +11,7 @@ <h2 ng-hide='TEXTMODE'>
<h2 ng-hide='TEXTMODE' style="color:red;">Please keep your request within 1 minute.</h2>
<br/>
<h2 ng-show='TEXTMODE' >Describe your request in the text box below. Click 'Submit' button once you are done! (up to 50 words)</h2>

<textarea ng-show='TEXTMODE' ng-model='textRequestDescription' id="request-text" class="form-control native-key-bindings" rows="5" tabIndex=-1 placeholder="(e.g. type your request here ... )">{{requestText}}</textarea>

<div ng-hide="COUNTDOWN" class="prompt_buttons">
Expand Down
6 changes: 6 additions & 0 deletions lib/response/controllers/helper_response.controller.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var Quill = require('quill')

module.exports = function(app) {

app.filter('showButtonOnce', function() {
Expand Down Expand Up @@ -39,6 +41,10 @@ module.exports = function(app) {

$scope.sliderInit = false;

var quill = new Quill(document.getElementsByClassName("annotation_bubble_lower")[0].getElementsByTagName("div"), {
theme: 'snow'
});


atom.workspace.onDidStopChangingActivePaneItem(function() {
$scope.$evalAsync();
Expand Down
5 changes: 3 additions & 2 deletions lib/response/views/response_panel.view.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ <h4> Answer
<!-- display each answer in the response -->
<div ng-repeat='answer in helper_response.answers track by $index'>
<!-- Show explanation content -->
<div ng-show='answer.type==="explanation"' class='response-content'>
{{answer.value}}
<div class='response-content' ng-show='answer.type==="explanation"'>
<div class='explanation_editor' id='explanation_editor'>{{answer.value}}</div>
</div>

</div>
<div style='margin: 5px' ng-repeat='answer in helper_response.answers | showButtonOnce track by $index '>
<div style="text-align:right; font-size:11px">
Expand Down
4 changes: 4 additions & 0 deletions styles/responses.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
@transition-widget-duration: 100ms;
@resizer-width: 30px;

div.explanation_editor{
height: 200px;
width: 400px;
}

.zi-width-resizer {
margin-left: -30px;
Expand Down

0 comments on commit e0d4b03

Please sign in to comment.