Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
fix #22 : drag and drop to the editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mgreau committed Mar 1, 2014
1 parent e972534 commit c89ffb2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 10 deletions.
6 changes: 5 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"angular-resource": "1.2.11",
"bootstrap": "3.1.0",
"angular-indexeddb": "emil10001/angular-indexeddb",
"angular-fullscreen": "fabiobiondi/angular-fullscreen"
"angular-fullscreen": "fabiobiondi/angular-fullscreen",
"angular-dropfile-directive": "https://github.com/anthonny/angular-dropfile-directive.git#master"
},
"resolutions": {
"angular": "1.2.11"
}
}
5 changes: 3 additions & 2 deletions src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
</div>

<script>
//var console = {};
//console.log = function(){};
var console = {};
console.log = function(){};
</script>

<script src="libs/angular/angular.min.js"></script>
<script src="libs/angular-dropfile-directive/dist/dropfile.all.js"></script>
<script src="libs/angular-resource/angular-resource.min.js"></script>
<script src="libs/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
<script src="libs/ace-builds/src-min/ace.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var app = angular.module('adeditorApp',
'ui.ace',
'ui.bootstrap',
'angular-indexeddb',
'FBAngular'
'FBAngular',
'aql.directives.dropfile'
]
);

Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/templates/asciidoc-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
onChange: aceChanged,
mode: 'asciidoc',
theme: 'terminal'
}">
}"
dropfile data-ng-model="fileContent">
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ public void testNotificationWhenBecameAWriter() throws URISyntaxException,
+ writer + "\":\"" + writer + "\"}}}";

// notifOnOpen - notifWhenSend Adoc - output
MyBasicEndpointClient.latch = new CountDownLatch(4);
MyBasicEndpointClient.latch = new CountDownLatch(5);

Session session = connectToServer(MyBasicEndpointClient.class, ADOC_URL
+ ADOC_ID);
assertNotNull(session);

session.getBasicRemote().sendText(data);
assertTrue(MyBasicEndpointClient.latch.await(5, TimeUnit.SECONDS));
assertEquals(JSONNotificationWhenBecameAWriter,
assertTrue("error on waiting...", MyBasicEndpointClient.latch.await(5, TimeUnit.SECONDS));
assertEquals("JSON not equals", JSONNotificationWhenBecameAWriter,
MyBasicEndpointClient.notificationMessage);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static JavaArchive createDeployment() {
public void shouldNotDecodeJSONMessage() {
assertNotNull(msgDecoder);

final String JSON = "{\"type\" : \"aadoc\", \"source\" : \"texttest\", \"writer\": \"max\"}";
final String JSON = "{\"type\" : \"aadoc\", \"sourrrce\" : \"texttest\", \"writer\": \"max\"}";
AsciidocMessage adoc = null;

try {
Expand Down

0 comments on commit c89ffb2

Please sign in to comment.