You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/07/09 11:50:53 UTC

[12/41] - moved SNORQL to WebJar - moved CodeMirror to WebJar - moved Sgvizler to WebJar - cleaned up uses of non-webjar jquery and jquery-ui - configured YUI compressor for the above packages in build

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/5fd590b4/platform/marmotta-sparql/src/main/resources/web/admin/editor/sparql/lib/runmode.js
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/editor/sparql/lib/runmode.js b/platform/marmotta-sparql/src/main/resources/web/admin/editor/sparql/lib/runmode.js
deleted file mode 100644
index 29b051b..0000000
--- a/platform/marmotta-sparql/src/main/resources/web/admin/editor/sparql/lib/runmode.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-CodeMirror.runMode = function(string, modespec, callback) {
-  var mode = CodeMirror.getMode({indentUnit: 2}, modespec);
-  var isNode = callback.nodeType == 1;
-  if (isNode) {
-    var node = callback, accum = [];
-    callback = function(string, style) {
-      if (string == "\n")
-        accum.push("<br>");
-      else if (style)
-        accum.push("<span class=\"" + CodeMirror.htmlEscape(style) + "\">" + CodeMirror.htmlEscape(string) + "</span>");
-      else
-        accum.push(CodeMirror.htmlEscape(string));
-    }
-  }
-  var lines = CodeMirror.splitLines(string), state = CodeMirror.startState(mode);
-  for (var i = 0, e = lines.length; i < e; ++i) {
-    if (i) callback("\n");
-    var stream = new CodeMirror.StringStream(lines[i]);
-    while (!stream.eol()) {
-      var style = mode.token(stream, state);
-      callback(stream.current(), style);
-      stream.start = stream.pos;
-    }
-  }
-  if (isNode)
-    node.innerHTML = accum.join("");
-};