Skip to content

Commit

Permalink
ORA-651 add RESTcall clear on client, ORA-647 make help and comments …
Browse files Browse the repository at this point in the history
…visible again, add resize button for help windows again
  • Loading branch information
bjost2s committed Sep 22, 2015
1 parent e2e1f16 commit 707f84e
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 11 deletions.
4 changes: 2 additions & 2 deletions OpenRobertaServer/db/openroberta-db.script
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ GRANT DBA TO "orA"
SET SCHEMA SYSTEM_LOBS
INSERT INTO BLOCKS VALUES(0,2147483647,0)
SET SCHEMA PUBLIC
INSERT INTO USER VALUES(0,'Roberta','d4ab787ab667fef4:a5bf6037bd904f05b76ee431ae285f443229e3a3','','TEACHER','2015-08-30 21:34:50.811000','2015-08-30 21:34:50.937000',NULL)
INSERT INTO USER VALUES(1,'Roberta','d4ab787ab667fef4:a5bf6037bd904f05b76ee431ae285f443229e3a3','','TEACHER','2015-08-30 21:34:50.811000','2015-08-30 21:34:50.937000',NULL)
INSERT INTO USER VALUES(42,'r','fa22c66d2ea99ebb:0176c1177428c0a4ce866f93b764a490e097c7ee','','TEACHER','2014-12-05 22:15:02.944000','2015-08-12 15:02:28.812000',NULL)
INSERT INTO USER VALUES(43,'account-0','a2df3b9898d4c661:cadc82761df276b02c2a51f5544a90f07d0c833c','stuff','STUDENT','2014-12-11 15:58:02.527000','2014-12-11 15:58:02.527000','rwth')
INSERT INTO USER VALUES(44,'account-1','7b4b5a06002e9b4b:595fb7a60b9a0559cfcd8dd0c9fc4b0bde856de0','stuff','STUDENT','2014-12-11 15:58:15.648000','2014-12-11 15:58:15.648000','rwth')
Expand All @@ -79,7 +79,7 @@ INSERT INTO USER VALUES(56,'rrr','e1097ec65bbd01cd:505b15c5fb2b2a691604854663214
INSERT INTO USER VALUES(57,'b','cc97d0b92d16b075:d755cc59c29a1be574d9eb88c88da94174d07805','b','TEACHER','2015-07-01 23:25:13.181000','2015-08-31 11:57:02.967000',NULL)
INSERT INTO ROBOT VALUES(42,'ev3','2015-07-06 11:48:05.954000','',0)
INSERT INTO ROBOT VALUES(43,'oraSim','2015-07-06 11:48:05.954000','',0)
INSERT INTO PROGRAM VALUES(0,'NEPOprog',0,43,'<block_set xmlns="http://de.fhg.iais.roberta.blockly"><instance x="370" y="50"><block type="robControls_start" id="149" intask="true" deletable="false"><mutation declare="false"></mutation></block><block type="robActions_motorDiff_on" id="168" inline="false" intask="true"><field name="DIRECTION">FOREWARD</field><value name="POWER"><block type="math_number" id="169" intask="true"><field name="NUM">30</field></block></value></block><block type="robControls_wait_for" id="189" inline="false" intask="true"><value name="WAIT0"><block type="logic_compare" id="190" inline="true" intask="true"><mutation operator_range="COLOUR"></mutation><field name="OP">EQ</field><value name="A"><block type="sim_getSample" id="191" intask="true" deletable="false" movable="false"><mutation input="COLOUR_COLOUR"></mutation><field name="SENSORTYPE">COLOUR_COLOUR</field><field name="SENSORPORT">3</field></block></value><value name="B"><block type="robColour_picker" id="197" intask="true"><field name="COLOUR">#000000</field></block></value></block></value></block></instance></block_set>','2015-08-31 11:58:48.167000','2015-08-31 11:58:48.167000',NULL,NULL,0,NULL,0)
INSERT INTO PROGRAM VALUES(1,'NEPOprog',1,43,'<block_set xmlns="http://de.fhg.iais.roberta.blockly"><instance x="370" y="50"><block type="robControls_start" id="149" intask="true" deletable="false"><mutation declare="false"></mutation></block><block type="robActions_motorDiff_on" id="168" inline="false" intask="true"><field name="DIRECTION">FOREWARD</field><value name="POWER"><block type="math_number" id="169" intask="true"><field name="NUM">30</field></block></value></block><block type="robControls_wait_for" id="189" inline="false" intask="true"><value name="WAIT0"><block type="logic_compare" id="190" inline="true" intask="true"><mutation operator_range="COLOUR"></mutation><field name="OP">EQ</field><value name="A"><block type="sim_getSample" id="191" intask="true" deletable="false" movable="false"><mutation input="COLOUR_COLOUR"></mutation><field name="SENSORTYPE">COLOUR_COLOUR</field><field name="SENSORPORT">3</field></block></value><value name="B"><block type="robColour_picker" id="197" intask="true"><field name="COLOUR">#000000</field></block></value></block></value></block></instance></block_set>','2015-08-31 11:58:48.167000','2015-08-31 11:58:48.167000',NULL,NULL,0,NULL,0)
INSERT INTO PROGRAM VALUES(42,'hallo',42,42,'<block_set xmlns="http://de.fhg.iais.roberta.blockly"><instance x="100" y="50"><block type="robControls_start" id="10" deletable="false"></block><block type="robActions_display_text" id="22" inline="false"><value name="OUT"><block type="text" id="23"><field name="TEXT">Hallo</field></block></value><value name="COL"><block type="math_number" id="24"><field name="NUM">0</field></block></value><value name="ROW"><block type="math_number" id="25"><field name="NUM">0</field></block></value></block></instance></block_set>','2014-12-05 22:15:14.958000','2014-12-05 22:20:36.595000',NULL,NULL,0,NULL,0)
INSERT INTO PROGRAM VALUES(43,'green',42,42,'<block_set xmlns="http://de.fhg.iais.roberta.blockly"><instance x="100" y="50"><block type="robControls_start" id="10" deletable="false"></block><block type="robActions_brickLight_on" id="60"><field name="SWITCH_COLOR">GREEN</field><field name="SWITCH_BLINK">ON</field></block></instance></block_set>','2014-12-05 22:15:35.316000','2014-12-05 22:15:35.316000',NULL,NULL,0,NULL,0)
INSERT INTO PROGRAM VALUES(44,'red',42,42,'<block_set xmlns="http://de.fhg.iais.roberta.blockly"><instance x="100" y="50"><block type="robControls_start" id="10" intask="true" deletable="false"><mutation declare="false"></mutation></block><block type="robControls_ifElse" id="67" inline="false" intask="true"><mutation else="1"></mutation><repetitions><value name="IF0"><block type="robSensors_touch_isPressed" id="78" intask="true"><field name="SENSORPORT">1</field></block></value><statement name="DO0"><block type="robActions_brickLight_on" id="60" intask="true"><field name="SWITCH_COLOR">GREEN</field><field name="SWITCH_BLINK">ON</field></block></statement><statement name="ELSE"><block type="robActions_brickLight_on" id="76" intask="true"><field name="SWITCH_COLOR">RED</field><field name="SWITCH_BLINK">ON</field></block></statement></repetitions></block></instance></block_set>','2014-12-05 22:15:44.512000','2015-06-18 16:58:59.150000',NULL,NULL,0,NULL,0)
Expand Down
4 changes: 2 additions & 2 deletions OpenRobertaServer/staticResources/blockly/core/bubble.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ Blockly.Bubble.prototype.createDom_ = function(content, hasResize) {
'rx' : Blockly.BlockSvg.CORNER_RADIUS,
'ry' : Blockly.BlockSvg.CORNER_RADIUS
}, this.bubbleGroup_);
this.bubbleGroup_.appendChild(content);
if (hasResize) {
this.resizeGroup_ = Blockly.createSvgElement('g', {
'class' : Blockly.RTL ? 'blocklyResizeSW' : 'blocklyResizeSE'
Expand Down Expand Up @@ -261,11 +262,10 @@ Blockly.Bubble.prototype.createDom_ = function(content, hasResize) {
+ 'h2.061l.229-.023c-.186.307-.29.656-.29 1.023 0 .534.208 1.036.586 1.414s.88.586 1.414.586c.367 0 .716-.105 1.023-.289'
+ 'l-.023.228v2.061h-1.939c-.122 0-.24.015-.356.036.189-.31.295-.664.295-1.036 0-.534-.208-1.036-.586-1.414z'
}, this.resizeGroup_);
this.bubbleGroup_.appendChild(this.resizeGroup_);
} else {
this.resizeGroup_ = null;
}
this.bubbleGroup_.appendChild(content);
// this.bubbleGroup_.appendChild(this.resizeGroup_);
return this.bubbleGroup_;
};

