Updated marmotta-ldpath and marmotta-sparql to the new codemirror-modes webjar 
layout.
Prepared marmotta-reasoner-kiwi to use the skwrl-mode for codemirror 
(MARMOTTA-346)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e5686422
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e5686422
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e5686422

Branch: refs/heads/develop
Commit: e56864228e54d75bc7a94e62b188f43e4bd6e5c6
Parents: 9c3b63b
Author: Jakob Frank <[email protected]>
Authored: Wed Oct 23 14:44:04 2013 +0200
Committer: Jakob Frank <[email protected]>
Committed: Wed Oct 23 14:48:08 2013 +0200

----------------------------------------------------------------------
 platform/marmotta-ldpath/pom.xml                       |  2 +-
 .../src/main/resources/web/admin/ldpath.html           | 13 ++++++++++---
 .../src/main/resources/web/admin/ldpath.js             |  5 ++++-
 platform/marmotta-reasoner-kiwi/pom.xml                |  7 ++++---
 .../src/main/resources/web/admin/configure.html        | 10 +++++++++-
 platform/marmotta-sparql/pom.xml                       |  2 +-
 .../src/main/resources/web/admin/sgvizler.html         | 10 +++++-----
 .../src/main/resources/web/admin/snorql.html           |  6 ++++--
 .../src/main/resources/web/admin/update.html           |  6 ++++--
 9 files changed, 42 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-ldpath/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldpath/pom.xml b/platform/marmotta-ldpath/pom.xml
index abb6788..b8b5b4b 100644
--- a/platform/marmotta-ldpath/pom.xml
+++ b/platform/marmotta-ldpath/pom.xml
@@ -155,7 +155,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.marmotta.webjars</groupId>
-            <artifactId>codemirror</artifactId>
+            <artifactId>codemirror-modes</artifactId>
         </dependency>
 
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.html 
b/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.html
index 6c551ab..955e468 100644
--- a/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.html
+++ b/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.html
@@ -26,10 +26,17 @@
 <title>LDPath Test Suite</title>
 <script type="text/javascript" 
src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
 <script type="text/javascript" src="../../webjars/marmotta.js"></script>
-<script type="text/javascript" 
src="../../webjars/codemirror/3.16/codemirror.js"></script>
+
+<script type="text/javascript" 
src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
+<link rel="stylesheet" href="../../webjars/codemirror/3.16/lib/codemirror.css">
+
+<script src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
+<link rel="stylesheet" 
href="../../webjars/codemirror/3.16/addon/hint/show-hint.css">
+
+<script 
src="../../webjars/codemirror-modes/3.16/mode/ldpath/ldpath.js"></script>
+<link rel="stylesheet" 
href="../../webjars/codemirror-modes/3.16/mode/ldpath/ldpath.css">
 
 <link rel="stylesheet" href="style.css" />
-<link rel="stylesheet" href="../../webjars/codemirror/3.16/codemirror.css" />
 <script type="text/javascript" src="ldpath.js"></script>
 <!--###END_HEAD###-->
 </head>
@@ -46,12 +53,12 @@
       <div><input id="addContextUri" type=text /><button id="addContext">Add 
Context</button></div>
     </div>
     <div id="editor">
-      <h2>LDPath</h2>
       <div>
         <div class="chooseEditor"><a href="#" title="use smart editor" 
class="editor_cm">rich</a> | <a href="#" title="use plain text editor" 
class="editor_plain">plain</a></div>
 <!--
         <label for="templates">Select Template:</label><select 
id="templates"></select>&nbsp;<span id="chooserStatus" class="icon 
loading">Loading...</span>
 -->
+        <h2>LDPath</h2>
       </div>
       <div>
         <div class="editor_wrap"><textarea id="ldpath"></textarea></div>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.js
