move elastic_tabstops into ext to automatically include in build
This commit is contained in:
parent
b29dc7c49e
commit
e6fd9dc977
3 changed files with 8 additions and 9 deletions
|
|
@ -62,7 +62,7 @@ var fillDropdown = util.fillDropdown;
|
||||||
var bindCheckbox = util.bindCheckbox;
|
var bindCheckbox = util.bindCheckbox;
|
||||||
var bindDropdown = util.bindDropdown;
|
var bindDropdown = util.bindDropdown;
|
||||||
|
|
||||||
var ElasticTabstopsLite = require("ace/elastic_tabstops_lite").ElasticTabstopsLite;
|
var ElasticTabstopsLite = require("ace/ext/elastic_tabstops_lite").ElasticTabstopsLite;
|
||||||
|
|
||||||
/*********** create editor ***************************/
|
/*********** create editor ***************************/
|
||||||
var container = document.getElementById("editor-container");
|
var container = document.getElementById("editor-container");
|
||||||
|
|
|
||||||
|
|
@ -145,14 +145,13 @@ var ElasticTabstopsLite = function(editor) {
|
||||||
|
|
||||||
this.$setBlockCellWidthsToMax = function(cellWidths) {
|
this.$setBlockCellWidthsToMax = function(cellWidths) {
|
||||||
var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
|
var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
|
||||||
|
|
||||||
var columnInfo = this.$izip_longest(cellWidths);
|
var columnInfo = this.$izip_longest(cellWidths);
|
||||||
|
|
||||||
for (var c = 0, l = columnInfo.length; c < l; c++) {
|
for (var c = 0, l = columnInfo.length; c < l; c++) {
|
||||||
var column = columnInfo[c];
|
var column = columnInfo[c];
|
||||||
if (!column.push) {
|
if (!column.push) {
|
||||||
console.error(column)
|
console.error(column);
|
||||||
continue
|
continue;
|
||||||
}
|
}
|
||||||
// add an extra None to the end so that the end of the column automatically
|
// add an extra None to the end so that the end of the column automatically
|
||||||
// finishes a block
|
// finishes a block
|
||||||
|
|
@ -253,7 +252,7 @@ var ElasticTabstopsLite = function(editor) {
|
||||||
// the is a (naive) Python port--but works for these purposes
|
// the is a (naive) Python port--but works for these purposes
|
||||||
this.$izip_longest = function(iterables) {
|
this.$izip_longest = function(iterables) {
|
||||||
if (!iterables[0])
|
if (!iterables[0])
|
||||||
return console.error(iterables);
|
return [];
|
||||||
var longest = iterables[0].length;
|
var longest = iterables[0].length;
|
||||||
var iterablesLength = iterables.length;
|
var iterablesLength = iterables.length;
|
||||||
|
|
||||||
|
|
@ -298,8 +297,8 @@ var ElasticTabstopsLite = function(editor) {
|
||||||
|
|
||||||
exports.ElasticTabstopsLite = ElasticTabstopsLite;
|
exports.ElasticTabstopsLite = ElasticTabstopsLite;
|
||||||
|
|
||||||
var Editor = require("./editor").Editor;
|
var Editor = require("../editor").Editor;
|
||||||
require("./config").defineOptions(Editor.prototype, "editor", {
|
require("../config").defineOptions(Editor.prototype, "editor", {
|
||||||
useElasticTabstops: {
|
useElasticTabstops: {
|
||||||
set: function(val) {
|
set: function(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
|
@ -43,12 +43,12 @@ dom.importCssString(searchboxCss, "ace_searchbox");
|
||||||
var html = '<div class="ace_search right">\
|
var html = '<div class="ace_search right">\
|
||||||
<button action="hide" class="ace_searchbtn_close"></button>\
|
<button action="hide" class="ace_searchbtn_close"></button>\
|
||||||
<div class="ace_search_form">\
|
<div class="ace_search_form">\
|
||||||
<input class="ace_search_field" placeholder="Search for" spellcheck="false">\
|
<input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
|
||||||
<button action="findNext" class="ace_searchbtn next"></button>\
|
<button action="findNext" class="ace_searchbtn next"></button>\
|
||||||
<button action="findPrev" class="ace_searchbtn prev"></button>\
|
<button action="findPrev" class="ace_searchbtn prev"></button>\
|
||||||
</div>\
|
</div>\
|
||||||
<div class="ace_replace_form">\
|
<div class="ace_replace_form">\
|
||||||
<input class="ace_search_field" placeholder="Replace with" spellcheck="false">\
|
<input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
|
||||||
<button action="replace" class="ace_replacebtn">Replace</button>\
|
<button action="replace" class="ace_replacebtn">Replace</button>\
|
||||||
<button action="replaceAll" class="ace_replacebtn">All</button>\
|
<button action="replaceAll" class="ace_replacebtn">All</button>\
|
||||||
</div>\
|
</div>\
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue