Skip to content

Commit d73eed3

Browse files
committed
Updated autocomplete list + analyzator.
1 parent 9795ec2 commit d73eed3

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

app.bundle

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

public/js/default.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Thelpers.particon = function(type) {
4949
switch (type) {
5050
case 'action':
5151
return 'ti ti-atom';
52+
case 'auth':
53+
return 'ti ti-key';
5254
case 'markdown':
5355
return 'fa fa-heading';
5456
case 'helper':

public/js/editor.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1899,6 +1899,7 @@ SNIPPETS.push({ type: 'js', search: 'EMPTYOBJECT', text: 'EMPTYOBJECT', code: 'E
18991899
SNIPPETS.push({ type: 'js', search: 'QUERIFY', text: 'QUERIFY', code: 'QUERIFY()', ch: 9 });
19001900
SNIPPETS.push({ type: 'js', search: 'require db', text: '<b>require(\'querybuilderpg\')</b>', code: 'require(\'querybuilderpg\').init(\'\', CONF.database, 1, ERROR(\'DB\'));', ch: 1, priority: 1 });
19011901
SNIPPETS.push({ type: 'js', search: 'ON @flag', text: '<b>ON(\'@flag something\')</b>', code: 'ON(\'@flag \', function() {\n\t{0}\n{0}});', ch: 11 });
1902+
SNIPPETS.push({ type: 'js', search: 'ON ready', text: '<b>ON(\'ready\')</b>', code: 'ON(\'ready\', function() {\n\t{0}\n{0}});', ch: 11 });
19021903
SNIPPETS.push({ search: 'openplatformid', text: 'openplatformid', code: 'openplatformid', ch: 15 });
19031904
SNIPPETS.push({ search: 'encodeURIComponent', text: 'encodeURIComponent', code: 'encodeURIComponent', ch: 19 });
19041905
SNIPPETS.push({ search: 'decodeURIComponent', text: 'decodeURIComponent', code: 'decodeURIComponent', ch: 19 });

public/js/func.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24042404
var REGTODOREPLACE = /^(@todo|@tag)(:)(\s)|(\s)+-(\s)/i;
24052405
var REGTODODONE = /@done|@canceled/i;
24062406
var REGTODOCLEAN = /-->|\*\//g;
2407-
var REGPART = /(COMPONENT|COMPONENT_EXTEND|EXTENSION|CONFIG|NEWSCHEMA|NEWCOMMAND|NEWOPERATION|NEWTASK|MIDDLEWARE|WATCH|ROUTE|(^|\s)ON|PLUGIN|PLUGINABLE)+\(.*?\)/g;
2407+
var REGPART = /(COMPONENT|COMPONENT_EXTEND|AUTH|EXTENSION|CONFIG|NEWSCHEMA|NEWCOMMAND|NEWOPERATION|NEWTASK|MIDDLEWARE|WATCH|ROUTE|(^|\s)ON|PLUGIN|PLUGINABLE)+\(.*?\)/g;
24082408
var REGACTION = /NEWACTION\(('|").*?('|"),(\s)?\{/g;
24092409
var REGPARTCLEAN = /('|").*?('|")/;
24102410
var REGHELPER = /(Thelpers|FUNC|REPO|MAIN)\.[a-z0-9A-Z_$]+(\s)+=/g;
@@ -2494,12 +2494,17 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
24942494
if (m) {
24952495

24962496
name = m[0].match(REGPARTCLEAN);
2497-
tmp = m[0].toLowerCase();
24982497

2499-
if (tmp.substring(0, 16) === 'component_extend') {
2500-
type = 'exten';
2501-
} else
2502-
type = tmp.substring(0, 5).trim();
2498+
if (!name && m[0].substring(0, 4) === 'AUTH') {
2499+
name = ['AUTH'];
2500+
tmp = type = 'auth';
2501+
} else {
2502+
tmp = m[0].toLowerCase();
2503+
if (tmp.substring(0, 16) === 'component_extend') {
2504+
type = 'exten';
2505+
} else
2506+
type = tmp.substring(0, 5).trim();
2507+
}
25032508

25042509
if (name) {
25052510
name = name[0].replace(/'|"/g, '');
@@ -2522,7 +2527,7 @@ FUNC.jcomponent_update = function(name, type, content, body, meta) {
25222527
if (type === 'watch' && oldplugin)
25232528
name = name.replace(/\?/g, oldplugin);
25242529

2525-
components.push({ line: i, ch: beg, name: name.trim(), type: type.substring(0, 3) === 'on(' ? 'event' : type === 'exten' ? 'extension' : type === 'compo' ? 'component' : type === 'newsc' ? 'schema' : type === 'confi' ? 'config' : type === 'newop' ? 'operation' : type === 'newta' ? 'task' : type === 'newac' ? 'action' : type === 'newco' ? 'command' : type === 'watch' ? 'watcher' : type === 'plugi' ? ispluginable ? 'pluginable' : 'plugin' : type === 'middl' ? 'middleware' : type === 'route' ? 'route' : 'undefined' });
2530+
components.push({ line: i, ch: beg, name: name.trim(), type: type.substring(0, 3) === 'on(' ? 'event' : type === 'exten' ? 'extension' : type === 'compo' ? 'component' : type === 'newsc' ? 'schema' : type === 'confi' ? 'config' : type === 'newop' ? 'operation' : type === 'newta' ? 'task' : type === 'newac' ? 'action' : type === 'newco' ? 'command' : type === 'watch' ? 'watcher' : type === 'plugi' ? ispluginable ? 'pluginable' : 'plugin' : type === 'middl' ? 'middleware' : type === 'route' ? 'route' : type === 'auth' ? 'auth' : 'undefined' });
25262531
is = beg;
25272532
}
25282533
}

0 commit comments

Comments
 (0)