Moved ace and jsonlint libraries to the root

This commit is contained in:
josdejong 2013-05-04 10:12:37 +02:00
parent 2140125ace
commit 9d5aab339b
13 changed files with 75 additions and 73 deletions

View File

@ -160,6 +160,7 @@ task('zip', ['build', 'minify'], {async: true}, function () {
desc('Build web app');
task('webapp', ['build', 'minify'], function () {
var webAppSrc = './app/web/';
var libSrc = './lib/';
var webApp = BUILD + '/app/web/';
var webAppLib = webApp + 'lib/';
var webAppAce = webAppLib + 'ace/';
@ -241,18 +242,18 @@ task('webapp', ['build', 'minify'], function () {
// concatenate and copy ace files
concat({
src: [
webAppSrc + 'lib/ace/ace.js',
webAppSrc + 'lib/ace/mode-json.js',
webAppSrc + 'lib/ace/theme-textmate.js',
webAppSrc + 'lib/ace/theme-jso.js'
libSrc + 'ace/ace.js',
libSrc + 'ace/mode-json.js',
libSrc + 'ace/theme-textmate.js',
libSrc + 'ace/theme-jsoneditor.js'
],
dest: webAppAce + 'ace-min.js',
separator: '\n'
});
jake.cpR(webAppSrc + 'lib/ace/worker-json.js', webAppAce);
jake.cpR(libSrc + 'ace/worker-json.js', webAppAce);
// copy json lint file
jake.cpR(webAppSrc + 'lib/jsonlint/jsonlint.js', webAppLib + 'jsonlint/')
jake.cpR(libSrc + 'jsonlint/jsonlint.js', webAppLib + 'jsonlint/')
// copy jsoneditor files
jake.cpR(JSONEDITOR_MIN, webAppLib + 'jsoneditor/');

View File

@ -48,44 +48,44 @@
<link href="app.css" rel="stylesheet" type="text/css">
<link href="fileretriever.css" rel="stylesheet" type="text/css">
<link href="../../src/css/jsoneditor.css" rel="stylesheet" type="text/css">
<link href="../../src/css/menu.css" rel="stylesheet" type="text/css">
<link href="../../src/css/searchbox.css" rel="stylesheet" type="text/css">
<link href="../../src/css/contextmenu.css" rel="stylesheet" type="text/css">
<link href="../../jsoneditor/css/jsoneditor.css" rel="stylesheet" type="text/css">
<link href="../../jsoneditor/css/menu.css" rel="stylesheet" type="text/css">
<link href="../../jsoneditor/css/searchbox.css" rel="stylesheet" type="text/css">
<link href="../../jsoneditor/css/contextmenu.css" rel="stylesheet" type="text/css">
<!-- TODO: droid font
<link href='http://fonts.googleapis.com/css?family=Droid+Sans+Mono' rel='stylesheet' type='text/css'>
-->
<script type="text/javascript" src="../../src/js/jsoneditor.js"></script>
<script type="text/javascript" src="../../src/js/treeeditor.js"></script>
<script type="text/javascript" src="../../src/js/texteditor.js"></script>
<script type="text/javascript" src="../../src/js/node.js"></script>
<script type="text/javascript" src="../../src/js/appendnode.js"></script>
<script type="text/javascript" src="../../src/js/contextmenu.js"></script>
<script type="text/javascript" src="../../src/js/history.js"></script>
<script type="text/javascript" src="../../src/js/searchbox.js"></script>
<script type="text/javascript" src="../../src/js/highlighter.js"></script>
<script type="text/javascript" src="../../src/js/util.js"></script>
<script type="text/javascript" src="../../src/js/module.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/jsoneditor.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/treeeditor.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/texteditor.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/node.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/appendnode.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/contextmenu.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/history.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/searchbox.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/highlighter.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/util.js"></script>
<script type="text/javascript" src="../../jsoneditor/js/module.js"></script>
<script type="text/javascript" src="queryparams.js"></script>
<script type="text/javascript" src="ajax.js"></script>
<script type="text/javascript" src="fileretriever.js"></script>
<script type="text/javascript" src="notify.js"></script>
<script type="text/javascript" src="splitter.js"></script>
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="lib/jsonlint/jsonlint.js"></script>
<script type="text/javascript" src="../../lib/jsonlint/jsonlint.js"></script>
<script type="text/javascript" src="lib/ace/ace.js"></script>
<script type="text/javascript" src="lib/ace/mode-json.js"></script>
<script type="text/javascript" src="lib/ace/theme-textmate.js"></script>
<script type="text/javascript" src="lib/ace/theme-jso.js"></script>
<script type="text/javascript" src="../../lib/ace/ace.js"></script>
<script type="text/javascript" src="../../lib/ace/mode-json.js"></script>
<script type="text/javascript" src="../../lib/ace/theme-textmate.js"></script>
<script type="text/javascript" src="../../lib/ace/theme-jsoneditor.js"></script>
<style type="text/css">
div.convert-right {
background: url('../../src/css/img/jsoneditor-icons.png') -0 -48px;
background: url('../../jsoneditor/css/img/jsoneditor-icons.png') -0 -48px;
}
div.convert-left {
background: url('../../src/css/img/jsoneditor-icons.png') -24px -48px;
background: url('../../jsoneditor/css/img/jsoneditor-icons.png') -24px -48px;
}
</style>
</head>

View File

@ -9,7 +9,6 @@
}
#jsoneditor {
width: 500px;
height: 500px;
}
</style>
</head>

4
jsoneditor-min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@
*
* @author Jos de Jong, <wjosdejong@gmail.com>
* @version 2.2.0-SNAPSHOT
* @date 2013-05-03
* @date 2013-05-04
*/
(function () {
@ -1094,7 +1094,7 @@ TextEditor.prototype._create = function (container, options, json) {
this.content.appendChild(this.editorDom);
var editor = ace.edit(this.editorDom);
editor.setTheme('ace/theme/jso');
editor.setTheme('ace/theme/jsoneditor');
editor.setShowPrintMargin(false);
editor.setFontSize(13);
editor.getSession().setMode('ace/mode/json');
@ -1170,6 +1170,7 @@ TextEditor.prototype._delete = function () {
* It can be overwritten for each instance of the TextEditor
* @param {String} err
*/
// TODO: replace with an options.error
TextEditor.prototype.onError = function(err) {
// action should be implemented for the instance
};

View File

@ -112,7 +112,7 @@ TextEditor.prototype._create = function (container, options, json) {
this.content.appendChild(this.editorDom);
var editor = ace.edit(this.editorDom);
editor.setTheme('ace/theme/jso');
editor.setTheme('ace/theme/jsoneditor');
editor.setShowPrintMargin(false);
editor.setFontSize(13);
editor.getSession().setMode('ace/mode/json');
@ -188,6 +188,7 @@ TextEditor.prototype._delete = function () {
* It can be overwritten for each instance of the TextEditor
* @param {String} err
*/
// TODO: replace with an options.error
TextEditor.prototype.onError = function(err) {
// action should be implemented for the instance
};

View File

@ -28,114 +28,114 @@
*
* ***** END LICENSE BLOCK ***** */
define('ace/theme/jso', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
define('ace/theme/jsoneditor', ['require', 'exports', 'module' , 'ace/lib/dom'], function(require, exports, module) {
exports.isDark = false;
exports.cssClass = "ace-jso";
exports.cssText = ".ace-jso .ace_gutter {\
exports.cssClass = "ace-jsoneditor";
exports.cssText = ".ace-jsoneditor .ace_gutter {\
background: #ebebeb;\
color: #333\
}\
\
.ace-jso.ace_editor {\
.ace-jsoneditor.ace_editor {\
font-family: droid sans mono, monospace, courier new, courier, sans-serif;\
line-height: 1.3;\
}\
.ace-jso .ace_print-margin {\
.ace-jsoneditor .ace_print-margin {\
width: 1px;\
background: #e8e8e8\
}\
.ace-jso .ace_scroller {\
.ace-jsoneditor .ace_scroller {\
background-color: #FFFFFF\
}\
.ace-jso .ace_text-layer {\
.ace-jsoneditor .ace_text-layer {\
color: gray\
}\
.ace-jso .ace_variable {\
.ace-jsoneditor .ace_variable {\
color: #1a1a1a\
}\
.ace-jso .ace_cursor {\
.ace-jsoneditor .ace_cursor {\
border-left: 2px solid #000000\
}\
.ace-jso .ace_overwrite-cursors .ace_cursor {\
.ace-jsoneditor .ace_overwrite-cursors .ace_cursor {\
border-left: 0px;\
border-bottom: 1px solid #000000\
}\
.ace-jso .ace_marker-layer .ace_selection {\
.ace-jsoneditor .ace_marker-layer .ace_selection {\
background: #D5DDF6\
}\
.ace-jso.ace_multiselect .ace_selection.ace_start {\
.ace-jsoneditor.ace_multiselect .ace_selection.ace_start {\
box-shadow: 0 0 3px 0px #FFFFFF;\
border-radius: 2px\
}\
.ace-jso .ace_marker-layer .ace_step {\
.ace-jsoneditor .ace_marker-layer .ace_step {\
background: rgb(255, 255, 0)\
}\
.ace-jso .ace_marker-layer .ace_bracket {\
.ace-jsoneditor .ace_marker-layer .ace_bracket {\
margin: -1px 0 0 -1px;\
border: 1px solid #BFBFBF\
}\
.ace-jso .ace_marker-layer .ace_active-line {\
.ace-jsoneditor .ace_marker-layer .ace_active-line {\
background: #FFFBD1\
}\
.ace-jso .ace_gutter-active-line {\
.ace-jsoneditor .ace_gutter-active-line {\
background-color : #dcdcdc\
}\
.ace-jso .ace_marker-layer .ace_selected-word {\
.ace-jsoneditor .ace_marker-layer .ace_selected-word {\
border: 1px solid #D5DDF6\
}\
.ace-jso .ace_invisible {\
.ace-jsoneditor .ace_invisible {\
color: #BFBFBF\
}\
.ace-jso .ace_keyword,\
.ace-jso .ace_meta,\
.ace-jso .ace_support.ace_constant.ace_property-value {\
.ace-jsoneditor .ace_keyword,\
.ace-jsoneditor .ace_meta,\
.ace-jsoneditor .ace_support.ace_constant.ace_property-value {\
color: #AF956F\
}\
.ace-jso .ace_keyword.ace_operator {\
.ace-jsoneditor .ace_keyword.ace_operator {\
color: #484848\
}\
.ace-jso .ace_keyword.ace_other.ace_unit {\
.ace-jsoneditor .ace_keyword.ace_other.ace_unit {\
color: #96DC5F\
}\
.ace-jso .ace_constant.ace_language {\
.ace-jsoneditor .ace_constant.ace_language {\
color: orange\
}\
.ace-jso .ace_constant.ace_numeric {\
.ace-jsoneditor .ace_constant.ace_numeric {\
color: red\
}\
.ace-jso .ace_constant.ace_character.ace_entity {\
.ace-jsoneditor .ace_constant.ace_character.ace_entity {\
color: #BF78CC\
}\
.ace-jso .ace_invalid {\
.ace-jsoneditor .ace_invalid {\
color: #FFFFFF;\
background-color: #FF002A;\
}\
.ace-jso .ace_fold {\
.ace-jsoneditor .ace_fold {\
background-color: #AF956F;\
border-color: #000000\
}\
.ace-jso .ace_storage,\
.ace-jso .ace_support.ace_class,\
.ace-jso .ace_support.ace_function,\
.ace-jso .ace_support.ace_other,\
.ace-jso .ace_support.ace_type {\
.ace-jsoneditor .ace_storage,\
.ace-jsoneditor .ace_support.ace_class,\
.ace-jsoneditor .ace_support.ace_function,\
.ace-jsoneditor .ace_support.ace_other,\
.ace-jsoneditor .ace_support.ace_type {\
color: #C52727\
}\
.ace-jso .ace_string {\
.ace-jsoneditor .ace_string {\
color: green\
}\
.ace-jso .ace_comment {\
.ace-jsoneditor .ace_comment {\
color: #BCC8BA\
}\
.ace-jso .ace_entity.ace_name.ace_tag,\
.ace-jso .ace_entity.ace_other.ace_attribute-name {\
.ace-jsoneditor .ace_entity.ace_name.ace_tag,\
.ace-jsoneditor .ace_entity.ace_other.ace_attribute-name {\
color: #606060\
}\
.ace-jso .ace_markup.ace_underline {\
.ace-jsoneditor .ace_markup.ace_underline {\
text-decoration: underline\
}\
.ace-jso .ace_indent-guide {\
.ace-jsoneditor .ace_indent-guide {\
background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y\
}";