Expand Down
8 changes: 6 additions & 2 deletions OpenRobertaServer/staticResources/css/roberta.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ body > :not(.pace),body:before,body:after {
-moz-transition:opacity .4s ease-in-out;
-o-transition:opacity .4s ease-in-out;
-ms-transition:opacity .4s ease-in-out;
transition:opacity .4s ease-in-out
transition:opacity .4s ease-in-out;
}

body:not(.pace-done) > :not(.pace),body:not(.pace-done):before,body:not(.pace-done):after {
opacity:0
opacity:0;
}
body.blocklyMinimalBody * {
opacity:1 !important;
overflow:hidden;
}

#head-navigation {
Expand Down
12 changes: 7 additions & 5 deletions OpenRobertaServer/staticResources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
<script type="text/javascript" src="/common/ui/jquery-ui-1.10.4.custom.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/common/jquery/jquery.dataTables.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/common/bootstrap/bootstrap-3.3.1-dist/dist/js/bootstrap.min.js"></script>
<!-- <script type="text/javascript" src="/roberta/user.js"></script>
<script type="text/javascript" src="/roberta/user.js"></script>
<script type="text/javascript" src="/roberta/robot.js"></script>
<script type="text/javascript" src="/roberta/program.js"></script>
<script type="text/javascript" src="/roberta/configuration.js"></script>
<script type="text/javascript" src="/roberta/util.js"></script>
<script type="text/javascript" src="/roberta/roberta.js"></script> -->
<script type="text/javascript" src="/roberta/roberta.min.js"></script>
<script type="text/javascript" src="/roberta/roberta.js"></script>
<!-- <script type="text/javascript" src="/roberta/roberta.min.js"></script> -->