----------------------------------------------------------------------
diff --git a/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.js 
b/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.js
index 3005581..275c31a 100644
--- a/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.js
+++ b/platform/marmotta-ldpath/src/main/resources/web/admin/ldpath.js
@@ -154,10 +154,13 @@ $(function() {
         $.getJSON(_SERVER_URL + "ldpath/util/namespaces", function(data) {
             defaultNamespaces = data;
         }).complete(function() {
+            CodeMirror.commands.autocomplete = function(cm) {
+                CodeMirror.showHint(cm, CodeMirror.hint.ldpath);
+            };
           editor = CodeMirror.fromTextArea(document.getElementById("ldpath"), {
               lineNumbers : true,
               matchBrackets : true,
-              extraKeys: {"Ctrl-Space": "ldpathAutocomplete"},
+              extraKeys: {"Ctrl-Space": "autocomplete"},
               mode : {
                 name: "ldpath",
                 baseURL: _SERVER_URL,

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-reasoner-kiwi/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-reasoner-kiwi/pom.xml 
b/platform/marmotta-reasoner-kiwi/pom.xml
index e4e994f..912bffb 100644
--- a/platform/marmotta-reasoner-kiwi/pom.xml
+++ b/platform/marmotta-reasoner-kiwi/pom.xml
@@ -162,7 +162,10 @@
         <dependency>
             <groupId>org.apache.marmotta</groupId>
             <artifactId>kiwi-reasoner</artifactId>
-            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta.webjars</groupId>
+            <artifactId>codemirror-modes</artifactId>
         </dependency>
 
         <!-- LMF Testing Package -->
@@ -176,13 +179,11 @@
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-server</artifactId>
-            <version>${jetty.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.eclipse.jetty</groupId>
             <artifactId>jetty-servlet</artifactId>
-            <version>${jetty.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-reasoner-kiwi/src/main/resources/web/admin/configure.html
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-reasoner-kiwi/src/main/resources/web/admin/configure.html 
b/platform/marmotta-reasoner-kiwi/src/main/resources/web/admin/configure.html
index b3d6142..4729698 100644
--- 
a/platform/marmotta-reasoner-kiwi/src/main/resources/web/admin/configure.html
+++ 
b/platform/marmotta-reasoner-kiwi/src/main/resources/web/admin/configure.html
@@ -24,6 +24,14 @@
 <!--###BEGIN_HEAD###-->
     <title>Reasoning Module</title>
     <script type="text/javascript" 
src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
+    <link rel="stylesheet" 
href="../../webjars/codemirror/3.16/lib/codemirror.css">
+
+    <script 
src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
+    <link rel="stylesheet" 
href="../../webjars/codemirror/3.16/addon/hint/show-hint.css">
+
+    <script 
src="../../webjars/codemirror-modes/3.16/mode/skwrl/skwrl.js"></script>
+
     <script type="text/javascript" src="widget/conf_reasoner.js"></script>
     <script type="text/javascript">
         jQuery(document).ready(function(){
@@ -52,4 +60,4 @@
         </div>
 <!--###END_CONTENT###-->
 </body>
-</html>
\ No newline at end of file
+</html>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-sparql/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/pom.xml b/platform/marmotta-sparql/pom.xml
index aa0c931..096c581 100644
--- a/platform/marmotta-sparql/pom.xml
+++ b/platform/marmotta-sparql/pom.xml
@@ -183,7 +183,7 @@
             <artifactId>jquery-ui</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.marmotta.webjars</groupId>
+            <groupId>org.webjars</groupId>
             <artifactId>codemirror</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-sparql/src/main/resources/web/admin/sgvizler.html
----------------------------------------------------------------------
diff --git 
a/platform/marmotta-sparql/src/main/resources/web/admin/sgvizler.html 
b/platform/marmotta-sparql/src/main/resources/web/admin/sgvizler.html
index 7d8c8af..96ddb70 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/sgvizler.html
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/sgvizler.html
@@ -8,9 +8,9 @@
     <script type="text/javascript" 
src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
     <script type="text/javascript" src="https://www.google.com/jsapi";></script>
     <script type="text/javascript" 
src="../../webjars/sgvizler/0.5.1/sgvizler.js" id="sgvzlr_script" ></script>
-    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/codemirror.js"></script>
-    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/simple-hint.js"></script>
-    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/sparql.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/mode/sparql/sparql.js"></script>
     <script type="text/javascript">
         // CONFIGURATION Sgvizler 0.5: Set variables to fit your setup.
         // NB! Do not let the last item in a list end with a comma.
@@ -94,8 +94,8 @@
         $(document).ready(sgvizler.go());
 
     </script>
-    <link rel="stylesheet" href="../../../cm/codemirror.css" />
-    <link rel="stylesheet" href="../../../cm/simple-hint.css" />
+    <link rel="stylesheet" 
href="../../webjars/codemirror/3.16/lib/codemirror.css" />
+    <link rel="stylesheet" 
href="../../webjars/codemirror/3.16/adon/hint/show-hint.css" />
     <style type="text/css">
         .CodeMirror {
             background-color: #fff;

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html 
b/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
index 1cd0349..78b6e03 100755
--- a/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
@@ -24,7 +24,7 @@
     <!--###BEGIN_HEAD###-->
     <title>Snorql: A SPARQL Explorer</title>
     <link rel="stylesheet" type="text/css" 
href="../../webjars/snorql/1.0/snorql.css" />
-    <link rel="stylesheet" type="text/css" 
href="../../webjars/codemirror/3.16/codemirror.css" />
+    <link rel="stylesheet" type="text/css" 
href="../../webjars/codemirror/3.16/lib/codemirror.css" />
     <style type="text/css">
         .CodeMirror {
             background-color: #fff;
@@ -112,7 +112,9 @@
 
     <script type="text/javascript" 
src="../../webjars/snorql/1.0/snorql.js"></script>
     <script type="text/javascript" 
src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
-    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/codemirror.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
+    <script type="text/javascript" 
src="../../webjars/codemirror/3.16/mode/sparql/sparql.js"></script>
     <script type="text/javascript">
         jQuery.noConflict();
     </script>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e5686422/platform/marmotta-sparql/src/main/resources/web/admin/update.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/update.html 
b/platform/marmotta-sparql/src/main/resources/web/admin/update.html
index 691ad66..6207cfc 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/update.html
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/update.html
@@ -22,7 +22,7 @@
     <!--###BEGIN_HEAD###-->
     <title>SPARQL Update</title>
     <link href="../style/sparql.css" rel="stylesheet" type="text/css" />
-    <link href="../../webjars/codemirror/3.16/codemirror.css" rel="stylesheet" 
type="text/css" />
+    <link href="../../webjars/codemirror/3.16/lib/codemirror.css" 
rel="stylesheet" type="text/css" />
     <style type="text/css">
         #refesh_box {
             display: inline-block;
@@ -76,7 +76,9 @@
 
 <script type="text/javascript" 
src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
 <script type="text/javascript" 
src="../../webjars/jquery-ui/1.8.21/jquery-ui.min.js"></script>
-<script type="text/javascript" 
src="../../webjars/codemirror/3.16/codemirror.js"></script>
+<script type="text/javascript" 
src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
+<script type="text/javascript" 
src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
+<script type="text/javascript" 
src="../../webjars/codemirror/3.16/mode/sparql/sparql.js"></script>
 
 <script type="text/javascript"> 
 

Reply via email to