<!-- <script type="text/javascript" src="/simulation/simulationLogic/robot.js"></script>
<script type="text/javascript" src="/simulation/simulationLogic/scene.js"></script>
Expand All @@ -50,6 +50,8 @@
<script type="text/javascript" src="/blockly/blockly_compressed.js"></script>
<script type="text/javascript" src="/blockly/blocks_compressed.js"></script>
<script type="text/javascript" src="blockly/msg/js/en.js"></script>
<script type="text/javascript" src="blockly/core/help.js"></script>
<script type="text/javascript" src="blockly/core/bubble.js"></script>

<link rel="stylesheet" type="text/css" href="/common/bootstrap/bootstrap-3.3.1-dist/dist/css/bootstrap.min.css"></link>
<!-- <link rel="stylesheet" type="text/css" href="/common/jquery.dataTables.min.css"></link> -->
Expand Down Expand Up @@ -602,8 +604,8 @@ <h4 href="#" class="EN modal-title">Do you have an EV3 robot? - Click here!</h4>
<div id="startSim" href="#" class="col-xs-6 col-md-6" style="cursor: pointer">
<div class="modal-content">
<div class="modal-header" data-dismiss="modal" style="height: 90px; min-height: 90px; max-height: 90px">
<h4 href="#" class="DE modal-title">Du hast keinen EV3 Roboter? - Dann programmiere unseren simulierten Roboter</h4>
<h4 href="#" class="EN modal-title">You don't have an EV3 robot? - Start coding with our simulated robot</h4>
<h4 href="#" class="DE modal-title">Du hast keinen EV3 Roboter? - Dann programmiere unseren simulierten Roboter, hier klicken!</h4>
<h4 href="#" class="EN modal-title">You don't have an EV3 robot? - Start coding with our simulated robot, click here!</h4>
</div>
<a href="#" data-dismiss="modal"> <img class="img-responsive" alt="Simulation" src="../css/img/SimBot_quad_prev.png" />
</a>
Expand Down
3 changes: 3 additions & 0 deletions OpenRobertaServer/staticResources/roberta/roberta.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ var id;
* Initialize user-state-object
*/
function initUserState() {
USER.clear(function(result) {
response(result);
});
userState.version = 'xx.xx.xx';
userState.language = 'DE';
userState.robot = 'ev3';
Expand Down
14 changes: 14 additions & 0 deletions OpenRobertaServer/staticResources/roberta/user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
var USER = {};
(function($) {
/**
* Clear user
* @memberof USER
*/
USER.clear = function(successFn) {
COMM.json("/user", {
"cmd" : "clear",
}, successFn, "clear user");
};

/**
* Logout user
* @memberof USER
*/
/**
* Login user
* @memberof USER
Expand Down

0 comments on commit 707f84e

Please sign in to comment.